mirror_zfs/include/sys
Olaf Faaland 9d3f7b8791 Write label 2,3 uberblocks when vdev expands
When vdev_psize increases, the location of labels 2 and 3 changes
because their location is relative to the end of the device.

The configs for labels 2 and 3 are written during the next spa_sync()
because the vdev is added to the dirty config list.  However, the
uberblock rings are not re-written in their new location, leaving the
device vulnerable to the beginning of the device being overwritten or
damaged.

This patch copies the uberblock ring from label 0 to labels 2 and 3,
in their new locations, at the next sync after vdev_psize increases.

Also, add a test zpool_expand_004_pos.ksh to confirm the uberblocks
are copied.

Reviewed-by: BearBabyLiu <liu.huang@zte.com.cn>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #5108
2017-05-02 13:55:24 -07:00
..
crypto
fm
fs
sysevent
abd.h
arc_impl.h
arc.h
avl_impl.h
avl.h
blkptr.h
bplist.h
bpobj.h
bptree.h Illumos 4914 - zfs on-disk bookmark structure should be named *_phys_t 2014-08-06 14:48:41 -07:00
bqueue.h
dbuf.h
ddt.h
dmu_impl.h
dmu_objset.h
dmu_send.h
dmu_traverse.h
dmu_tx.h
dmu_zfetch.h
dmu.h
dnode.h OpenZFS 7968 - multi-threaded spa_sync() 2017-03-20 18:36:00 -07:00
dsl_bookmark.h
dsl_dataset.h
dsl_deadlist.h
dsl_deleg.h
dsl_destroy.h
dsl_dir.h
dsl_pool.h
dsl_prop.h
dsl_scan.h
dsl_synctask.h
dsl_userhold.h
edonr.h
efi_partition.h
Makefile.am
metaslab_impl.h
metaslab.h
mntent.h
multilist.h
nvpair_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
nvpair.h Replace __va_list with va_list 2014-08-13 10:35:00 -07:00
pathname.h
policy.h
range_tree.h
refcount.h
rrwlock.h
sa_impl.h Implement large_dnode pool feature 2016-06-24 13:13:21 -07:00
sa.h
sdt.h
sha2.h
skein.h
spa_boot.h
spa_checksum.h
spa_impl.h
spa.h
space_map.h
space_reftree.h
sysevent.h
trace_acl.h
trace_arc.h
trace_common.h
trace_dbgmsg.h
trace_dbuf.h
trace_dmu.h
trace_dnode.h
trace_multilist.h
trace_txg.h
trace_zil.h
trace_zio.h
trace_zrlock.h
trace.h
txg_impl.h
txg.h
u8_textprep_data.h
u8_textprep.h
uberblock_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
uberblock.h
uio_impl.h
unique.h
uuid.h
vdev_disk.h
vdev_file.h
vdev_impl.h Write label 2,3 uberblocks when vdev expands 2017-05-02 13:55:24 -07:00
vdev_raidz_impl.h
vdev_raidz.h
vdev.h
xvattr.h
zap_impl.h
zap_leaf.h Illumos 5056 - ZFS deadlock on db_mtx and dn_holds 2015-04-28 16:25:34 -07:00
zap.h
zfeature.h
zfs_acl.h
zfs_context.h
zfs_ctldir.h
zfs_debug.h
zfs_delay.h
zfs_dir.h
zfs_fuid.h
zfs_ioctl.h
zfs_onexit.h
zfs_ratelimit.h
zfs_rlock.h
zfs_sa.h Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
zfs_stat.h
zfs_vfsops.h
zfs_vnops.h
zfs_znode.h
zil_impl.h
zil.h
zio_checksum.h
zio_compress.h
zio_impl.h
zio_priority.h
zio.h
zpl.h
zrlock.h
zvol.h