diff options
author | George Wilson <[email protected]> | 2020-09-18 14:13:47 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-18 12:13:47 -0700 |
commit | c494aa7f578d5cb844b770f679bd46495242edad (patch) | |
tree | 6abcc94bc41285c5157817062b600c81986b5e7e /include | |
parent | 908d43d0a9f736af62c0f4b179950bb1262dfd7d (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Cedric Berger <[email protected]>
Signed-off-by: George Wilson <[email protected]>
External-Issue: DLPX-71831
Closes #10932
Diffstat (limited to 'include')
-rw-r--r-- | include/os/linux/kernel/linux/mod_compat.h | 2 | ||||
-rw-r--r-- | include/sys/vdev.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/os/linux/kernel/linux/mod_compat.h b/include/os/linux/kernel/linux/mod_compat.h index 4b83fe413..1c48df5cb 100644 --- a/include/os/linux/kernel/linux/mod_compat.h +++ b/include/os/linux/kernel/linux/mod_compat.h @@ -21,6 +21,7 @@ /* * Copyright (C) 2016 Gvozden Neskovic <[email protected]>. + * Copyright (c) 2020 by Delphix. All rights reserved. */ #ifndef _MOD_COMPAT_H @@ -71,6 +72,7 @@ enum scope_prefix_types { zfs_txg, zfs_vdev, zfs_vdev_cache, + zfs_vdev_file, zfs_vdev_mirror, zfs_zevent, zfs_zio, diff --git a/include/sys/vdev.h b/include/sys/vdev.h index 6dcd20969..309ce33be 100644 --- a/include/sys/vdev.h +++ b/include/sys/vdev.h @@ -94,7 +94,6 @@ extern void vdev_rele(vdev_t *); extern int vdev_metaslab_init(vdev_t *vd, uint64_t txg); extern void vdev_metaslab_fini(vdev_t *vd); extern void vdev_metaslab_set_size(vdev_t *); -extern void vdev_ashift_optimize(vdev_t *); extern void vdev_expand(vdev_t *vd, uint64_t txg); extern void vdev_split(vdev_t *vd); extern void vdev_deadman(vdev_t *vd, char *tag); |