Blame SOURCES/lvm2-2_02_187-thin-activate-layer-pool-aas-read-only-LV.patch

b83e05
 WHATS_NEW                  | 1 +
b83e05
 lib/activate/dev_manager.c | 5 +++++
b83e05
 2 files changed, 6 insertions(+)
b83e05
b83e05
diff --git a/WHATS_NEW b/WHATS_NEW
b83e05
index d1f4530..00b84f9 100644
b83e05
--- a/WHATS_NEW
b83e05
+++ b/WHATS_NEW
b83e05
@@ -2,6 +2,7 @@ Version 2.02.187 -
b83e05
 ===================================
b83e05
   Prevent creating VGs with PVs with different logical block sizes.
b83e05
   Pvmove runs in exlusively activating mode for exclusively active LVs.
b83e05
+  Activate thin-pool layered volume as 'read-only' device.
b83e05
   Enhance validation for thin and cache pool conversion and swapping.
b83e05
 
b83e05
 Version 2.02.186 - 27th August 2019
b83e05
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
b83e05
index dc64159..56608e3 100644
b83e05
--- a/lib/activate/dev_manager.c
b83e05
+++ b/lib/activate/dev_manager.c
b83e05
@@ -84,6 +84,11 @@ int read_only_lv(const struct logical_volume *lv, const struct lv_activate_opts
b83e05
 	if (lv_is_raid_image(lv) || lv_is_raid_metadata(lv))
b83e05
 		return 0; /* Keep RAID SubLvs writable */
b83e05
 
b83e05
+	if (!layer) {
b83e05
+		if (lv_is_thin_pool(lv))
b83e05
+			return 1;
b83e05
+	}
b83e05
+
b83e05
 	return (laopts->read_only || !(lv->status & LVM_WRITE));
b83e05
 }
b83e05