Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2012 15:04:20 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        <freebsd-fs@FreeBSD.ORG>
Subject:   ZFS using sectorsize instead of stripesize for ashift
Message-ID:  <2194101A4F9946B496D921940B806486@multiplay.co.uk>

next in thread | raw e-mail | index | archive | help
We've been doing a lot test on ZFS with SSD's in particular around
trim. During this we've added quirks for our SSD's to cam/scsi_da
and was expecting this to ensure ZFS's ashift is set correctly
for newly create pools, instead of having to use the gnop
workaround.

Unfortunately this doesn't seem to be the case as ZFS is using the
geom providers sectorsize instead of stripesize as its minimum
transfer size (ashift).


The following patch corrects this behaviour so ZFS uses stripsize
for ashift definition.

So the question is this the correct thing to do?

If so should any of the other usages of sectorsize be changes to
stripesize as well?

--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c.ashift   2012-06-26 13:38:55.193306961 +0000
+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c  2012-06-26 13:39:22.323019022 +0000
@@ -504,7 +504,7 @@
        /*
         * Determine the device's minimum transfer size.
         */
-       *ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
+       *ashift = highbit(MAX(pp->stripesize, SPA_MINBLOCKSIZE)) - 1;
 
        /*
         * Clear the nowritecache settings, so that on a vdev_reopen()


    Regards
    Steve

================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster@multiplay.co.uk.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2194101A4F9946B496D921940B806486>