mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: detect discards for non-power-2
Check if target supports discards for chunk sizes, that are not power of 2 (just multiple of 64K), and enable it in case it's supported by thin kernel target.
This commit is contained in:
parent
668b669d5b
commit
683b1f0625
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user