Bug #4121
closedvdev_label_init should treat request as succeeded when pool is read only
100%
Description
We have run into an assertion on FreeBSD while trying to import a pool read-only:
zio->io_type != ZIO_TYPE_WRITE || spa_writeable(spa)
Looking more closely, it seems that the write was initiated by vdev_label_init, which is in turn called from spa_import via spa_validate_aux. When importing a pool read-only, it does not really make sense to actually do full initialization of a label, which would in turn initiate a write that violates the aforementioned assertion.
This version of patch was originally suggested by George Wilson. Our initial version covers only spa_import() and skips calls to spa_validate_aux() if pool is not imported with write enabled.
We would like to have the patch applied against Illumos since the same problem would exist there too.
Files
Related issues
Updated by Christopher Siden almost 10 years ago
- Status changed from New to Closed
commit 973c78e94bf9634782164382c9e291bf81161fa5 Author: George Wilson <george.wilson@delphix.com> Date: Wed Dec 11 11:45:30 2013 4121 vdev_label_init should treat request as succeeded when pool is read only Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>