From caff31df192bc4b06c8b0e9c75cbe93ff79581a5 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 11 Mar 2020 12:57:44 +0100 Subject: [PATCH] vdo: make vdopool wrapping device is read-only When vdopool is activated standalone - we use a wrapping linear device to hold actual vdo device active - for this we can set-up read-only device to ensure there cannot be made write through this device to actual pool device. --- lib/activate/dev_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 3b991319f..75d4df0e6 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -86,7 +86,7 @@ int read_only_lv(const struct logical_volume *lv, const struct lv_activate_opts return 0; /* Keep RAID SubLvs writable */ if (!layer) { - if (lv_is_thin_pool(lv)) + if (lv_is_thin_pool(lv) || lv_is_vdo_pool(lv)) return 1; }