sys/fs/nfsclient/nfs_clport.c
/*
 * Use the fsinfo stuff to update the mount point.
 */
Use the fsinfo stuff to update the mount point.
Use the fsinfo stuff to update the mount point .
void
nfscl_loadfsinfo(struct nfsmount *nmp, struct nfsfsinfo *fsp)
{
	if ((nmp->nm_wsize == 0 || fsp->fs_wtpref < nmp->nm_wsize) &&
	    fsp->fs_wtpref >= NFS_FABLKSIZE)
		nmp->nm_wsize = (fsp->fs_wtpref + NFS_FABLKSIZE - 1) &
		    ~(NFS_FABLKSIZE - 1);
	if (fsp->fs_wtmax < nmp->nm_wsize && fsp->fs_wtmax > 0) {
		nmp->nm_wsize = fsp->fs_wtmax & ~(NFS_FABLKSIZE - 1);
		if (nmp->nm_wsize == 0)
			nmp->nm_wsize = fsp->fs_wtmax;
	}
	if (nmp->nm_wsize < NFS_FABLKSIZE)
		nmp->nm_wsize = NFS_FABLKSIZE;
	if ((nmp->nm_rsize == 0 || fsp->fs_rtpref < nmp->nm_rsize) &&
	    fsp->fs_rtpref >= NFS_FABLKSIZE)
		nmp->nm_rsize = (fsp->fs_rtpref + NFS_FABLKSIZE - 1) &
		    ~(NFS_FABLKSIZE - 1);
	if (fsp->fs_rtmax < nmp->nm_rsize && fsp->fs_rtmax > 0) {
		nmp->nm_rsize = fsp->fs_rtmax & ~(NFS_FABLKSIZE - 1);
		if (nmp->nm_rsize == 0)
			nmp->nm_rsize = fsp->fs_rtmax;
	}
	if (nmp->nm_rsize < NFS_FABLKSIZE)
		nmp->nm_rsize = NFS_FABLKSIZE;
	if ((nmp->nm_readdirsize == 0 || fsp->fs_dtpref < nmp->nm_readdirsize)
	    && fsp->fs_dtpref >= NFS_DIRBLKSIZ)
		nmp->nm_readdirsize = (fsp->fs_dtpref + NFS_DIRBLKSIZ - 1) &
		    ~(NFS_DIRBLKSIZ - 1);
	if (fsp->fs_rtmax < nmp->nm_readdirsize && fsp->fs_rtmax > 0) {
		nmp->nm_readdirsize = fsp->fs_rtmax & ~(NFS_DIRBLKSIZ - 1);
		if (nmp->nm_readdirsize == 0)
			nmp->nm_readdirsize = fsp->fs_rtmax;
	}
	if (nmp->nm_readdirsize < NFS_DIRBLKSIZ)
		nmp->nm_readdirsize = NFS_DIRBLKSIZ;
	if (fsp->fs_maxfilesize > 0 &&
	    fsp->fs_maxfilesize < nmp->nm_maxfilesize)
		nmp->nm_maxfilesize = fsp->fs_maxfilesize;
	nmp->nm_mountp->mnt_stat.f_iosize = newnfs_iosize(nmp);
	nmp->nm_state |= NFSSTA_GOTFSINFO;
}
void nfscl_loadfsinfo ( struct nfsmount * nmp , struct nfsfsinfo * fsp ) { if ( ( nmp -> nm_wsize == 0 || fsp -> fs_wtpref < nmp -> nm_wsize ) && fsp -> fs_wtpref >= NFS_FABLKSIZE ) nmp -> nm_wsize = ( fsp -> fs_wtpref + NFS_FABLKSIZE - 1 ) & ~ ( NFS_FABLKSIZE - 1 ) ; if ( fsp -> fs_wtmax < nmp -> nm_wsize && fsp -> fs_wtmax > 0 ) { nmp -> nm_wsize = fsp -> fs_wtmax & ~ ( NFS_FABLKSIZE - 1 ) ; if ( nmp -> nm_wsize == 0 ) nmp -> nm_wsize = fsp -> fs_wtmax ; } if ( nmp -> nm_wsize < NFS_FABLKSIZE ) nmp -> nm_wsize = NFS_FABLKSIZE ; if ( ( nmp -> nm_rsize == 0 || fsp -> fs_rtpref < nmp -> nm_rsize ) && fsp -> fs_rtpref >= NFS_FABLKSIZE ) nmp -> nm_rsize = ( fsp -> fs_rtpref + NFS_FABLKSIZE - 1 ) & ~ ( NFS_FABLKSIZE - 1 ) ; if ( fsp -> fs_rtmax < nmp -> nm_rsize && fsp -> fs_rtmax > 0 ) { nmp -> nm_rsize = fsp -> fs_rtmax & ~ ( NFS_FABLKSIZE - 1 ) ; if ( nmp -> nm_rsize == 0 ) nmp -> nm_rsize = fsp -> fs_rtmax ; } if ( nmp -> nm_rsize < NFS_FABLKSIZE ) nmp -> nm_rsize = NFS_FABLKSIZE ; if ( ( nmp -> nm_readdirsize == 0 || fsp -> fs_dtpref < nmp -> nm_readdirsize ) && fsp -> fs_dtpref >= NFS_DIRBLKSIZ ) nmp -> nm_readdirsize = ( fsp -> fs_dtpref + NFS_DIRBLKSIZ - 1 ) & ~ ( NFS_DIRBLKSIZ - 1 ) ; if ( fsp -> fs_rtmax < nmp -> nm_readdirsize && fsp -> fs_rtmax > 0 ) { nmp -> nm_readdirsize = fsp -> fs_rtmax & ~ ( NFS_DIRBLKSIZ - 1 ) ; if ( nmp -> nm_readdirsize == 0 ) nmp -> nm_readdirsize = fsp -> fs_rtmax ; } if ( nmp -> nm_readdirsize < NFS_DIRBLKSIZ ) nmp -> nm_readdirsize = NFS_DIRBLKSIZ ; if ( fsp -> fs_maxfilesize > 0 && fsp -> fs_maxfilesize < nmp -> nm_maxfilesize ) nmp -> nm_maxfilesize = fsp -> fs_maxfilesize ; nmp -> nm_mountp -> mnt_stat . f_iosize = newnfs_iosize ( nmp ) ; nmp -> nm_state |= NFSSTA_GOTFSINFO ; }
Use the fsinfo stuff to update the mount point.
Use the fsinfo stuff to update the mount point .