diff options
author | Roman Strashkin <[email protected]> | 2018-09-13 04:14:42 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-09-12 18:14:42 -0700 |
commit | 733b5722b4fc6e7927ea8a33bef49f7059d91903 (patch) | |
tree | e15da574cc36b67130e2947ab7eb71e1483c0d29 /module | |
parent | b8a90418f3a9c23b89c5d2c729a4dd0fea644508 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Roman Strashkin <[email protected]>
Closes #7865
Closes #7881
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/spa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index c503b06bc..7bf9cde5b 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -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; } |