mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
cleanup: relocate segment flags
Move flags for segments to segtype header where it seems more closely related as the features are related to segtype and not activation. Use unsigned #define - since it's more common in lvm2 source code for bit flags.
This commit is contained in:
parent
47b15b805e
commit
07ba047116
@ -52,31 +52,6 @@ struct lv_activate_opts {
|
|||||||
* that follows. */
|
* that follows. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* target attribute flags */
|
|
||||||
#define MIRROR_LOG_CLUSTERED 0x00000001U
|
|
||||||
|
|
||||||
/* snapshot target attribute flags */
|
|
||||||
enum {
|
|
||||||
SNAPSHOT_FEATURE_FIXED_LEAK = (1 << 0), /* version 1.12 */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* thin target attribute flags */
|
|
||||||
enum {
|
|
||||||
/* bitfields - new features from 1.1 version */
|
|
||||||
THIN_FEATURE_DISCARDS = (1 << 0),
|
|
||||||
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),
|
|
||||||
THIN_FEATURE_METADATA_RESIZE = (1 << 5),
|
|
||||||
THIN_FEATURE_EXTERNAL_ORIGIN_EXTEND = (1 << 6),
|
|
||||||
};
|
|
||||||
|
|
||||||
/* raid target attribute flags */
|
|
||||||
enum {
|
|
||||||
RAID_FEATURE_RAID10 = (1 << 0), /* version 1.3 */
|
|
||||||
};
|
|
||||||
|
|
||||||
void set_activation(int activation);
|
void set_activation(int activation);
|
||||||
int activation(void);
|
int activation(void);
|
||||||
|
|
||||||
|
@ -141,6 +141,9 @@ struct segment_type *init_error_segtype(struct cmd_context *cmd);
|
|||||||
struct segment_type *init_free_segtype(struct cmd_context *cmd);
|
struct segment_type *init_free_segtype(struct cmd_context *cmd);
|
||||||
struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
|
struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
|
#define RAID_FEATURE_RAID10 (1U << 0) /* version 1.3 */
|
||||||
|
|
||||||
#ifdef RAID_INTERNAL
|
#ifdef RAID_INTERNAL
|
||||||
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
||||||
#endif
|
#endif
|
||||||
@ -149,6 +152,14 @@ int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
|||||||
int init_replicator_segtype(struct cmd_context *cmd, struct segtype_library *seglib);
|
int init_replicator_segtype(struct cmd_context *cmd, struct segtype_library *seglib);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define THIN_FEATURE_DISCARDS (1U << 0)
|
||||||
|
#define THIN_FEATURE_EXTERNAL_ORIGIN (1U << 1)
|
||||||
|
#define THIN_FEATURE_HELD_ROOT (1U << 2)
|
||||||
|
#define THIN_FEATURE_BLOCK_SIZE (1U << 3)
|
||||||
|
#define THIN_FEATURE_DISCARDS_NON_POWER_2 (1U << 4)
|
||||||
|
#define THIN_FEATURE_METADATA_RESIZE (1U << 5)
|
||||||
|
#define THIN_FEATURE_EXTERNAL_ORIGIN_EXTEND (1U << 6)
|
||||||
|
|
||||||
#ifdef THIN_INTERNAL
|
#ifdef THIN_INTERNAL
|
||||||
int init_thin_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
int init_thin_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
||||||
#endif
|
#endif
|
||||||
@ -157,10 +168,14 @@ int init_thin_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
|||||||
int init_cache_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
int init_cache_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SNAPSHOT_FEATURE_FIXED_LEAK (1U << 0) /* version 1.12 */
|
||||||
|
|
||||||
#ifdef SNAPSHOT_INTERNAL
|
#ifdef SNAPSHOT_INTERNAL
|
||||||
struct segment_type *init_snapshot_segtype(struct cmd_context *cmd);
|
struct segment_type *init_snapshot_segtype(struct cmd_context *cmd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MIRROR_LOG_CLUSTERED (1U << 0)
|
||||||
|
|
||||||
#ifdef MIRRORED_INTERNAL
|
#ifdef MIRRORED_INTERNAL
|
||||||
struct segment_type *init_mirrored_segtype(struct cmd_context *cmd);
|
struct segment_type *init_mirrored_segtype(struct cmd_context *cmd);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user