Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Steven Hartland

Hi DES, unfortunately you need a quite bit more than this to work compatibly.

I've had a patch here that does just this for quite some time but there's been 
some
discussion on how we want additional control over this so its not been commited.

If others are interested I've attached this as it achieves what we needed here 
so
may also be of use for others too.

There's also a big discussion on illumos about this very subject ATM so I'm
monitoring that too.

Hopefully there will be a nice conclusion come from that how people want to
proceed and we'll be able to get a change in that works for everyone.

   Regards
   Steve
- Original Message - 
From: Dag-Erling Smørgrav d...@des.no

To: freebsd...@freebsd.org; freebsd-hackers@freebsd.org
Cc: ivo...@freebsd.org
Sent: Wednesday, July 10, 2013 10:02 AM
Subject: Make ZFS use the physical sector size when computing initial ashift


The attached patch causes ZFS to base the minimum transfer size for a
new vdev on the GEOM provider's stripesize (physical sector size) rather
than sectorsize (logical sector size), provided that stripesize is a
power of two larger than sectorsize and smaller than or equal to
VDEV_PAD_SIZE.  This should eliminate the need for ivoras@'s gnop trick
when creating ZFS pools on Advanced Format drives.

DES
--
Dag-Erling Smørgrav - d...@des.no








___
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to freebsd-fs-unsubscr...@freebsd.org 




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 postmas...@multiplay.co.uk.

zzz-zfs-ashift-fix.patch
Description: Binary data
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Dag-Erling Smørgrav
Steven Hartland kill...@multiplay.co.uk writes:
 Hi DES, unfortunately you need a quite bit more than this to work
 compatibly.

*chirp* *chirp* *chirp*

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Borja Marcos

On Jul 10, 2013, at 11:25 AM, Steven Hartland wrote:

 If others are interested I've attached this as it achieves what we needed 
 here so
 may also be of use for others too.
 
 There's also a big discussion on illumos about this very subject ATM so I'm
 monitoring that too.
 
 Hopefully there will be a nice conclusion come from that how people want to
 proceed and we'll be able to get a change in that works for everyone.

Hmm. I wonder if the simplest approach would be the better. I mean, adding a 
flag to zpool.

At home I have a playground FreeBSD machine with a ZFS zmirror, and, you 
guessed it, I was
careless when I purchased the components, I asked for two 1 TB drives and 
that I got, but different
models, one of them advanced format and the other one classic.

I don't think it's that bad to create a pool on a classic disk using 4 KB 
blocks, and it's quite likely that
replacement disks will be 4 KB in the near future. 

Also, if you use SSDs the situation is similar.





Borja.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Steven Hartland

There's lots more to consider when considering a way foward not least of all
ashift isn't a zpool configuration option is per top level vdev, space
consideration of moving from 512b to 4k, see previous and current discussions
on zfs-de...@freebsd.org and z...@lists.illumos.org for details.

   Regards
   Steve

- Original Message - 
From: Borja Marcos bor...@sarenet.es


On Jul 10, 2013, at 11:25 AM, Steven Hartland wrote:


If others are interested I've attached this as it achieves what we needed here 
so
may also be of use for others too.

There's also a big discussion on illumos about this very subject ATM so I'm
monitoring that too.

Hopefully there will be a nice conclusion come from that how people want to
proceed and we'll be able to get a change in that works for everyone.


Hmm. I wonder if the simplest approach would be the better. I mean, adding a 
flag to zpool.

At home I have a playground FreeBSD machine with a ZFS zmirror, and, you 
guessed it, I was
careless when I purchased the components, I asked for two 1 TB drives and 
that I got, but different
models, one of them advanced format and the other one classic.

I don't think it's that bad to create a pool on a classic disk using 4 KB 
blocks, and it's quite likely that
replacement disks will be 4 KB in the near future. 


Also, if you use SSDs the situation is similar.



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 postmas...@multiplay.co.uk.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 07/10/13 02:02, Dag-Erling Sm￸rgrav wrote:
 The attached patch causes ZFS to base the minimum transfer size for
 a new vdev on the GEOM provider's stripesize (physical sector size)
 rather than sectorsize (logical sector size), provided that
 stripesize is a power of two larger than sectorsize and smaller
 than or equal to VDEV_PAD_SIZE.  This should eliminate the need for
 ivoras@'s gnop trick when creating ZFS pools on Advanced Format
 drives.

I think there are multiple versions of this (I also have one[1]) but
the concern is that if one creates a pool with ashift=9, and now
ashift=12, the pool gets unimportable.  So there need a way to disable
this behavior.

Another thing (not really related to the automatic detection) is that
we need a way to manually override this setting from command line when
creating the pool, this is under active discussion at Illumos mailing
list right now.

[1]
https://github.com/trueos/trueos/commit/3d2e3a38faad8df4acf442b055c5e98ab873fb26

Cheers,
- -- 
Xin LI delp...@delphij.nethttps://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-

iQEcBAEBCgAGBQJR3ZgAAAoJEG80Jeu8UPuzM6kIALu3Ud4uu+kdcsp+zNS54iw6
Etx2xWOjbHhJ1PZ0BKJ4R5/BOfpW4b1DrarPtpZLxoyg55GwlEVCH8Cia9ucznfP
KgFGwzztQlsiI5hcWD6RVNkAx/2o7sSynbprxxP1UdEdmH7f5MWVpNwjGE2KiIpA
0TxfTu8Sg0/QB7h3pGWt5sJSuwyogewvHIfTAgHEqnQdYPXxpadH7PS7shSJVdim
z2C9GoyLVQ6BMxXzQDcmA+fllgMZVKXROG7SxDFNDTWPnZ9HMZp2OJKELLtuZB1y
Iaq/gd3uPR2ZzPxw2OjdYKe7khWtmuU5Ox6+natsOKCqfoAfCjArA8zJZYsZoMI=
=Nd1V
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Justin T. Gibbs
On Jul 10, 2013, at 11:21 AM, Xin Li delp...@delphij.net wrote:

 Signed PGP part
 On 07/10/13 02:02, Dag-Erling Sm￸rgrav wrote:
  The attached patch causes ZFS to base the minimum transfer size for
  a new vdev on the GEOM provider's stripesize (physical sector size)
  rather than sectorsize (logical sector size), provided that
  stripesize is a power of two larger than sectorsize and smaller
  than or equal to VDEV_PAD_SIZE.  This should eliminate the need for
  ivoras@'s gnop trick when creating ZFS pools on Advanced Format
  drives.
 
 I think there are multiple versions of this (I also have one[1]) but
 the concern is that if one creates a pool with ashift=9, and now
 ashift=12, the pool gets unimportable.  So there need a way to disable
 this behavior.
 
 Another thing (not really related to the automatic detection) is that
 we need a way to manually override this setting from command line when
 creating the pool, this is under active discussion at Illumos mailing
 list right now.
 
 [1]
 https://github.com/trueos/trueos/commit/3d2e3a38faad8df4acf442b055c5e98ab873fb26
 
 Cheers,
 - -- 
 Xin LI delp...@delphij.nethttps://www.delphij.net/
 FreeBSD - The Power to Serve!   Live free or die
 
 ___
 freebsd...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-fs
 To unsubscribe, send any mail to freebsd-fs-unsubscr...@freebsd.org

I'm sure lots of folks have some solution to this.  Here is an
old version of what we use at Spectra:

http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff

The above patch is missing some cleanup that was motivated by my
discussions with George Wilson about this change in April.  I'll
dig that up later tonight.  Even if you don't read the full diff,
please read the included checkin comment since it explains the
motivation behind this particular solution.

This is on my list of things to upstream in the next week or so after
I add logic to the userspace tools to report whether or not the
TLVs in a pool are using an optimal allocation size.  This is only
possible if you actually make ZFS fully aware of logical, physical,
and the configured allocation size.  All of the other patches I've seen
just treat physical as logical.

--
Justin



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Steven Hartland


- Original Message - 
From: Xin Li 


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 07/10/13 02:02, Dag-Erling Sm?rgrav wrote:

The attached patch causes ZFS to base the minimum transfer size for
a new vdev on the GEOM provider's stripesize (physical sector size)
rather than sectorsize (logical sector size), provided that
stripesize is a power of two larger than sectorsize and smaller
than or equal to VDEV_PAD_SIZE.  This should eliminate the need for
ivoras@'s gnop trick when creating ZFS pools on Advanced Format
drives.


I think there are multiple versions of this (I also have one[1]) but
the concern is that if one creates a pool with ashift=9, and now
ashift=12, the pool gets unimportable.  So there need a way to disable
this behavior.


I've tested my patch in all configurations I can think of including exported
ashift=9 pools being imported, all no issues.

For your example e.g.

# Create a 4K pool (min_create_ashift=4K, dev=512)
test:src sysctl vfs.zfs.min_create_ashift
vfs.zfs.min_create_ashift: 12
test:src mdconfig -a -t swap -s 128m -S 512 -u 0
test:src zpool create mdpool md0
test:src zdb mdpool | grep ashift
   ashift: 12
   ashift: 12

# Create a 512b pool (min_create_ashift=512, dev=512)
test:src zpool destroy mdpool
test:src sysctl vfs.zfs.min_create_ashift=9
vfs.zfs.min_create_ashift: 12 - 9
test:src zpool create mdpool md0 
test:src zdb mdpool | grep ashift

   ashift: 9
   ashift: 9

# Import a 512b pool (min_create_ashift=4K, dev=512)
test:src zpool export mdpool
test:src sysctl vfs.zfs.min_create_ashift=12
vfs.zfs.min_create_ashift: 9 - 12
test:src zpool import mdpool
test:src zdb mdpool | grep ashift
   ashift: 9
   ashift: 9

# Create a 4K pool (min_create_ashift=512, dev=4K)
test:src zpool destroy mdpool
test:src mdconfig -d -u 0
test:src mdconfig -a -t swap -s 128m -S 4096 -u 0   
test:src sysctl vfs.zfs.min_create_ashift=9

vfs.zfs.min_create_ashift: 12 - 9
test:src zpool create mdpool md0
test:src zdb mdpool | grep ashift
   ashift: 12
   ashift: 12

# Import a 4K pool (min_create_ashift=4K, dev=4K)
test:src zpool export mdpool
test:src sysctl vfs.zfs.min_create_ashift=12
vfs.zfs.min_create_ashift: 9 - 12
test:src zpool import mdpool
test:src zdb mdpool | grep ashift
   ashift: 12
   ashift: 12


Another thing (not really related to the automatic detection) is that
we need a way to manually override this setting from command line when
creating the pool, this is under active discussion at Illumos mailing
list right now.

[1]
https://github.com/trueos/trueos/commit/3d2e3a38faad8df4acf442b055c5e98ab873fb26


Yep has been on my list for a while, based on previous discussions on 
zfs-devel@. I've not had any time recently but I'm following the illumos

thread to see what conclusions they come to.

   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 postmas...@multiplay.co.uk.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 07/10/13 10:38, Justin T. Gibbs wrote:
[snip]
 I'm sure lots of folks have some solution to this.  Here is an 
 old version of what we use at Spectra:
 
 http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff
 
 The above patch is missing some cleanup that was motivated by my 
 discussions with George Wilson about this change in April.  I'll 
 dig that up later tonight.  Even if you don't read the full diff, 
 please read the included checkin comment since it explains the 
 motivation behind this particular solution.
 
 This is on my list of things to upstream in the next week or so
 after I add logic to the userspace tools to report whether or not
 the TLVs in a pool are using an optimal allocation size.  This is
 only possible if you actually make ZFS fully aware of logical,
 physical, and the configured allocation size.  All of the other
 patches I've seen just treat physical as logical.

Yes, me too.  Your version is superior.

Cheers,
- -- 
Xin LI delp...@delphij.nethttps://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-

iQEcBAEBCgAGBQJR3aQzAAoJEG80Jeu8UPuzHn8H/1ZpoTqAQ4+mgQOttOwXgBcr
2Fgh52ztW8fCEQSeIosxXKO06hP7HxFfTPvmeeWyjT8zIpSUSFV6G0NclebKDncP
huGFofvx3BKPRmfzZp4iZx1wWQUxSHTmv6ceDwvP7P8GJ0mON+SrZxmmwUjKrf7V
W9Sazl0p8e0nxSQykLyjjrkaBx5Iv+aUxu8Alomwy9BmpM8+gd2yutvzghW5L36L
0CvAtIMXdlc+eUdAqa/2rOk/nMOA9sfWVW0gkKYCZk6wvj2DMzjii05UechZ4Z+l
6nEU3UdVsbTX73CABZv4my4JAWc5Yk1s/cWrxtn68AfK8LMPFJCJcVXXOSckMWI=
=351W
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Steven Hartland
- Original Message - 
From: Justin T. Gibbs 

I'm sure lots of folks have some solution to this.  Here is an
old version of what we use at Spectra:

 http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff

The above patch is missing some cleanup that was motivated by my
discussions with George Wilson about this change in April.  I'll
dig that up later tonight.  Even if you don't read the full diff,
please read the included checkin comment since it explains the
motivation behind this particular solution.

This is on my list of things to upstream in the next week or so after
I add logic to the userspace tools to report whether or not the
TLVs in a pool are using an optimal allocation size.  This is only
possible if you actually make ZFS fully aware of logical, physical,
and the configured allocation size.  All of the other patches I've seen
just treat physical as logical.


Reading through your patch it seems that your logical_ashift equates to
the current ashift values which for geom devices is based off sectorsize
and your physical_ashift is based stripesize.

This is almost identical to the approach I used adding a desired ashift,
which equates to your physical_ashift, along side the standard ashift
i.e. required aka logical_ashift value :)

One issue I did spot in your patch is that you currently expose
zfs_max_auto_ashift as a sysctl but don't clamp its value which would
cause problems should a user configure values  13.

If your interested in the reason for this its explained in the comments in 
my version which does a very similar thing with validation.


   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 postmas...@multiplay.co.uk.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Justin T. Gibbs
On Jul 10, 2013, at 1:06 PM, Steven Hartland kill...@multiplay.co.uk wrote:

 - Original Message - From: Justin T. Gibbs 
 I'm sure lots of folks have some solution to this.  Here is an
 old version of what we use at Spectra:
 http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff
 The above patch is missing some cleanup that was motivated by my
 discussions with George Wilson about this change in April.  I'll
 dig that up later tonight.  Even if you don't read the full diff,
 please read the included checkin comment since it explains the
 motivation behind this particular solution.
 
 This is on my list of things to upstream in the next week or so after
 I add logic to the userspace tools to report whether or not the
 TLVs in a pool are using an optimal allocation size.  This is only
 possible if you actually make ZFS fully aware of logical, physical,
 and the configured allocation size.  All of the other patches I've seen
 just treat physical as logical.
 
 Reading through your patch it seems that your logical_ashift equates to
 the current ashift values which for geom devices is based off sectorsize
 and your physical_ashift is based stripesize.
 
 This is almost identical to the approach I used adding a desired ashift,
 which equates to your physical_ashift, along side the standard ashift
 i.e. required aka logical_ashift value :)

Yes, the approaches are similar.  Our current version records the logical
access size in the vdev structure too, which might relate to the issue
below.

 One issue I did spot in your patch is that you currently expose
 zfs_max_auto_ashift as a sysctl but don't clamp its value which would
 cause problems should a user configure values  13.

I would expect the zio pipeline to simply insert an ashift aligned thunking
buffer for these operations, but I haven't tried going past an ashift of 13 in
my tests.  If it is an issue, it seems the restriction should be based on
logical access size, not optimal access size.

--
Justin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Steven Hartland


- Original Message - 
From: Justin T. Gibbs

On Jul 10, 2013, at 1:06 PM, Steven Hartland wrote:
- Original Message - From: Justin T. Gibbs 

I'm sure lots of folks have some solution to this.  Here is an
old version of what we use at Spectra:
http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff
The above patch is missing some cleanup that was motivated by my
discussions with George Wilson about this change in April.  I'll
dig that up later tonight.  Even if you don't read the full diff,
please read the included checkin comment since it explains the
motivation behind this particular solution.

This is on my list of things to upstream in the next week or so after
I add logic to the userspace tools to report whether or not the
TLVs in a pool are using an optimal allocation size.  This is only
possible if you actually make ZFS fully aware of logical, physical,
and the configured allocation size.  All of the other patches I've seen
just treat physical as logical.


Reading through your patch it seems that your logical_ashift equates to
the current ashift values which for geom devices is based off sectorsize
and your physical_ashift is based stripesize.

This is almost identical to the approach I used adding a desired ashift,
which equates to your physical_ashift, along side the standard ashift
i.e. required aka logical_ashift value :)


Yes, the approaches are similar.  Our current version records the logical
access size in the vdev structure too, which might relate to the issue
below.

 One issue I did spot in your patch is that you currently expose
 zfs_max_auto_ashift as a sysctl but don't clamp its value which would
 cause problems should a user configure values  13.

I would expect the zio pipeline to simply insert an ashift aligned thunking
buffer for these operations, but I haven't tried going past an ashift of 13 in
my tests.  If it is an issue, it seems the restriction should be based on
logical access size, not optimal access size.


Yes with your methodology you'll only see the issue if zfs_max_auto_ashift
and physical_ashift are both  13, but this can be the case for example
on a RAID controller with large stripsize.

Looking back at my old patch it too suffers from the same issue along with
the current code base, but that would only happen if logical sector size
resulted in an ashift  13 which is going to be much less common ;-)

   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 postmas...@multiplay.co.uk.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Justin T. Gibbs
On Jul 10, 2013, at 1:42 PM, Steven Hartland kill...@multiplay.co.uk wrote:

 
 - Original Message - From: Justin T. Gibbs
 On Jul 10, 2013, at 1:06 PM, Steven Hartland wrote:
 - Original Message - From: Justin T. Gibbs 
 I'm sure lots of folks have some solution to this.  Here is an
 old version of what we use at Spectra:
 http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff
 The above patch is missing some cleanup that was motivated by my
 discussions with George Wilson about this change in April.  I'll
 dig that up later tonight.  Even if you don't read the full diff,
 please read the included checkin comment since it explains the
 motivation behind this particular solution.
 This is on my list of things to upstream in the next week or so after
 I add logic to the userspace tools to report whether or not the
 TLVs in a pool are using an optimal allocation size.  This is only
 possible if you actually make ZFS fully aware of logical, physical,
 and the configured allocation size.  All of the other patches I've seen
 just treat physical as logical.
 Reading through your patch it seems that your logical_ashift equates to
 the current ashift values which for geom devices is based off sectorsize
 and your physical_ashift is based stripesize.
 This is almost identical to the approach I used adding a desired ashift,
 which equates to your physical_ashift, along side the standard ashift
 i.e. required aka logical_ashift value :)
 
 Yes, the approaches are similar.  Our current version records the logical
 access size in the vdev structure too, which might relate to the issue
 below.
 
  One issue I did spot in your patch is that you currently expose
  zfs_max_auto_ashift as a sysctl but don't clamp its value which would
  cause problems should a user configure values  13.
 
 I would expect the zio pipeline to simply insert an ashift aligned thunking
 buffer for these operations, but I haven't tried going past an ashift of 13 
 in
 my tests.  If it is an issue, it seems the restriction should be based on
 logical access size, not optimal access size.
 
 Yes with your methodology you'll only see the issue if zfs_max_auto_ashift
 and physical_ashift are both  13, but this can be the case for example
 on a RAID controller with large stripsize.

I'm not sure I follow.  logical_ashift is available in our latest code, as is 
the
physical_ashift.  But even without the logical_ashift, why doesn't the zio
pipeline properly thunk zio_phys_read() access based on the configured ashift?

--
Justin

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Make ZFS use the physical sector size when computing initial ashift

2013-07-10 Thread Steven Hartland
- Original Message - 
From: Justin T. Gibbs

...

 One issue I did spot in your patch is that you currently expose
 zfs_max_auto_ashift as a sysctl but don't clamp its value which would
 cause problems should a user configure values  13.

I would expect the zio pipeline to simply insert an ashift aligned thunking
buffer for these operations, but I haven't tried going past an ashift of 13 in
my tests.  If it is an issue, it seems the restriction should be based on
logical access size, not optimal access size.


Yes with your methodology you'll only see the issue if zfs_max_auto_ashift
and physical_ashift are both  13, but this can be the case for example
on a RAID controller with large stripsize.


I'm not sure I follow.  logical_ashift is available in our latest code, as is 
the
physical_ashift.  But even without the logical_ashift, why doesn't the zio
pipeline properly thunk zio_phys_read() access based on the configured ashift?


When I looked at it, which was a long time ago now so please excuse me if
I'm a little rusty on the details, zio_phys_read() was working more luck than
judgement as the offsets passed in where calculated from a valid start + 
increment
based on the size of a structure within vdev_label_offset() with no ashift
logic applied that I cound find.

The result was pools created with large ashift's where unstable when I
tested.

   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 postmas...@multiplay.co.uk.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org