Undo r216230: the interaction between saved ashift in metadata and

detected ashift does not support this. With this change, pools
created while stripesize=512 could not be imported when stripesize
becomes larger (on the same drive).

Noticed by:	pjd
This commit is contained in:
Ivan Voras 2010-12-07 15:24:08 +00:00
parent 1b3c32568a
commit d7ccd95be8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216256

View File

@ -496,10 +496,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift)
/*
* Determine the device's minimum transfer size.
*/
if (pp->stripesize > pp->sectorsize)
*ashift = highbit(MIN(pp->stripesize, SPA_MAXBLOCKSIZE)) - 1;
else
*ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
*ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
/*
* Clear the nowritecache bit, so that on a vdev_reopen() we will