diff --git a/WHATS_NEW b/WHATS_NEW index 2ea3f2bd0..068f453a4 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Support discards for non-power-of-2 thin pool chunks. Automatically restore MISSING PVs with no MDAs. When no '-i' argument is given for RAID10, default to 2 stripes. Do not allow --splitmirrors on RAID10 logical volumes. diff --git a/lib/activate/activate.h b/lib/activate/activate.h index ba24d2a58..0a0c97eaa 100644 --- a/lib/activate/activate.h +++ b/lib/activate/activate.h @@ -51,6 +51,7 @@ enum { THIN_FEATURE_EXTERNAL_ORIGIN = (1 << 1), THIN_FEATURE_HELD_ROOT = (1 << 2), THIN_FEATURE_BLOCK_SIZE = (1 << 3), + THIN_FEATURE_DISCARDS_NON_POWER_2 = (1 << 4), }; void set_activation(int activation); diff --git a/lib/thin/thin.c b/lib/thin/thin.c index 2b6c71f14..693b8b694 100644 --- a/lib/thin/thin.c +++ b/lib/thin/thin.c @@ -565,6 +565,12 @@ static int _thin_target_present(struct cmd_context *cmd, /* FIXME Log this as WARNING later only if the user asked for the feature to be used but it's not present */ log_debug("Target " THIN_MODULE " does not support non power of 2 block sizes."); + if (maj >=1 && min >= 5) + _attrs |= THIN_FEATURE_DISCARDS_NON_POWER_2; + else + /* FIXME Log this as WARNING later only if the user asked for the feature to be used but it's not present */ + log_debug("Target " THIN_MODULE " does not support discards for non power of 2 block sizes."); + _checked = 1; }