master - vgsplit: simplify vg creation
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=550536474f2b2ad3ac5...
Commit: 550536474f2b2ad3ac58f1f91aa2325022df53b9
Parent: 5036244ce87f3854c7d6b14ab754f43eceaf24eb
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jun 7 14:30:03 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Jun 10 10:38:32 2019 -0500
vgsplit: simplify vg creation
The way that this command now uses the global lock
followed by a label scan, it can simply check if the
new VG name exists, and if not lock it and create it.
---
lib/metadata/metadata.c | 62 +---------------------
tools/vgsplit.c | 133 ++++++++++-------------------------------------
2 files changed, 29 insertions(+), 166 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index e0a5114..aceac5a 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -985,29 +985,6 @@ int vg_has_unknown_segments(const struct volume_group *vg)
return 0;
}
-struct volume_group *vg_lock_and_create(struct cmd_context *cmd, const char *vg_name, int *exists)
-{
- uint32_t rc;
- struct volume_group *vg;
-
- if (!validate_name(vg_name)) {
- log_error("Invalid vg name %s", vg_name);
- return NULL;
- }
-
- rc = vg_lock_newname(cmd, vg_name);
- if (rc == FAILED_EXIST)
- *exists = 1;
- if (rc != SUCCESS)
- return NULL;
-
- vg = vg_create(cmd, vg_name);
- if (!vg)
- unlock_vg(cmd, NULL, vg_name);
-
- return vg;
-}
-
/*
* Create a VG with default parameters.
*/
@@ -3265,7 +3242,7 @@ static int _vg_read_orphan_pv(struct lvmcache_info *info, void *baton)
/* Make orphan PVs look like a VG. */
struct volume_group *vg_read_orphans(struct cmd_context *cmd, const char *orphan_vgname)
{
- const struct format_type *fmt;
+ const struct format_type *fmt = cmd->fmt;
struct lvmcache_vginfo *vginfo;
struct volume_group *vg = NULL;
struct _vg_read_orphan_baton baton;
@@ -3277,9 +3254,6 @@ struct volume_group *vg_read_orphans(struct cmd_context *cmd, const char *orphan
if (!(vginfo = lvmcache_vginfo_from_vgname(orphan_vgname, NULL)))
return_NULL;
- if (!(fmt = lvmcache_fmt_from_vgname(cmd, orphan_vgname, NULL, 0)))
- return_NULL;
-
vg = fmt->orphan_vg;
dm_list_iterate_items_safe(pvl, tpvl, &vg->pvs)
@@ -3973,40 +3947,6 @@ uint32_t vg_read_error(struct volume_group *vg_handle)
return SUCCESS;
}
-/*
- * Lock a vgname and/or check for existence.
- * Takes a WRITE lock on the vgname before scanning.
- * If scanning fails or vgname found, release the lock.
- * NOTE: If you find the return codes confusing, you might think of this
- * function as similar to an open() call with O_CREAT and O_EXCL flags
- * (open returns fail with -EEXIST if file already exists).
- *
- * Returns:
- * FAILED_LOCKING - Cannot lock name
- * FAILED_EXIST - VG name already exists - cannot reserve
- * SUCCESS - VG name does not exist in system and WRITE lock held
- */
-uint32_t vg_lock_newname(struct cmd_context *cmd, const char *vgname)
-{
- if (!lock_vol(cmd, vgname, LCK_VG_WRITE, NULL))
- return FAILED_LOCKING;
-
- /* Find the vgname in the cache */
- /* If it's not there we must do full scan to be completely sure */
- if (!lvmcache_fmt_from_vgname(cmd, vgname, NULL, 1)) {
- lvmcache_label_scan(cmd);
- if (!lvmcache_fmt_from_vgname(cmd, vgname, NULL, 1)) {
- lvmcache_label_scan(cmd);
- if (!lvmcache_fmt_from_vgname(cmd, vgname, NULL, 0))
- return SUCCESS; /* vgname not found after scanning */
- }
- }
-
- /* Found vgname so cannot reserve. */
- unlock_vg(cmd, NULL, vgname);
- return FAILED_EXIST;
-}
-
struct format_instance *alloc_fid(const struct format_type *fmt,
const struct format_instance_ctx *fic)
{
diff --git a/tools/vgsplit.c b/tools/vgsplit.c
index abf7013..61cb13b 100644
--- a/tools/vgsplit.c
+++ b/tools/vgsplit.c
@@ -446,80 +446,6 @@ static int _move_cache(struct volume_group *vg_from,
}
/*
- * Create or open the destination of the vgsplit operation.
- * Returns
- * - non-NULL: VG handle w/VG lock held
- * - NULL: no VG lock held
- */
-static struct volume_group *_vgsplit_to(struct cmd_context *cmd,
- const char *vg_name_to,
- int *existing_vg)
-{
- struct volume_group *vg_to = NULL;
- int exists = 0;
-
- log_verbose("Checking for new volume group \"%s\"", vg_name_to);
- /*
- * First try to create a new VG. If we cannot create it,
- * and we get FAILED_EXIST (we will not be holding a lock),
- * a VG must already exist with this name. We then try to
- * read the existing VG - the vgsplit will be into an existing VG.
- *
- * Otherwise, if the lock was successful, it must be the case that
- * we obtained a WRITE lock and could not find the vgname in the
- * system. Thus, the split will be into a new VG.
- */
- vg_to = vg_lock_and_create(cmd, vg_name_to, &exists);
- if (!vg_to && !exists) {
- log_error("Can't get lock for %s", vg_name_to);
- release_vg(vg_to);
- return NULL;
- }
- if (!vg_to && exists) {
- *existing_vg = 1;
- release_vg(vg_to);
- vg_to = vg_read_for_update(cmd, vg_name_to, NULL, 0, 0);
-
- if (vg_read_error(vg_to)) {
- release_vg(vg_to);
- return_NULL;
- }
-
- } else if (vg_read_error(vg_to) == SUCCESS) {
- *existing_vg = 0;
- }
- return vg_to;
-}
-
-/*
- * Open the source of the vgsplit operation.
- * Returns
- * - non-NULL: VG handle w/VG lock held
- * - NULL: no VG lock held
- */
-static struct volume_group *_vgsplit_from(struct cmd_context *cmd,
- const char *vg_name_from)
-{
- struct volume_group *vg_from;
-
- log_verbose("Checking for volume group \"%s\"", vg_name_from);
-
- vg_from = vg_read_for_update(cmd, vg_name_from, NULL, 0, 0);
- if (vg_read_error(vg_from)) {
- release_vg(vg_from);
- return NULL;
- }
-
- if (vg_is_shared(vg_from)) {
- log_error("vgsplit not allowed for lock_type %s", vg_from->lock_type);
- unlock_and_release_vg(cmd, vg_from, vg_name_from);
- return NULL;
- }
-
- return vg_from;
-}
-
-/*
* Has the user given an option related to a new vg as the split destination?
*/
static int _new_vg_option_specified(struct cmd_context *cmd)
@@ -537,11 +463,11 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
struct vgcreate_params vp_def;
const char *vg_name_from, *vg_name_to;
struct volume_group *vg_to = NULL, *vg_from = NULL;
+ struct lvmcache_vginfo *vginfo_to;
int opt;
int existing_vg = 0;
int r = ECMD_FAILED;
const char *lv_name;
- int lock_vg_from_first = 1;
if ((arg_is_set(cmd, name_ARG) + argc) < 3) {
log_error("Existing VG, new VG and either physical volumes "
@@ -577,47 +503,44 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
lvmcache_label_scan(cmd);
- if (strcmp(vg_name_to, vg_name_from) < 0)
- lock_vg_from_first = 0;
-
- if (lock_vg_from_first) {
- if (!(vg_from = _vgsplit_from(cmd, vg_name_from)))
- return_ECMD_FAILED;
- /*
- * Set metadata format of original VG.
- * NOTE: We must set the format before calling vg_lock_and_create()
- * since vg_lock_and_create() calls the per-format constructor.
- */
- cmd->fmt = vg_from->fid->fmt;
-
- if (!(vg_to = _vgsplit_to(cmd, vg_name_to, &existing_vg))) {
- unlock_and_release_vg(cmd, vg_from, vg_name_from);
- return_ECMD_FAILED;
+ if (!(vginfo_to = lvmcache_vginfo_from_vgname(vg_name_to, NULL))) {
+ if (!validate_name(vg_name_to)) {
+ log_error("Invalid vg name %s.", vg_name_to);
+ return ECMD_FAILED;
}
- } else {
- if (!(vg_to = _vgsplit_to(cmd, vg_name_to, &existing_vg)))
- return_ECMD_FAILED;
- if (!(vg_from = _vgsplit_from(cmd, vg_name_from))) {
- unlock_and_release_vg(cmd, vg_to, vg_name_to);
- return_ECMD_FAILED;
+ if (!lock_vol(cmd, vg_name_to, LCK_VG_WRITE, NULL)) {
+ log_error("Failed to lock new VG name %s.", vg_name_to);
+ return ECMD_FAILED;
}
- if (cmd->fmt != vg_from->fid->fmt) {
- /* In this case we don't know the vg_from->fid->fmt */
- log_error("Unable to set new VG metadata type based on "
- "source VG format - use -M option.");
- goto bad;
+ if (!(vg_to = vg_create(cmd, vg_name_to))) {
+ log_error("Failed to create new VG %s.", vg_name_to);
+ unlock_vg(cmd, NULL, vg_name_to);
+ return ECMD_FAILED;
+ }
+ } else {
+ if (!(vg_to = vg_read_for_update(cmd, vg_name_to, NULL, 0, 0))) {
+ log_error("Failed to read VG %s.", vg_name_to);
+ return ECMD_FAILED;
}
+ existing_vg = 1;
}
+ if (!(vg_from = vg_read_for_update(cmd, vg_name_from, NULL, 0, 0))) {
+ log_error("Failed to read VG %s.", vg_name_to);
+ unlock_and_release_vg(cmd, vg_to, vg_name_to);
+ return ECMD_FAILED;
+ }
+
+ cmd->fmt = vg_from->fid->fmt;
+
if (existing_vg) {
if (_new_vg_option_specified(cmd)) {
- log_error("Volume group \"%s\" exists, but new VG "
- "option specified", vg_name_to);
+ log_error("Volume group \"%s\" exists, but new VG option specified", vg_name_to);
goto bad;
}
- if (!vgs_are_compatible(cmd, vg_from,vg_to))
+ if (!vgs_are_compatible(cmd, vg_from, vg_to))
goto_bad;
} else {
if (!vgcreate_params_set_defaults(cmd, &vp_def, vg_from)) {
3 years, 11 months
master - lvmcache: remove unused code
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5036244ce87f3854c7d...
Commit: 5036244ce87f3854c7d6b14ab754f43eceaf24eb
Parent: a07cc8dbefc26503b27331dcb1e7632c954fb8cb
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jun 7 13:51:33 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Jun 10 10:38:32 2019 -0500
lvmcache: remove unused code
---
lib/cache/lvmcache.c | 105 --------------------------------------------------
lib/cache/lvmcache.h | 28 -------------
2 files changed, 0 insertions(+), 133 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 60dc848..857a953 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -117,11 +117,6 @@ void lvmcache_unlock_vgname(const char *vgname)
}
}
-int lvmcache_vgs_locked(void)
-{
- return _vgs_locked;
-}
-
/*
* When lvmcache sees a duplicate PV, this is set.
* process_each_pv() can avoid searching for duplicates
@@ -1006,43 +1001,6 @@ int lvmcache_label_scan(struct cmd_context *cmd)
return r;
}
-/*
- * lvmcache_label_scan() detects duplicates in the basic label_scan(), then
- * filters out some dups, and chooses preferred duplicates to use.
- */
-
-void lvmcache_pvscan_duplicate_check(struct cmd_context *cmd)
-{
- struct device_list *devl;
-
- /* Check if label_scan() detected any dups. */
- if (!_found_duplicate_pvs)
- return;
-
- /*
- * Once all the dups are identified, they are moved from the
- * "found" list to the "unused" list to sort out.
- */
- dm_list_splice(&_unused_duplicate_devs, &_found_duplicate_devs);
-
- /*
- * Remove items from the dups list that we know are the same
- * underlying dev, e.g. md components, that we want to just ignore.
- */
- _filter_duplicate_devs(cmd);
-
- /*
- * no more dups after ignoring some
- */
- if (!_found_duplicate_pvs)
- return;
-
- /* Duplicates are found where we would have to pick one. */
-
- dm_list_iterate_items(devl, &_unused_duplicate_devs)
- log_warn("WARNING: found device with duplicate %s", dev_name(devl->dev));
-}
-
int lvmcache_get_vgnameids(struct cmd_context *cmd, int include_internal,
struct dm_list *vgnameids)
{
@@ -1072,49 +1030,6 @@ int lvmcache_get_vgnameids(struct cmd_context *cmd, int include_internal,
return 1;
}
-struct dm_list *lvmcache_get_pvids(struct cmd_context *cmd, const char *vgname,
- const char *vgid)
-{
- struct dm_list *pvids;
- struct lvmcache_vginfo *vginfo;
- struct lvmcache_info *info;
-
- if (!(pvids = str_list_create(cmd->mem))) {
- log_error("pvids list allocation failed");
- return NULL;
- }
-
- if (!(vginfo = lvmcache_vginfo_from_vgname(vgname, vgid)))
- return pvids;
-
- dm_list_iterate_items(info, &vginfo->infos) {
- if (!str_list_add(cmd->mem, pvids,
- dm_pool_strdup(cmd->mem, info->dev->pvid))) {
- log_error("strlist allocation failed");
- return NULL;
- }
- }
-
- return pvids;
-}
-
-int lvmcache_get_vg_devs(struct cmd_context *cmd,
- struct lvmcache_vginfo *vginfo,
- struct dm_list *devs)
-{
- struct lvmcache_info *info;
- struct device_list *devl;
-
- dm_list_iterate_items(info, &vginfo->infos) {
- if (!(devl = dm_pool_zalloc(cmd->mem, sizeof(*devl))))
- return_0;
-
- devl->dev = info->dev;
- dm_list_add(devs, &devl->list);
- }
- return 1;
-}
-
static struct device *_device_from_pvid(const struct id *pvid, uint64_t *label_sector)
{
struct lvmcache_info *info;
@@ -2395,26 +2310,6 @@ uint32_t lvmcache_ext_flags(struct lvmcache_info *info) {
return info->ext_flags;
}
-int lvmcache_is_orphan(struct lvmcache_info *info) {
- if (!info->vginfo)
- return 1; /* FIXME? */
- return is_orphan_vg(info->vginfo->vgname);
-}
-
-int lvmcache_vgid_is_cached(const char *vgid) {
- struct lvmcache_vginfo *vginfo;
-
- vginfo = lvmcache_vginfo_from_vgid(vgid);
-
- if (!vginfo || !vginfo->vgname)
- return 0;
-
- if (is_orphan_vg(vginfo->vgname))
- return 0;
-
- return 1;
-}
-
uint64_t lvmcache_smallest_mda_size(struct lvmcache_info *info)
{
if (!info)
diff --git a/lib/cache/lvmcache.h b/lib/cache/lvmcache.h
index 1921709..379cc9d 100644
--- a/lib/cache/lvmcache.h
+++ b/lib/cache/lvmcache.h
@@ -94,9 +94,6 @@ void lvmcache_unlock_vgname(const char *vgname);
const struct format_type *lvmcache_fmt_from_vgname(struct cmd_context *cmd, const char *vgname, const char *vgid, unsigned revalidate_labels);
int lvmcache_lookup_mda(struct lvmcache_vgsummary *vgsummary);
-/* Decrement and test if there are still vg holders in vginfo. */
-int lvmcache_vginfo_holders_dec_and_test_for_zero(struct lvmcache_vginfo *vginfo);
-
struct lvmcache_vginfo *lvmcache_vginfo_from_vgname(const char *vgname,
const char *vgid);
struct lvmcache_vginfo *lvmcache_vginfo_from_vgid(const char *vgid);
@@ -106,15 +103,10 @@ const char *lvmcache_vgid_from_vgname(struct cmd_context *cmd, const char *vgnam
struct device *lvmcache_device_from_pvid(struct cmd_context *cmd, const struct id *pvid, uint64_t *label_sector);
const char *lvmcache_vgname_from_info(struct lvmcache_info *info);
const struct format_type *lvmcache_fmt_from_info(struct lvmcache_info *info);
-int lvmcache_vgs_locked(void);
int lvmcache_get_vgnameids(struct cmd_context *cmd, int include_internal,
struct dm_list *vgnameids);
-/* Returns list of struct dm_str_list containing pool-allocated copy of pvids */
-struct dm_list *lvmcache_get_pvids(struct cmd_context *cmd, const char *vgname,
- const char *vgid);
-
void lvmcache_drop_metadata(const char *vgname, int drop_precommitted);
void lvmcache_commit_metadata(const char *vgname);
@@ -167,9 +159,7 @@ int lvmcache_foreach_pv(struct lvmcache_vginfo *vginfo,
uint64_t lvmcache_device_size(struct lvmcache_info *info);
void lvmcache_set_device_size(struct lvmcache_info *info, uint64_t size);
struct device *lvmcache_device(struct lvmcache_info *info);
-int lvmcache_is_orphan(struct lvmcache_info *info);
unsigned lvmcache_mda_count(struct lvmcache_info *info);
-int lvmcache_vgid_is_cached(const char *vgid);
uint64_t lvmcache_smallest_mda_size(struct lvmcache_info *info);
struct metadata_area *lvmcache_get_mda(struct cmd_context *cmd,
@@ -180,8 +170,6 @@ struct metadata_area *lvmcache_get_mda(struct cmd_context *cmd,
int lvmcache_found_duplicate_pvs(void);
int lvmcache_found_duplicate_vgnames(void);
-void lvmcache_pvscan_duplicate_check(struct cmd_context *cmd);
-
int lvmcache_get_unused_duplicate_devs(struct cmd_context *cmd, struct dm_list *head);
int vg_has_duplicate_pvs(struct volume_group *vg);
@@ -193,32 +181,16 @@ void lvmcache_get_max_name_lengths(struct cmd_context *cmd,
int lvmcache_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const char *vgid);
-void lvmcache_lock_ordering(int enable);
-
int lvmcache_dev_is_unchosen_duplicate(struct device *dev);
void lvmcache_remove_unchosen_duplicate(struct device *dev);
int lvmcache_pvid_in_unchosen_duplicates(const char *pvid);
-int lvmcache_get_vg_devs(struct cmd_context *cmd,
- struct lvmcache_vginfo *vginfo,
- struct dm_list *devs);
-void lvmcache_set_independent_location(const char *vgname);
-
bool lvmcache_scan_mismatch(struct cmd_context *cmd, const char *vgname, const char *vgid);
int lvmcache_vginfo_has_pvid(struct lvmcache_vginfo *vginfo, char *pvid);
-/*
- * These are clvmd-specific functions and are not related to lvmcache.
- * FIXME: rename these with a clvm_ prefix in place of lvmcache_
- */
-void lvmcache_save_vg(struct volume_group *vg, int precommitted);
-struct volume_group *lvmcache_get_saved_vg(const char *vgid, int precommitted);
-struct volume_group *lvmcache_get_saved_vg_latest(const char *vgid);
-void lvmcache_drop_saved_vgid(const char *vgid);
-
uint64_t lvmcache_max_metadata_size(void);
void lvmcache_save_metadata_size(uint64_t val);
3 years, 11 months
master - reset cmd wipe_outdated_pvs
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a07cc8dbefc26503b27...
Commit: a07cc8dbefc26503b27331dcb1e7632c954fb8cb
Parent: 36cbc6db24f8aa01fb1c1be095b22a672434f754
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Jun 10 10:33:41 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Jun 10 10:34:58 2019 -0500
reset cmd wipe_outdated_pvs
at the start of a command, which is needed in case the cmd
struct is reused.
---
lib/cache/lvmcache.c | 2 +-
tools/lvmcmdline.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 9a3a2e3..60dc848 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -2664,7 +2664,7 @@ void lvmcache_del_outdated_devs(struct cmd_context *cmd,
struct lvmcache_info *info, *info2;
if (!(vginfo = lvmcache_vginfo_from_vgname(vgname, vgid))) {
- log_error(INTERNAL_ERROR "lvmcache_get_outdated_devs no vginfo");
+ log_error(INTERNAL_ERROR "lvmcache_del_outdated_devs no vginfo");
return;
}
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 8091b39..94e527c 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -2942,12 +2942,12 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
!init_filters(cmd, !refresh_done))
return_ECMD_FAILED;
- if (arg_is_set(cmd, readonly_ARG))
- cmd->metadata_read_only = 1;
+ cmd->metadata_read_only = arg_is_set(cmd, readonly_ARG);
+
+ cmd->is_activating = (cmd->command->command_enum == vgchange_activate_CMD) ||
+ (cmd->command->command_enum == lvchange_activate_CMD);
- if ((cmd->command->command_enum == vgchange_activate_CMD) ||
- (cmd->command->command_enum == lvchange_activate_CMD))
- cmd->is_activating = 1;
+ cmd->wipe_outdated_pvs = 0;
/*
* Now that all configs, profiles and command lines args are available,
3 years, 11 months
master - locking: reset global_ex flag at end of cmd
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=36cbc6db24f8aa01fb1...
Commit: 36cbc6db24f8aa01fb1c1be095b22a672434f754
Parent: 4c020b4d4afff51272252f58e5251f79c26f6603
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Jun 10 10:07:30 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Jun 10 10:34:58 2019 -0500
locking: reset global_ex flag at end of cmd
These two flags may be not reset at the end of
the command when the unlock is implicit, which
is a problem if the cmd struct is reused.
Clear the flags in the general fin_locking.
---
lib/locking/locking.c | 10 +++++++++-
lib/locking/locking.h | 2 +-
tools/lvmcmdline.c | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/locking/locking.c b/lib/locking/locking.c
index 630a3bc..c3ea536 100644
--- a/lib/locking/locking.c
+++ b/lib/locking/locking.c
@@ -156,12 +156,20 @@ int init_locking(struct cmd_context *cmd,
return 1;
}
-void fin_locking(void)
+void fin_locking(struct cmd_context *cmd)
{
/* file locking disabled */
if (!_locking.flags)
return;
+ /*
+ * These may be automatically released when the
+ * command ends, without an explicit unlock call,
+ * in which case these flags would not be cleared.
+ */
+ cmd->lockf_global_ex = 0;
+ cmd->lockd_global_ex = 0;
+
_locking.fin_locking();
}
diff --git a/lib/locking/locking.h b/lib/locking/locking.h
index 41faf68..746667a 100644
--- a/lib/locking/locking.h
+++ b/lib/locking/locking.h
@@ -22,7 +22,7 @@
struct logical_volume;
int init_locking(struct cmd_context *cmd, int file_locking_sysinit, int file_locking_readonly, int file_locking_ignorefail);
-void fin_locking(void);
+void fin_locking(struct cmd_context *cmd);
void reset_locking(void);
int vg_write_lock_held(void);
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 30f54e6..8091b39 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -3043,7 +3043,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
ret = cmd->command->fn(cmd, argc, argv);
lvmlockd_disconnect();
- fin_locking();
+ fin_locking(cmd);
if (!_cmd_no_meta_proc(cmd) && find_config_tree_bool(cmd, global_notify_dbus_CFG, NULL))
lvmnotify_send(cmd);
3 years, 11 months
master - Merge remote-tracking branch 'origin/master'
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4c020b4d4afff512722...
Commit: 4c020b4d4afff51272252f58e5251f79c26f6603
Parent: dbc5543cbb1010265d8febeb1489e2c0ab8c456a d7c1168c6ac66fec30ef21c0a59d00d0259ab126
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Jun 10 17:05:04 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Jun 10 17:05:04 2019 +0200
Merge remote-tracking branch 'origin/master'
* origin/master: (22 commits)
tests: add metadata-bad-mdaheader.sh
tests: add metadata-bad-text.sh
tests: add outdated-pv.sh
tests: add metadata-old.sh
tests: add missing-pv missing-pv-unused
metadata.c: removed unused code
improve reading and repairing vg metadata
add a warning message when updating old metadata
vgcfgbackup add error messages
vgck --updatemetadata is a new command
move pv header repairs to vg_write
process_each_pv handle outdated pvs
move wipe_outdated_pvs to vg_write
create separate lvmcache update functions for read and write
fix vg_commit return value
change args for text label read function
add mda arg to add_mda
keep track of which mdas have old metadata in lvmcache
ability to keep track of outdated pvs in lvmcache
ability to keep track of bad mdas in lvmcache
...
lib/cache/lvmcache.c | 468 ++++++-
lib/cache/lvmcache.h | 45 +-
lib/commands/toolcontext.h | 3 +
lib/config/config_settings.h | 25 +-
lib/config/defaults.h | 2 +
lib/device/dev-md.c | 5 +-
lib/device/dev-type.c | 5 +-
lib/device/device.h | 1 +
lib/format_text/format-text.c | 107 +-
lib/format_text/format-text.h | 6 +-
lib/format_text/import.c | 6 +-
lib/format_text/layout.h | 4 +-
lib/format_text/text_label.c | 235 +++-
lib/label/label.c | 69 +-
lib/label/label.h | 2 +-
lib/metadata/metadata-exported.h | 32 +-
lib/metadata/metadata.c | 2199 ++++++++++-----------------
lib/metadata/metadata.h | 18 +-
lib/metadata/pv.h | 1 +
lib/metadata/vg.c | 6 +-
lib/metadata/vg.h | 5 -
test/shell/inconsistent-metadata.sh | 49 +-
test/shell/lvconvert-repair-cache.sh | 3 +
test/shell/lvconvert-repair-policy.sh | 2 +
test/shell/lvconvert-repair-raid.sh | 7 +
test/shell/lvconvert-repair.sh | 6 +
test/shell/lvm-on-md.sh | 75 +-
test/shell/lvmcache-exercise.sh | 10 +-
test/shell/metadata-bad-mdaheader.sh | 80 +
test/shell/metadata-bad-text.sh | 236 +++
test/shell/metadata-old.sh | 177 +++
test/shell/mirror-vgreduce-removemissing.sh | 8 +
test/shell/missing-pv-unused.sh | 86 ++
test/shell/missing-pv.sh | 152 ++
test/shell/outdated-pv.sh | 66 +
test/shell/pv-ext-flags.sh | 34 +-
test/shell/unlost-pv.sh | 52 +-
test/shell/vgck.sh | 4 +-
tools/args.h | 3 +
tools/command-lines.in | 5 +
tools/commands.h | 2 +-
tools/lvmcmdline.c | 55 +-
tools/polldaemon.c | 17 +-
tools/toollib.c | 83 +-
tools/vgcfgbackup.c | 19 +-
tools/vgck.c | 54 +
tools/vgextend.c | 19 +-
tools/vgremove.c | 2 +
tools/vgsplit.c | 7 +-
49 files changed, 2820 insertions(+), 1737 deletions(-)
3 years, 11 months
master - post-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dbc5543cbb1010265d8...
Commit: dbc5543cbb1010265d8febeb1489e2c0ab8c456a
Parent: f1b4aeba664f8739883de1b5df62a24983c5314c
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Jun 10 17:04:30 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Jun 10 17:04:30 2019 +0200
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 5933a47..919d702 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.04(2) (2019-06-10)
+2.03.05(2)-git (2019-06-10)
diff --git a/VERSION_DM b/VERSION_DM
index e7bbd15..6d588a4 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.161 (2019-06-10)
+1.02.163-git (2019-06-10)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4f70938..81cfdd3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.03.05 -
+================================
+
Version 2.03.04 - 10th June 2019
================================
Remove unused_duplicate_devs from cmd causing segfault in dmeventd.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 17507a3..5e67eb7 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.163 -
+=================================
+
Version 1.02.161 - 10th June 2019
=================================
3 years, 11 months
master - pre-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f1b4aeba664f8739883...
Commit: f1b4aeba664f8739883de1b5df62a24983c5314c
Parent: a2c309a5c5eb22a94be0ae2919831a10b0493974
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Jun 10 16:59:49 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Jun 10 16:59:49 2019 +0200
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 ++-
WHATS_NEW_DM | 4 ++--
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/VERSION b/VERSION
index 3a0456f..5933a47 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.04(2)-git (2019-06-07)
+2.03.04(2) (2019-06-10)
diff --git a/VERSION_DM b/VERSION_DM
index 79067a8..e7bbd15 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.161-git (2019-06-07)
+1.02.161 (2019-06-10)
diff --git a/WHATS_NEW b/WHATS_NEW
index c2d3600..4f70938 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
-Version 2.03.04 -
+Version 2.03.04 - 10th June 2019
================================
+ Remove unused_duplicate_devs from cmd causing segfault in dmeventd.
Version 2.03.03 - 07th June 2019
================================
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 49b9a7e..17507a3 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.161 -
-====================================
+Version 1.02.161 - 10th June 2019
+=================================
Version 1.02.159 - 07th June 2019
=================================
3 years, 11 months
master - build: make generate
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a2c309a5c5eb22a94be...
Commit: a2c309a5c5eb22a94be0ae2919831a10b0493974
Parent: 07d41de74c40e6472a708fc0112ad668477305b5
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri Jun 7 17:59:43 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri Jun 7 17:59:43 2019 +0200
build: make generate
---
conf/example.conf.in | 57 ++++++++++++++++++++++++++++++++++++++--
man/lvconvert.8_pregen | 61 ++++++++++++++++++++++++++++++++++++++++---
man/lvcreate.8_pregen | 5 ++-
man/pvck.8_pregen | 67 +++++++++++++++++++++++++++++++++++++++++++++---
4 files changed, 177 insertions(+), 13 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index dfe8006..a5eba01 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -88,6 +88,22 @@ devices {
#
external_device_info_source = "none"
+ # Configuration option devices/hints.
+ # Use a local file to remember which devices have PVs on them.
+ # Some commands will use this as an optimization to reduce device
+ # scanning, and will only scan the listed PVs. Removing the hint file
+ # will cause lvm to generate a new one. Disable hints if PVs will
+ # be copied onto devices using non-lvm commands, like dd.
+ #
+ # Accepted values:
+ # all
+ # Use all hints.
+ # none
+ # Use no hints.
+ #
+ # This configuration option has an automatic default value.
+ # hints = "all"
+
# Configuration option devices/preferred_names.
# Select which path name to display for a block device.
# If multiple path names exist for a block device, and LVM needs to
@@ -167,8 +183,18 @@ devices {
sysfs_scan = 1
# Configuration option devices/scan_lvs.
- # Scan LVM LVs for layered PVs.
- scan_lvs = 1
+ # Scan LVM LVs for layered PVs, allowing LVs to be used as PVs.
+ # When 1, LVM will detect PVs layered on LVs, and caution must be
+ # taken to avoid a host accessing a layered VG that may not belong
+ # to it, e.g. from a guest image. This generally requires excluding
+ # the LVs with device filters. Also, when this setting is enabled,
+ # every LVM command will scan every active LV on the system (unless
+ # filtered), which can cause performance problems on systems with
+ # many active LVs. When this setting is 0, LVM will not detect or
+ # use PVs that exist on LVs, and will not allow a PV to be created on
+ # an LV. The LVs are ignored using a built in device filter that
+ # identifies and excludes LVs.
+ scan_lvs = 0
# Configuration option devices/multipath_component_detection.
# Ignore devices that are components of DM multipath devices.
@@ -720,7 +746,8 @@ log {
# Configuration option log/indent.
# Indent messages according to their severity.
- indent = 1
+ # This configuration option has an automatic default value.
+ # indent = 0
# Configuration option log/command_names.
# Display the command name on each line of output.
@@ -746,6 +773,20 @@ log {
# available: memory, devices, io, activation, allocation,
# metadata, cache, locking, lvmpolld. Use "all" to see everything.
debug_classes = [ "memory", "devices", "io", "activation", "allocation", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
+
+ # Configuration option log/debug_file_fields.
+ # The fields included in debug output written to log file.
+ # Use "all" to include everything (the default).
+ # This configuration option is advanced.
+ # This configuration option has an automatic default value.
+ # debug_file_fields = [ "time", "command", "fileline", "message" ]
+
+ # Configuration option log/debug_output_fields.
+ # The fields included in debug output written to stderr.
+ # Use "all" to include everything (the default).
+ # This configuration option is advanced.
+ # This configuration option has an automatic default value.
+ # debug_output_fields = [ "time", "command", "fileline", "message" ]
}
# Configuration section backup.
@@ -1174,6 +1215,16 @@ global {
# When enabled, an LVM command that changes PVs, changes VG metadata,
# or changes the activation state of an LV will send a notification.
notify_dbus = 1
+
+ # Configuration option global/io_memory_size.
+ # The amount of memory in KiB that LVM allocates to perform disk io.
+ # LVM performance may benefit from more io memory when there are many
+ # disks or VG metadata is large. Increasing this size may be necessary
+ # when a single copy of VG metadata is larger than the current setting.
+ # This value should usually not be decreased from the default; setting
+ # it too low can result in lvm failing to read VGs.
+ # This configuration option has an automatic default value.
+ # io_memory_size = 8192
}
# Configuration section activation.
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 842be37..7252f6f 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -43,6 +43,10 @@ lvconvert - Change logical volume layout
.ad b
.br
.ad l
+ \fB--cachevol\fP \fILV\fP
+.ad b
+.br
+.ad l
\fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT]
.ad b
.br
@@ -567,7 +571,7 @@ Convert LV to a thin LV, using the original LV as an external origin.
.br
-
-Attach a cache to an LV, converts the LV to type cache.
+Attach a cache pool to an LV, converts the LV to type cache.
.br
.P
\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachepool\fP \fILV\fP \fILV\fP\fI_linear_striped_thinpool_vdo_vdopool_vdopooldata_raid\fP
@@ -629,7 +633,7 @@ Attach a cache to an LV, converts the LV to type cache.
Attach a writecache to an LV, converts the LV to type writecache.
.br
.P
-\fBlvconvert\fP \fB--type\fP \fBwritecache\fP \fB--cachepool\fP \fILV\fP \fILV\fP\fI_linear_striped_raid\fP
+\fBlvconvert\fP \fB--type\fP \fBwritecache\fP \fB--cachevol\fP \fILV\fP \fILV\fP\fI_linear_striped_raid\fP
.br
.RS 4
.ad l
@@ -641,6 +645,49 @@ Attach a writecache to an LV, converts the LV to type writecache.
.br
-
+Attach a cache to an LV, converts the LV to type cache.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachevol\fP \fILV\fP \fILV\fP\fI_linear_striped_thinpool_raid\fP
+.br
+.RS 4
+.ad l
+[ \fB-H\fP|\fB--cache\fP ]
+.ad b
+.br
+.ad l
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.ad b
+.br
+.ad l
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.ad b
+.br
+.ad l
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.ad b
+.br
+.ad l
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.ad b
+.br
+.ad l
+[ \fB--cachepolicy\fP \fIString\fP ]
+.ad b
+.br
+.ad l
+[ \fB--cachesettings\fP \fIString\fP ]
+.ad b
+.br
+.ad l
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.ad b
+.br
+[ COMMON_OPTIONS ]
+.RE
+.br
+-
+
Convert LV to type thin-pool.
.br
.P
@@ -1047,7 +1094,7 @@ See \fBlvmcache\fP(7) for more information.
.ad l
\fB--cachepool\fP \fILV\fP
.br
-The name of a cache pool LV.
+The name of a cache pool.
.ad b
.HP
.ad l
@@ -1063,6 +1110,12 @@ See \fBlvmcache\fP(7) for more information.
.ad b
.HP
.ad l
+\fB--cachevol\fP \fILV\fP
+.br
+The name of a cache volume.
+.ad b
+.HP
+.ad l
\fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT]
.br
The size of chunks in a snapshot, cache pool or thin pool.
@@ -1689,7 +1742,7 @@ Convert LV to a thin LV, using the original LV as an external origin
.br
-
-Attach a cache to an LV (infers --type cache).
+Attach a cache pool to an LV (infers --type cache).
.br
.P
\fBlvconvert\fP \fB-H\fP|\fB--cache\fP \fB--cachepool\fP \fILV\fP \fILV\fP\fI_linear_striped_thinpool_vdo_vdopool_vdopooldata_raid\fP
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index f1d9f13..a80f9f5 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -309,7 +309,8 @@ numeric suffix.
In the usage section below, when creating a pool and the name is omitted
the new LV pool name is generated with the
"vpool" for vdo-pools for prefix and a unique numeric suffix.
-Also pool name can be specified together with \fIVG\fP name i.e.:
+
+Pool name can be specified together with \fIVG\fP name i.e.:
vg00/mythinpool.
.SH USAGE
Create a linear LV.
@@ -1097,7 +1098,7 @@ See \fBlvmcache\fP(7) for more information.
.ad l
\fB--cachepool\fP \fILV\fP
.br
-The name of a cache pool LV.
+The name of a cache pool.
.ad b
.HP
.ad l
diff --git a/man/pvck.8_pregen b/man/pvck.8_pregen
index 5277418..6cdfe42 100644
--- a/man/pvck.8_pregen
+++ b/man/pvck.8_pregen
@@ -1,26 +1,58 @@
.TH PVCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
-pvck - Check the consistency of physical volume(s)
+pvck - Check metadata on physical volumes
.
.SH SYNOPSIS
-\fBpvck\fP \fIposition_args\fP
+\fBpvck\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
.br
.SH DESCRIPTION
-pvck checks the LVM metadata for consistency on PVs.
+pvck checks LVM metadata on PVs.
+
+Use the --dump option to extract metadata from PVs for debugging.
+With dump, set --pvmetadatacopies 2 to extract metadata from a
+second metadata area at the end of the device. Use the --file
+option to save the raw metadata to a specified file. (The raw
+metadata is not usable with vgcfgbackup and vgcfgrestore.)
+
.SH USAGE
+Check for metadata on a device
+.br
+.P
\fBpvck\fP \fIPV\fP ...
.br
.RS 4
+[ COMMON_OPTIONS ]
+.RE
+.br
+
+Print metadata from a device
+.br
+.P
+\fBpvck\fP \fB--dump\fP \fIString\fP \fIPV\fP
+.br
+.RS 4
.ad l
-[ \fB--labelsector\fP \fINumber\fP ]
+[ \fB-f\fP|\fB--file\fP \fIString\fP ]
+.ad b
+.br
+.ad l
+[ \fB--[pv]metadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB--labelsector\fP \fINumber\fP ]
+.ad b
+.RE
+
Common options for lvm:
.
.RS 4
@@ -113,6 +145,21 @@ For testing and debugging.
.ad b
.HP
.ad l
+\fB--dump\fP \fIString\fP
+.br
+Dump metadata from a PV. Option values include \fBmetadata\fP
+to print or save the current text metadata, \fBmetadata_area\fP
+to save the entire text metadata area to a file, \fBmetadata_all\fP
+to save the current and any previous complete versions of metadata
+to a file, and \fBheaders\fP to print and check LVM headers.
+.ad b
+.HP
+.ad l
+\fB-f\fP|\fB--file\fP \fIString\fP
+.br
+.ad b
+.HP
+.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
@@ -154,6 +201,18 @@ on the command.
.ad b
.HP
.ad l
+\fB--[pv]metadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.ad b
+.HP
+.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
3 years, 11 months
master - build: autoreconf
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=07d41de74c40e6472a7...
Commit: 07d41de74c40e6472a708fc0112ad668477305b5
Parent: 24bd35b4ce77a5111ee234f554ca139df4b7dd99
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri Jun 7 17:56:56 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri Jun 7 17:56:56 2019 +0200
build: autoreconf
---
configure | 105 ++++++++++++++++++++++++++++++++++++++++++++++++
include/configure.h.in | 6 +-
2 files changed, 108 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index cced7bd..ff3a59b 100755
--- a/configure
+++ b/configure
@@ -742,6 +742,7 @@ CLDNOWHOLEARCHIVE
CLDFLAGS
CACHE
BUILD_DMFILEMAPD
+BUILD_LOCKDDLM_CONTROL
BUILD_LOCKDDLM
BUILD_LOCKDSANLOCK
BUILD_LVMLOCKD
@@ -771,6 +772,8 @@ BLKID_LIBS
BLKID_CFLAGS
NOTIFY_DBUS_LIBS
NOTIFY_DBUS_CFLAGS
+LOCKD_DLM_CONTROL_LIBS
+LOCKD_DLM_CONTROL_CFLAGS
LOCKD_DLM_LIBS
LOCKD_DLM_CFLAGS
LOCKD_SANLOCK_LIBS
@@ -932,6 +935,7 @@ enable_devmapper
enable_lvmpolld
enable_lvmlockd_sanlock
enable_lvmlockd_dlm
+enable_lvmlockd_dlmcontrol
enable_use_lvmlockd
with_lvmlockd_pidfile
enable_use_lvmpolld
@@ -1000,6 +1004,8 @@ LOCKD_SANLOCK_CFLAGS
LOCKD_SANLOCK_LIBS
LOCKD_DLM_CFLAGS
LOCKD_DLM_LIBS
+LOCKD_DLM_CONTROL_CFLAGS
+LOCKD_DLM_CONTROL_LIBS
NOTIFY_DBUS_CFLAGS
NOTIFY_DBUS_LIBS
BLKID_CFLAGS
@@ -1643,6 +1649,8 @@ Optional Features:
--enable-lvmlockd-sanlock
enable the LVM lock daemon using sanlock
--enable-lvmlockd-dlm enable the LVM lock daemon using dlm
+ --enable-lvmlockd-dlmcontrol
+ enable lvmlockd remote refresh using libdlmcontrol
--disable-use-lvmlockd disable usage of LVM lock daemon
--disable-use-lvmpolld disable usage of LVM Poll Daemon
--enable-dmfilemapd enable the dmstats filemap daemon
@@ -1788,6 +1796,10 @@ Some influential environment variables:
C compiler flags for LOCKD_DLM, overriding pkg-config
LOCKD_DLM_LIBS
linker flags for LOCKD_DLM, overriding pkg-config
+ LOCKD_DLM_CONTROL_CFLAGS
+ C compiler flags for LOCKD_DLM_CONTROL, overriding pkg-config
+ LOCKD_DLM_CONTROL_LIBS
+ linker flags for LOCKD_DLM_CONTROL, overriding pkg-config
NOTIFY_DBUS_CFLAGS
C compiler flags for NOTIFY_DBUS, overriding pkg-config
NOTIFY_DBUS_LIBS
@@ -3077,6 +3089,7 @@ case "$host_os" in
BUILD_LVMPOLLD=no
LOCKDSANLOCK=no
LOCKDDLM=no
+ LOCKDDLM_CONTROL=no
ODIRECT=yes
DM_IOCTLS=yes
SELINUX=yes
@@ -10959,6 +10972,97 @@ $as_echo "#define LOCKDDLM_SUPPORT 1" >>confdefs.h
fi
################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockddlmcontrol" >&5
+$as_echo_n "checking whether to build lvmlockddlmcontrol... " >&6; }
+# Check whether --enable-lvmlockd-dlmcontrol was given.
+if test "${enable_lvmlockd_dlmcontrol+set}" = set; then :
+ enableval=$enable_lvmlockd_dlmcontrol; LOCKDDLM_CONTROL=$enableval
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM_CONTROL" >&5
+$as_echo "$LOCKDDLM_CONTROL" >&6; }
+
+BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL
+
+if test "$BUILD_LOCKDDLM_CONTROL" = yes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOCKD_DLM_CONTROL" >&5
+$as_echo_n "checking for LOCKD_DLM_CONTROL... " >&6; }
+
+if test -n "$LOCKD_DLM_CONTROL_CFLAGS"; then
+ pkg_cv_LOCKD_DLM_CONTROL_CFLAGS="$LOCKD_DLM_CONTROL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlmcontrol >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdlmcontrol >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LOCKD_DLM_CONTROL_CFLAGS=`$PKG_CONFIG --cflags "libdlmcontrol >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LOCKD_DLM_CONTROL_LIBS"; then
+ pkg_cv_LOCKD_DLM_CONTROL_LIBS="$LOCKD_DLM_CONTROL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlmcontrol >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdlmcontrol >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LOCKD_DLM_CONTROL_LIBS=`$PKG_CONFIG --libs "libdlmcontrol >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LOCKD_DLM_CONTROL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdlmcontrol >= 3.2" 2>&1`
+ else
+ LOCKD_DLM_CONTROL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdlmcontrol >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LOCKD_DLM_CONTROL_PKG_ERRORS" >&5
+
+ $bailout
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ $bailout
+else
+ LOCKD_DLM_CONTROL_CFLAGS=$pkg_cv_LOCKD_DLM_CONTROL_CFLAGS
+ LOCKD_DLM_CONTROL_LIBS=$pkg_cv_LOCKD_DLM_CONTROL_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_LOCKD_DLM_CONTROL=yes
+fi
+
+$as_echo "#define LOCKDDLM_CONTROL_SUPPORT 1" >>confdefs.h
+
+ BUILD_LVMLOCKD=yes
+fi
+
+################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockd" >&5
$as_echo_n "checking whether to build lvmlockd... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LVMLOCKD" >&5
@@ -13786,6 +13890,7 @@ _ACEOF
+
################################################################################
ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Makefile scripts/lvm2-pvscan
.service scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvmlockd.service scripts/lvmlocks.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile"
diff --git a/include/configure.h.in b/include/configure.h.in
index ce4c326..a43053a 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -295,9 +295,6 @@
/* Define to 1 if you have the `pselect' function. */
#undef HAVE_PSELECT
-/* Define to 1 if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
-
/* Define to 1 if the system has the type `ptrdiff_t'. */
#undef HAVE_PTRDIFF_T
@@ -537,6 +534,9 @@
/* Locale-dependent data */
#undef LOCALEDIR
+/* Define to 1 to include code that uses lvmlockd dlm control option. */
+#undef LOCKDDLM_CONTROL_SUPPORT
+
/* Define to 1 to include code that uses lvmlockd dlm option. */
#undef LOCKDDLM_SUPPORT
3 years, 11 months
v2_03_04 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=081049e26fa9476070c...
Commit: 081049e26fa9476070c0cf902f63de566fb397c1
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2019-06-10 15:01 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2019-06-10 15:01 +0000
annotated tag: v2_03_04 has been created
at 081049e26fa9476070c0cf902f63de566fb397c1 (tag)
tagging f1b4aeba664f8739883de1b5df62a24983c5314c (commit)
replaces v2_03_03
Release 2.03.04
Bugfix Release
Fix configure file.
Fix segfault in dmeventd.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJc/nE8AAoJELkRJDHlCQOffqkP/Ag7HjJQBC0IYUStco5rWwL5
olbGaKuyq+wQ8Rv6HvNT7pk7QUHvReoLd74LeZ3MfKFPR7oxIXmGq+hQVcNxs0hP
CpnvGMKp1hZA+v4DMtXv5tufwOMzGRp6rtYvBR1S8z++/NYVI10TqPB8Ud8GIAbu
d/8idfLGdd2Zwxesr+O87PmpH4bYib/1qUMWTpVwwifKa5VpLgsqVzESEEt+WXZ/
7rUvd6+VXlfVc2qEdDr0AyRT3kaxD7F9099bRdinH66gy0j0qn3hUpeoFNBZD0gL
t55GzDuMCv0mDQCaKaqlu4sK/GF255sEoig5/WoJUrh7Cerf2nSDSVwfa+EQkxML
Ck6d9XGS9SkeE/hZoPdcg1L6sSpQ03k67OgWr5EG5Qm3WZ9zfFuu1VCzHTdENTVz
eEePh4wq3CE0428grHrxz2W0AcwcoxsVl5laBbO/utw5+/1LNlsZ5DEPwQXx+Xu7
ZQDpu7HKsji0obtIraU77TQjbkRNNjEEr0OZvqRnWB8Pa6vZc7Sq3fEFVA3equ7Q
1ACqpIZdwT3cGUHqroKzvATuPDR5rgdzzOK+b789b/L8BlHSZvKfZW5/0xwjlphF
m2RQuZVDyhuek6RsjB5qReRtHiCFrsSeatSwINTFnu/cSbSQOMjI0W2gLR+oxom/
llFQXUjtBdgHa+OaynAJ
=Yuos
-----END PGP SIGNATURE-----
David Teigland (1):
lvmcache: remove unused_duplicate_devs list from cmd
Marian Csontos (5):
post-release
Merge remote-tracking branch 'origin/master'
build: autoreconf
build: make generate
pre-release
3 years, 11 months