mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Start using 64-bit status flags - most of the code already handles them.
tdata -> tpool remove commented out definitions from metadata.h formatting clean-ups
This commit is contained in:
parent
e9047f4f9c
commit
2ef5b7cca6
@ -1,5 +1,6 @@
|
||||
Version 2.02.89 -
|
||||
==================================
|
||||
Begin using 64-bit status field flags.
|
||||
Detect sscanf recovering_region input error in cmirrord pull_state().
|
||||
Fix error path bitmap leak in cmirrord import_checkpoint().
|
||||
Log unlink() error in cmirrord remove_lockfile().
|
||||
|
@ -2353,7 +2353,7 @@ static int _lv_insert_empty_sublvs(struct logical_volume *lv,
|
||||
} else if (segtype_is_thin_pool(segtype)) {
|
||||
// lv->status |= THIN_POOL;
|
||||
// status = THIN_IMAGE;
|
||||
layer_name = "tdata";
|
||||
layer_name = "tpool";
|
||||
} else
|
||||
return_0;
|
||||
|
||||
|
@ -42,55 +42,55 @@
|
||||
/* Various flags */
|
||||
/* Note that the bits no longer necessarily correspond to LVM1 disk format */
|
||||
|
||||
#define PARTIAL_VG 0x00000001U /* VG */
|
||||
#define EXPORTED_VG 0x00000002U /* VG PV */
|
||||
#define RESIZEABLE_VG 0x00000004U /* VG */
|
||||
|
||||
/*
|
||||
* Since the RAID flags are LV (and seg) only and the above three
|
||||
* are VG/PV only, these flags are reused.
|
||||
*/
|
||||
#define RAID 0x00000001U /* LV */
|
||||
#define RAID_META 0x00000002U /* LV */
|
||||
#define RAID_IMAGE 0x00000004U /* LV */
|
||||
#define PARTIAL_VG UINT64_C(0x00000001) /* VG */
|
||||
#define EXPORTED_VG UINT64_C(0x00000002) /* VG PV */
|
||||
#define RESIZEABLE_VG UINT64_C(0x00000004) /* VG */
|
||||
|
||||
/* May any free extents on this PV be used or must they be left free? */
|
||||
#define ALLOCATABLE_PV 0x00000008U /* PV */
|
||||
#define ALLOCATABLE_PV UINT64_C(0x00000008) /* PV */
|
||||
|
||||
//#define SPINDOWN_LV 0x00000010U /* LV */
|
||||
//#define BADBLOCK_ON 0x00000020U /* LV */
|
||||
#define VISIBLE_LV 0x00000040U /* LV */
|
||||
#define FIXED_MINOR 0x00000080U /* LV */
|
||||
//#define SPINDOWN_LV UINT64_C(0x00000010) /* LV */
|
||||
//#define BADBLOCK_ON UINT64_C(0x00000020) /* LV */
|
||||
#define VISIBLE_LV UINT64_C(0x00000040) /* LV */
|
||||
#define FIXED_MINOR UINT64_C(0x00000080) /* LV */
|
||||
/* FIXME Remove when metadata restructuring is completed */
|
||||
#define SNAPSHOT 0x00001000U /* LV - internal use only */
|
||||
#define PVMOVE 0x00002000U /* VG LV SEG */
|
||||
#define LOCKED 0x00004000U /* LV */
|
||||
#define MIRRORED 0x00008000U /* LV - internal use only */
|
||||
//#define VIRTUAL 0x00010000U /* LV - internal use only */
|
||||
#define MIRROR_LOG 0x00020000U /* LV */
|
||||
#define MIRROR_IMAGE 0x00040000U /* LV */
|
||||
#define LV_NOTSYNCED 0x00080000U /* LV */
|
||||
//#define PRECOMMITTED 0x00200000U /* VG - internal use only */
|
||||
#define CONVERTING 0x00400000U /* LV */
|
||||
#define SNAPSHOT UINT64_C(0x00001000) /* LV - internal use only */
|
||||
#define PVMOVE UINT64_C(0x00002000) /* VG LV SEG */
|
||||
#define LOCKED UINT64_C(0x00004000) /* LV */
|
||||
#define MIRRORED UINT64_C(0x00008000) /* LV - internal use only */
|
||||
//#define VIRTUAL UINT64_C(0x00010000) /* LV - internal use only */
|
||||
#define MIRROR_LOG UINT64_C(0x00020000) /* LV */
|
||||
#define MIRROR_IMAGE UINT64_C(0x00040000) /* LV */
|
||||
#define LV_NOTSYNCED UINT64_C(0x00080000) /* LV */
|
||||
//#define PRECOMMITTED UINT64_C(0x00200000) /* VG - internal use only */
|
||||
#define CONVERTING UINT64_C(0x00400000) /* LV */
|
||||
|
||||
#define MISSING_PV 0x00800000U /* PV */
|
||||
#define PARTIAL_LV 0x01000000U /* LV - derived flag, not
|
||||
#define MISSING_PV UINT64_C(0x00800000) /* PV */
|
||||
#define PARTIAL_LV UINT64_C(0x01000000) /* LV - derived flag, not
|
||||
written out in metadata*/
|
||||
|
||||
//#define POSTORDER_FLAG 0x02000000U /* Not real flags, reserved for
|
||||
//#define POSTORDER_OPEN_FLAG 0x04000000U temporary use inside vg_read_internal. */
|
||||
//#define VIRTUAL_ORIGIN 0x08000000U /* LV - internal use only */
|
||||
//#define POSTORDER_FLAG UINT64_C(0x02000000) /* Not real flags, reserved for
|
||||
//#define POSTORDER_OPEN_FLAG UINT64_C(0x04000000) temporary use inside vg_read_internal. */
|
||||
//#define VIRTUAL_ORIGIN UINT64_C(0x08000000) /* LV - internal use only */
|
||||
|
||||
#define MERGING 0x10000000U /* LV SEG */
|
||||
#define MERGING UINT64_C(0x10000000) /* LV SEG */
|
||||
|
||||
#define REPLICATOR 0x20000000U /* LV -internal use only for replicator */
|
||||
#define REPLICATOR_LOG 0x40000000U /* LV -internal use only for replicator-dev */
|
||||
#define UNLABELLED_PV 0x80000000U /* PV -this PV had no label written yet */
|
||||
#define REPLICATOR UINT64_C(0x20000000) /* LV -internal use only for replicator */
|
||||
#define REPLICATOR_LOG UINT64_C(0x40000000) /* LV -internal use only for replicator-dev */
|
||||
#define UNLABELLED_PV UINT64_C(0x80000000) /* PV -this PV had no label written yet */
|
||||
|
||||
#define LVM_READ 0x00000100U /* LV VG */
|
||||
#define LVM_WRITE 0x00000200U /* LV VG */
|
||||
#define CLUSTERED 0x00000400U /* VG */
|
||||
//#define SHARED 0x00000800U /* VG */
|
||||
#define RAID UINT64_C(0x0000000100000000) /* LV */
|
||||
#define RAID_META UINT64_C(0x0000000200000000) /* LV */
|
||||
#define RAID_IMAGE UINT64_C(0x0000000400000000) /* LV */
|
||||
|
||||
#define THIN_VOLUME UINT64_C(0x0000001000000000) /* LV */
|
||||
#define THIN_POOL UINT64_C(0x0000002000000000) /* LV */
|
||||
|
||||
#define LVM_READ 0x00000100U /* LV VG 32-bit */
|
||||
#define LVM_WRITE 0x00000200U /* LV VG 32-bit */
|
||||
|
||||
#define CLUSTERED UINT64_C(0x00000400) /* VG */
|
||||
//#define SHARED UINT64_C(0x00000800) /* VG */
|
||||
|
||||
/* Format features flags */
|
||||
#define FMT_SEGMENTS 0x00000001U /* Arbitrary segment params? */
|
||||
@ -773,12 +773,12 @@ int lv_read_replicator_vgs(struct logical_volume *lv);
|
||||
void lv_release_replicator_vgs(struct logical_volume *lv);
|
||||
|
||||
struct logical_volume *find_pvmove_lv(struct volume_group *vg,
|
||||
struct device *dev, uint32_t lv_type);
|
||||
struct device *dev, uint64_t lv_type);
|
||||
struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd,
|
||||
struct volume_group *vg,
|
||||
const char *name,
|
||||
const char *uuid,
|
||||
uint32_t lv_type);
|
||||
uint64_t lv_type);
|
||||
struct logical_volume *find_pvmove_lv_in_lv(struct logical_volume *lv);
|
||||
const char *get_pvmove_pvname_from_lv(struct logical_volume *lv);
|
||||
const char *get_pvmove_pvname_from_lv_mirr(struct logical_volume *lv_mirr);
|
||||
|
@ -49,54 +49,23 @@
|
||||
|
||||
|
||||
/* Various flags */
|
||||
/* See metadata-exported.h for the complete list. */
|
||||
/* Note that the bits no longer necessarily correspond to LVM1 disk format */
|
||||
|
||||
//#define PARTIAL_VG 0x00000001U /* VG */
|
||||
//#define EXPORTED_VG 0x00000002U /* VG PV */
|
||||
//#define RESIZEABLE_VG 0x00000004U /* VG */
|
||||
|
||||
/* May any free extents on this PV be used or must they be left free? */
|
||||
//#define ALLOCATABLE_PV 0x00000008U /* PV */
|
||||
|
||||
#define SPINDOWN_LV 0x00000010U /* LV */
|
||||
#define BADBLOCK_ON 0x00000020U /* LV */
|
||||
//#define VISIBLE_LV 0x00000040U /* LV */
|
||||
//#define FIXED_MINOR 0x00000080U /* LV */
|
||||
/* FIXME Remove when metadata restructuring is completed */
|
||||
//#define SNAPSHOT 0x00001000U /* LV - internal use only */
|
||||
//#define PVMOVE 0x00002000U /* VG LV SEG */
|
||||
//#define LOCKED 0x00004000U /* LV */
|
||||
//#define MIRRORED 0x00008000U /* LV - internal use only */
|
||||
#define VIRTUAL 0x00010000U /* LV - internal use only */
|
||||
//#define MIRROR_LOG 0x00020000U /* LV */
|
||||
//#define MIRROR_IMAGE 0x00040000U /* LV */
|
||||
//#define MIRROR_NOTSYNCED 0x00080000U /* LV */
|
||||
#define PRECOMMITTED 0x00200000U /* VG - internal use only */
|
||||
//#define CONVERTING 0x00400000U /* LV */
|
||||
#define SPINDOWN_LV UINT64_C(0x00000010) /* LV */
|
||||
#define BADBLOCK_ON UINT64_C(0x00000020) /* LV */
|
||||
#define VIRTUAL UINT64_C(0x00010000) /* LV - internal use only */
|
||||
#define PRECOMMITTED UINT64_C(0x00200000) /* VG - internal use only */
|
||||
#define POSTORDER_FLAG UINT64_C(0x02000000) /* Not real flags, reserved for */
|
||||
#define POSTORDER_OPEN_FLAG UINT64_C(0x04000000) /* temporary use inside vg_read_internal. */
|
||||
#define VIRTUAL_ORIGIN UINT64_C(0x08000000) /* LV - internal use only */
|
||||
|
||||
//#define MISSING_PV 0x00800000U /* PV */
|
||||
//#define PARTIAL_LV 0x01000000U /* LV - derived flag, not
|
||||
// written out in metadata*/
|
||||
|
||||
#define POSTORDER_FLAG 0x02000000U /* Not real flags, reserved for */
|
||||
#define POSTORDER_OPEN_FLAG 0x04000000U /* temporary use inside vg_read_internal. */
|
||||
#define VIRTUAL_ORIGIN 0x08000000U /* LV - internal use only */
|
||||
|
||||
//#define LVM_READ 0x00000100U /* LV VG */
|
||||
//#define LVM_WRITE 0x00000200U /* LV VG */
|
||||
//#define CLUSTERED 0x00000400U /* VG */
|
||||
#define SHARED 0x00000800U /* VG */
|
||||
#define SHARED UINT64_C(0x00000800) /* VG */
|
||||
|
||||
/* Format features flags */
|
||||
//#define FMT_SEGMENTS 0x00000001U /* Arbitrary segment params? */
|
||||
//#define FMT_MDAS 0x00000002U /* Proper metadata areas? */
|
||||
//#define FMT_TAGS 0x00000004U /* Tagging? */
|
||||
//#define FMT_UNLIMITED_VOLS 0x00000008U /* Unlimited PVs/LVs? */
|
||||
//#define FMT_RESTRICTED_LVIDS 0x00000010U /* LVID <= 255 */
|
||||
//#define FMT_ORPHAN_ALLOCATABLE 0x00000020U /* Orphan PV allocatable? */
|
||||
#define FMT_PRECOMMIT 0x00000040U /* Supports pre-commit? */
|
||||
//#define FMT_RESIZE_PV 0x00000080U /* Supports pvresize? */
|
||||
//#define FMT_UNLIMITED_STRIPESIZE 0x00000100U /* Unlimited stripe size? */
|
||||
|
||||
struct dm_config_tree;
|
||||
struct metadata_area;
|
||||
|
@ -1528,7 +1528,7 @@ const char *get_pvmove_pvname_from_lv(struct logical_volume *lv)
|
||||
|
||||
struct logical_volume *find_pvmove_lv(struct volume_group *vg,
|
||||
struct device *dev,
|
||||
uint32_t lv_type)
|
||||
uint64_t lv_type)
|
||||
{
|
||||
struct lv_list *lvl;
|
||||
struct logical_volume *lv;
|
||||
@ -1558,7 +1558,7 @@ struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd,
|
||||
struct volume_group *vg,
|
||||
const char *name,
|
||||
const char *uuid __attribute__((unused)),
|
||||
uint32_t lv_type)
|
||||
uint64_t lv_type)
|
||||
{
|
||||
struct physical_volume *pv;
|
||||
struct logical_volume *lv;
|
||||
|
@ -359,7 +359,7 @@ static int _shift_and_rename_image_components(struct lv_segment *seg)
|
||||
*/
|
||||
static int _alloc_image_component(struct logical_volume *lv,
|
||||
struct alloc_handle *ah, uint32_t first_area,
|
||||
uint32_t type, struct logical_volume **new_lv)
|
||||
uint64_t type, struct logical_volume **new_lv)
|
||||
{
|
||||
uint64_t status;
|
||||
size_t len = strlen(lv->name) + 32;
|
||||
|
@ -342,7 +342,7 @@ static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attrib
|
||||
struct volume_group *vg,
|
||||
const char *name,
|
||||
const char *uuid,
|
||||
uint32_t lv_type __attribute__((unused)))
|
||||
uint64_t lv_type __attribute__((unused)))
|
||||
{
|
||||
struct logical_volume *lv = find_lv(vg, name);
|
||||
|
||||
|
@ -283,7 +283,7 @@ static void _poll_for_all_vgs(struct cmd_context *cmd,
|
||||
*/
|
||||
int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
|
||||
unsigned background,
|
||||
uint32_t lv_type, struct poll_functions *poll_fns,
|
||||
uint64_t lv_type, struct poll_functions *poll_fns,
|
||||
const char *progress_title)
|
||||
{
|
||||
struct daemon_parms parms;
|
||||
|
@ -36,7 +36,7 @@ struct poll_functions {
|
||||
struct volume_group *vg,
|
||||
const char *name,
|
||||
const char *uuid,
|
||||
uint32_t lv_type);
|
||||
uint64_t lv_type);
|
||||
progress_t (*poll_progress)(struct cmd_context *cmd,
|
||||
struct logical_volume *lv,
|
||||
const char *name,
|
||||
@ -59,13 +59,13 @@ struct daemon_parms {
|
||||
unsigned outstanding_count;
|
||||
unsigned progress_display;
|
||||
const char *progress_title;
|
||||
uint32_t lv_type;
|
||||
uint64_t lv_type;
|
||||
struct poll_functions *poll_fns;
|
||||
};
|
||||
|
||||
int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
|
||||
unsigned background,
|
||||
uint32_t lv_type, struct poll_functions *poll_fns,
|
||||
uint64_t lv_type, struct poll_functions *poll_fns,
|
||||
const char *progress_title);
|
||||
|
||||
progress_t poll_mirror_progress(struct cmd_context *cmd,
|
||||
|
Loading…
Reference in New Issue
Block a user