FreeBSD/sys/fs/nfsclient/nfs_clstate.c
/*
 * Search for a layout by MDS file handle. If one is found that is marked
 * "return on close", delete it, since it should now be forgotten.
 */
Search for a layout by MDS file handle. If one is found that is marked
"return on close", delete it, since it should now be forgotten.
Search for a layout by MDS file handle . If one is found that is marked " return on close " delete it since it should now be forgotten .
static void
nfscl_retoncloselayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen)
{
	struct nfscllayout *lyp;
tryagain:
	lyp = nfscl_findlayout(clp, fhp, fhlen);
	if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) {
		if (lyp->nfsly_lock.nfslock_usecnt != 0 ||
		    lyp->nfsly_lock.nfslock_lock != 0) {
			lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED;
			(void)mtx_sleep(&lyp->nfsly_lock,
			    NFSCLSTATEMUTEXPTR, PZERO, "nfslyc", 0);
			goto tryagain;
		}
		nfscl_freelayout(lyp);
	}
}
static void nfscl_retoncloselayout ( struct nfsclclient * clp , uint8_t * fhp , int fhlen ) { struct nfscllayout * lyp ; tryagain : lyp = nfscl_findlayout ( clp , fhp , fhlen ) ; if ( lyp != NULL && ( lyp -> nfsly_flags & NFSLY_RETONCLOSE ) != 0 ) { if ( lyp -> nfsly_lock . nfslock_usecnt != 0 || lyp -> nfsly_lock . nfslock_lock != 0 ) { lyp -> nfsly_lock . nfslock_lock |= NFSV4LOCK_WANTED ; ( void ) mtx_sleep ( & lyp -> nfsly_lock , NFSCLSTATEMUTEXPTR , PZERO , " " , 0 ) ; goto tryagain ; } nfscl_freelayout ( lyp ) ; } }
Search for a layout by MDS file handle.
Search for a layout by MDS file handle .
/*
		 * Wait for outstanding I/O ops to be done.
		 */