zfs/cmd/zpool
George Wilson c494aa7f57
vdev_ashift should only be set once
== Motivation and Context

The new vdev ashift optimization prevents the removal of devices when
a zfs configuration is comprised of disks which have different logical
and physical block sizes. This is caused because we set 'spa_min_ashift'
in vdev_open and then later call 'vdev_ashift_optimize'. This would
result in an inconsistency between spa's ashift calculations and that
of the top-level vdev.

In addition, the optimization logical ignores the overridden ashift
value that would be provided by '-o ashift=<val>'.

== Description

This change reworks the vdev ashift optimization so that it's only
set the first time the device is configured. It still allows the
physical and logical ahsift values to be set every time the device
is opened but those values are only consulted on first open.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Cedric Berger <cedric@precidata.com>
Signed-off-by: George Wilson <gwilson@delphix.com>
External-Issue: DLPX-71831
Closes #10932
2020-09-18 12:13:47 -07:00
..
os Remove dead code 2020-06-18 12:21:18 -07:00
zpool.d Style fixes 2020-06-27 17:38:55 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Use abs_top_builddir when referencing libraries 2020-07-10 14:26:32 -07:00
zpool_iter.c Remove refences to blacklist/whitelist 2020-06-16 11:41:45 -07:00
zpool_main.c vdev_ashift should only be set once 2020-09-18 12:13:47 -07:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h Remove refences to blacklist/whitelist 2020-06-16 11:41:45 -07:00
zpool_vdev.c Changes to make openzfs build within FreeBSD buildworld 2020-07-31 21:30:31 -07:00