]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Increase fragment size to block size
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 21:57:50 +0000 (13:57 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 22:00:06 +0000 (14:00 -0800)
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.

Closes #112

module/zfs/zfs_vfsops.c

index bb2fdb029574f303a0dc3d24c505b9c881c21a7a..028638d5c85e978e16e4d554dee1a505802a222e 100644 (file)
@@ -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;