diff options
author | George Amanakis <[email protected]> | 2021-06-17 03:17:42 +0300 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-06-23 13:22:15 -0700 |
commit | 87d93731e7f60f71238ab3820f18ab1ee13c9ea0 (patch) | |
tree | 2a120df813106fcffc79408b4cca0f7c07120fae /config/kernel-create-nameidata.m4 | |
parent | bd197378e772881357249f49dc7114481d8d1645 (diff) |
Avoid deadlock when removing L2ARC devices under I/O
In case we have I/O and try to remove an L2ARC device a deadlock might
occur. arc_read()->zio_read()->zfs_blkptr_verify() waits for SCL_VDEV
to be dropped while holding the hash_lock. However, spa_l2cache_load()
holds SCL_ALL and waits for the hash_lock in l2arc_evict().
Fix this by moving zfs_blkptr_verify() to the top top arc_read() before
the hash_lock is taken. Verify the block pointer and return a checksum
error if damaged rather than halting the system, by using
BLK_VERIFY_LOG instead of BLK_VERIFY_HALT.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Mark Maybee <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes #12054
Diffstat (limited to 'config/kernel-create-nameidata.m4')
0 files changed, 0 insertions, 0 deletions