X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_vfsops.c;h=ea7e9cec9330a58285e67285ce8e5e8aaa5e55bf;hb=17c37660a14cc5e26cc668fdb285933fee4b6cf4;hp=bb2fdb029574f303a0dc3d24c505b9c881c21a7a;hpb=ceb43b935d6c4f4f6509623c7498d5dcc40ea813;p=zfs.git diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index bb2fdb0..ea7e9ce 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -997,11 +997,15 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp) &refdbytes, &availbytes, &usedobjs, &availobjs); /* - * The underlying storage pool actually uses multiple block sizes. - * We report the fragsize as the smallest block size we support, - * and we report our blocksize as the filesystem's maximum blocksize. + * The underlying storage pool actually uses multiple block + * size. Under Solaris frsize (fragment size) is reported as + * the smallest block size we support, and bsize (block size) + * as the filesystem's maximum block size. Unfortunately, + * under Linux the fragment size and block size are often used + * interchangeably. Thus we are forced to report both of them + * as the filesystem's maximum block size. */ - statp->f_frsize = 1UL << SPA_MINBLOCKSHIFT; + statp->f_frsize = zsb->z_max_blksz; statp->f_bsize = zsb->z_max_blksz; bshift = fls(statp->f_bsize) - 1; @@ -1025,7 +1029,7 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp) */ statp->f_ffree = MIN(availobjs, statp->f_bfree); statp->f_files = statp->f_ffree + usedobjs; - statp->f_fsid.val[0] = 0; /* XXX: Map up some unique ID */ + statp->f_fsid.val[0] = dentry->d_sb->s_dev; statp->f_fsid.val[1] = 0; statp->f_type = ZFS_SUPER_MAGIC; statp->f_namelen = ZFS_MAXNAMELEN;