diff options
author | Fedor Uporov <[email protected]> | 2021-11-11 11:54:15 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-11 11:54:15 -0800 |
commit | 49d42425d6dc9b55c8e83aa1b920fd0e08f7a142 (patch) | |
tree | ba68e73a81f461031d2d275ed3e45c7a9f6e8d61 /include | |
parent | d04b5c9e877a4d4b2337e6b2b453c7650aed433d (diff) |
Check l2cache vdevs pending list inside the vdev_inuse()
The l2cache device could be added twice because vdev_inuse() does not
check spa_l2cache for added devices. Make l2cache vdevs inuse checking
logic more closer to spare vdevs.
Reviewed-by: George Amanakis <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Fedor Uporov <[email protected]>
Closes #9153
Closes #12689
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/spa.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h index 2ae467877..a55dbd66d 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -1075,6 +1075,7 @@ extern void spa_upgrade(spa_t *spa, uint64_t version); extern void spa_evict_all(void); extern vdev_t *spa_lookup_by_guid(spa_t *spa, uint64_t guid, boolean_t l2cache); +extern boolean_t spa_has_l2cache(spa_t *, uint64_t guid); extern boolean_t spa_has_spare(spa_t *, uint64_t guid); extern uint64_t dva_get_dsize_sync(spa_t *spa, const dva_t *dva); extern uint64_t bp_get_dsize_sync(spa_t *spa, const blkptr_t *bp); |