mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
zpool split can create a corrupted pool
Added vdev_resilver_needed() check to verify VDEVs are fully synced, so that after split the new pool will not be corrupted. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: loli10K <ezomori.nozomu@gmail.com> Signed-off-by: Roman Strashkin <roman.strashkin@nexenta.com> Closes #7865 Closes #7881
This commit is contained in:
committed by
Brian Behlendorf
parent
b8a90418f3
commit
733b5722b4
+3
-3
@@ -22,8 +22,7 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013, 2014, Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2018, Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
|
||||
* Copyright 2013 Saso Kiselkov. All rights reserved.
|
||||
* Copyright (c) 2014 Integros [integros.com]
|
||||
@@ -6485,7 +6484,8 @@ spa_vdev_split_mirror(spa_t *spa, char *newname, nvlist_t *config,
|
||||
break;
|
||||
}
|
||||
|
||||
if (vdev_dtl_required(vml[c])) {
|
||||
if (vdev_dtl_required(vml[c]) ||
|
||||
vdev_resilver_needed(vml[c], NULL, NULL)) {
|
||||
error = SET_ERROR(EBUSY);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user