]> granicus.if.org Git - zfs/commit
Fix don't zero_label when replace with spare
authorChunwei Chen <tuxoko@gmail.com>
Mon, 24 Jul 2017 19:49:27 +0000 (12:49 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 24 Jul 2017 19:49:27 +0000 (12:49 -0700)
commit83a5e4d6b9c2509efa25ea4cfceba3cd313bf920
tree3d95bb2c55cb9f004eb32029af4924c1faccddc1
parentd6bcf7ff5e97df3195d34269b1b72952b4a00778
Fix don't zero_label when replace with spare

When replacing a disk with non-wholedisk spare, we shouldn't zero_label
it. The wholedisk case already skip it. In fact, zero_label function
will fail saying device busy because it's already opened exclusively,
but since there's no error checking, the replace command will succeed,
causing great confusion.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #6369
cmd/zpool/zpool_vdev.c