diff options
author | pjd <pjd@FreeBSD.org> | 2010-02-19 20:18:16 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-02-19 20:18:16 +0000 |
commit | 93ac446555960821cec484baba57d6adfa56019d (patch) | |
tree | 376c34ff175abc41e249544147948f64aea1c969 /sys/cddl | |
parent | 9db946a5402c15c965897dea9eae9d56b6ce20f8 (diff) | |
download | FreeBSD-src-93ac446555960821cec484baba57d6adfa56019d.zip FreeBSD-src-93ac446555960821cec484baba57d6adfa56019d.tar.gz |
Don't set f_bsize to recordsize. It might confuse some software (like squid).
Submitted by: Alexander Zagrebin <alexz@visp.ru>
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c index 1132483..ad8165b 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -214,7 +214,7 @@ blksz_changed_cb(void *arg, uint64_t newval) newval = SPA_MAXBLOCKSIZE; zfsvfs->z_max_blksz = newval; - zfsvfs->z_vfs->vfs_bsize = newval; + zfsvfs->z_vfs->mnt_stat.f_iosize = newval; } static void @@ -577,7 +577,8 @@ zfs_domount(vfs_t *vfsp, char *osname) if (error = dsl_prop_get_integer(osname, "recordsize", &recordsize, NULL)) goto out; - zfsvfs->z_vfs->vfs_bsize = recordsize; + zfsvfs->z_vfs->vfs_bsize = SPA_MINBLOCKSIZE; + zfsvfs->z_vfs->mnt_stat.f_iosize = recordsize; vfsp->vfs_data = zfsvfs; vfsp->mnt_flag |= MNT_LOCAL; @@ -817,8 +818,8 @@ zfs_statfs(vfs_t *vfsp, struct statfs *statp) * We report the fragsize as the smallest block size we support, * and we report our blocksize as the filesystem's maximum blocksize. */ - statp->f_bsize = zfsvfs->z_vfs->vfs_bsize; - statp->f_iosize = zfsvfs->z_vfs->vfs_bsize; + statp->f_bsize = SPA_MINBLOCKSIZE; + statp->f_iosize = zfsvfs->z_vfs->mnt_stat.f_iosize; /* * The following report "total" blocks of various kinds in the @@ -826,7 +827,7 @@ zfs_statfs(vfs_t *vfsp, struct statfs *statp) * "fragment" size. */ - statp->f_blocks = (refdbytes + availbytes) / statp->f_bsize; + statp->f_blocks = (refdbytes + availbytes) >> SPA_MINBLOCKSHIFT; statp->f_bfree = availbytes / statp->f_bsize; statp->f_bavail = statp->f_bfree; /* no root reservation */ |