ZFS stripesize patch (in the context of 4k sector drives)

Ivan Voras ivoras at freebsd.org
Fri Nov 12 15:00:27 UTC 2010


Hello,

Any objections to me committing the following patch?

The intention is to use stripesize info from GEOM in creating vdevs, in 
the hope that the 4 KiB sector magic will work.


Index: cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
===================================================================
--- cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 
(revision 215173)
+++ cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c      (working 
copy)
@@ -496,7 +496,8 @@
        /*
         * Determine the device's minimum transfer size.
         */
-       *ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
+       *ashift = highbit(MAX(pp->stripesize ? pp->stripesize : 
pp->sectorsize,
+           SPA_MINBLOCKSIZE)) - 1;

        /*
         * Clear the nowritecache bit, so that on a vdev_reopen() we will



More information about the freebsd-geom mailing list