mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: relocate section
Move _features[] structure from .data.rel.ro to .rodata.
This commit is contained in:
parent
83c0b19f61
commit
9a371639fc
@ -307,13 +307,13 @@ static int _target_present(struct cmd_context *cmd,
|
||||
{
|
||||
/* List of features with their kernel target version */
|
||||
static const struct feature {
|
||||
uint32_t maj;
|
||||
uint32_t min;
|
||||
unsigned cache_feature;
|
||||
unsigned cache_alias;
|
||||
uint16_t maj;
|
||||
uint16_t min;
|
||||
uint16_t cache_feature;
|
||||
uint16_t cache_alias;
|
||||
const char feature[12];
|
||||
const char module[12]; /* check dm-%s */
|
||||
const char *aliasing;
|
||||
const char aliasing[24];
|
||||
} _features[] = {
|
||||
{ 1, 10, CACHE_FEATURE_METADATA2, 0, "metadata2" },
|
||||
/* Assumption: cache >=1.9 always aliases MQ policy */
|
||||
@ -369,7 +369,7 @@ static int _target_present(struct cmd_context *cmd,
|
||||
module_present(cmd, _features[i].module)) {
|
||||
log_debug_activation("Cache policy %s is available%s.",
|
||||
_features[i].module,
|
||||
_features[i].aliasing ? : "");
|
||||
_features[i].aliasing);
|
||||
_attrs |= (_features[i].cache_feature | _features[i].cache_alias);
|
||||
} else if (!_features[i].cache_alias)
|
||||
log_very_verbose("Target %s does not support %s.",
|
||||
|
@ -508,11 +508,11 @@ out:
|
||||
|
||||
/* Define raid feature based on the tuple(major, minor, patchlevel) of raid target */
|
||||
struct raid_feature {
|
||||
uint32_t maj;
|
||||
uint32_t min;
|
||||
uint32_t patchlevel;
|
||||
unsigned raid_feature;
|
||||
const char *feature;
|
||||
uint16_t maj;
|
||||
uint16_t min;
|
||||
uint16_t patchlevel;
|
||||
uint16_t raid_feature;
|
||||
const char feature[24];
|
||||
};
|
||||
|
||||
/* Return true if tuple(@maj, @min, @patchlevel) is greater/equal to @*feature members */
|
||||
|
@ -660,10 +660,10 @@ static int _thin_target_present(struct cmd_context *cmd,
|
||||
{
|
||||
/* List of features with their kernel target version */
|
||||
static const struct feature {
|
||||
uint32_t maj;
|
||||
uint32_t min;
|
||||
unsigned thin_feature;
|
||||
const char *feature;
|
||||
uint16_t maj;
|
||||
uint16_t min;
|
||||
uint16_t thin_feature;
|
||||
const char feature[24];
|
||||
} _features[] = {
|
||||
{ 1, 1, THIN_FEATURE_DISCARDS, "discards" },
|
||||
{ 1, 1, THIN_FEATURE_EXTERNAL_ORIGIN, "external_origin" },
|
||||
|
@ -421,11 +421,11 @@ static int _vdo_target_present(struct cmd_context *cmd,
|
||||
{
|
||||
/* List of features with their kernel target version */
|
||||
static const struct feature {
|
||||
uint32_t maj;
|
||||
uint32_t min;
|
||||
uint32_t patchlevel;
|
||||
unsigned vdo_feature;
|
||||
const char *feature;
|
||||
uint16_t maj;
|
||||
uint16_t min;
|
||||
uint16_t patchlevel;
|
||||
uint16_t vdo_feature;
|
||||
const char feature[24];
|
||||
} _features[] = {
|
||||
{ 6, 2, 3, VDO_FEATURE_ONLINE_RENAME, "online_rename" },
|
||||
{ 8, 2, 0, VDO_FEATURE_VERSION4, "version4" },
|
||||
|
Loading…
Reference in New Issue
Block a user