Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=32ad8ab5a4a6cd00…
Commit: 32ad8ab5a4a6cd00f15beb947568a7a5b702f545
Parent: 59ed4d3bf6b1aaf7c3db837251c60ff9004f0879
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 20 11:10:42 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 20 11:13:41 2014 +0200
memlock: skip more entries
Add more entries for memlock skipping - since those are never
used by lvm code in critical section (suspend state).
---
lib/mm/memlock.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index 84b93db..7d9a8f3 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -100,8 +100,10 @@ static const char * const _blacklist_maps[] = {
"/libselinux.so.", /* not using selinux during mlock */
"/libsepol.so.", /* not using sepol during mlock */
"/libtinfo.so.", /* not using tinfo during mlock */
- "/libuuid.so.", /* not using uuid during mlock (blkid) */
+ "/libudev.so.", /* not using udev during mlock */
+ "/libuuid.so.", /* not using uuid during mlock (blkid) */
"/libdl-", /* not using dlopen,dlsym during mlock */
+ "/etc/selinux", /* not using selinux during mlock */
/* "/libdevmapper-event.so" */
};
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=59ed4d3bf6b1aaf7…
Commit: 59ed4d3bf6b1aaf7c3db837251c60ff9004f0879
Parent: c6d82c992b4a4271287233dbedc3a075fa03ca43
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Jun 19 18:20:30 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Jun 19 18:22:51 2014 +0200
dmsetup: no need to check for "help" field name after report init
The "help" field (as well as "?") is implicit now - libdevmapper
takes care of it completely.
---
tools/dmsetup.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 454141e..c679c52 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -2948,9 +2948,6 @@ static int _report_init(const struct command *cmd)
r = 1;
out:
- if (!strcasecmp(options, "help") || !strcmp(options, "?"))
- r = 1;
-
if (len)
dm_free(options);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3964a1a89f525848…
Commit: 3964a1a89f52584878c09cf93bc971b96c0d3de1
Parent: f16da6ef23c75b966f94a27b45ca57bacaa13d20
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Jun 19 10:52:09 2014 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Jun 19 10:52:09 2014 -0500
pvmove: Clean-up iterator.
In 'find_pvmove_lv', separate the code that searches the atomic
pvmove LVs from the code that searches the normal pvmove LVs. This
cleans up the segment iterator code a bit.
---
lib/metadata/mirror.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index ca0c2a1..484b1f1 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -1559,14 +1559,29 @@ struct logical_volume *find_pvmove_lv(struct volume_group *vg,
if (!(lv->status & lv_type))
continue;
- /* Check segment origins point to pvname */
+ /*
+ * If this is an atomic pvmove, the first
+ * segment will be a mirror containing
+ * mimages (i.e. AREA_LVs)
+ */
+ if (seg_type(first_seg(lv), 0) == AREA_LV) {
+ seg = first_seg(lv); /* the mirror segment */
+ seg = first_seg(seg_lv(seg, 0)); /* mimage_0 segment0 */
+ if (seg_dev(seg, 0) != dev)
+ continue;
+ return lv;
+ }
+
+ /*
+ * If this is a normal pvmove, check all the segments'
+ * first areas for the requested device
+ */
dm_list_iterate_items(seg, &lv->segments) {
- if (seg_type(seg, 0) == AREA_LV) /* Atomic pvmove */
- seg = first_seg(seg_lv(seg, 0));
- if (seg_type(seg, 0) != AREA_PV) /* Segment pvmove */
+ if (seg_type(seg, 0) != AREA_PV)
continue;
if (seg_dev(seg, 0) != dev)
continue;
+
return lv;
}
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f16da6ef23c75b96…
Commit: f16da6ef23c75b966f94a27b45ca57bacaa13d20
Parent: a40bc36b2e360ad357820e6de2f5ec9fa64a6772
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Jun 19 15:54:22 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Jun 19 16:14:53 2014 +0200
report: display explicit fields first, then implicit fields in field help
It's better to have implicit fields at the very end of the output
so users can see them without scrolling back if the list of fields
is long (the "help" is also an implicit field now so it should be
easily visible).
---
libdm/libdm-report.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 012dca4..fd03052 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -653,11 +653,12 @@ static void _display_fields(struct dm_report *rh, int display_all_fields_item,
if ((tmp = _get_longest_field_id_len(rh->fields)) > id_len)
id_len = tmp;
- _display_fields_more(rh, _implicit_report_fields, id_len,
- display_all_fields_item, display_field_types);
- log_warn(" ");
_display_fields_more(rh, rh->fields, id_len, display_all_fields_item,
display_field_types);
+ log_warn(" ");
+ _display_fields_more(rh, _implicit_report_fields, id_len,
+ display_all_fields_item, display_field_types);
+
}
/*
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a40bc36b2e360ad3…
Commit: a40bc36b2e360ad357820e6de2f5ec9fa64a6772
Parent: cd7325f18d6869452447b7e1d08d8ada7703e0de
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Jun 19 15:47:24 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Jun 19 16:09:32 2014 +0200
libdevmapper: revoke commit 7c86131233011c9fb81190bcb40d5d4ac54a533d
We have "help" and "?" defined as implicit fields now. As such, we
don't need to export these names in libdevmapper (as it was introduced
by commit 7c86131233011c9fb81190bcb40d5d4ac54a533d within this release).
If anyone uses these field names by mistake, the libdevmapper code can
error out correctly if it detects that the set of explicit field names
(the ones supplied by "fields" arg in dm_report_init/dm_report_init_with_selection)
contains any of the implicit field names (the ones defined internally
by libdevmapper itself).
---
WHATS_NEW_DM | 1 -
libdm/libdevmapper.h | 4 ----
libdm/libdm-report.c | 8 ++++----
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 3d1eee1..119016a 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -19,7 +19,6 @@ Version 1.02.88 -
Document env var 'DM_DEFAULT_NAME_MANGLING_MODE' in dmsetup man page.
Warn user about incorrect use of cookie with 'dmsetup remove --force'.
Also recognize 'help'/'?' as reserved sort key name to show help.
- Export recognized DM_REPORT_FIELD_RESERVED_NAME_{HELP,HELP_ALT} to show help.
Add dm_units_to_factor for size unit parsing.
Increase bitset size for minors for thin dmeventd plugin.
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index fab1071..90e0b51 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -1642,10 +1642,6 @@ struct dm_report_field;
#define DM_REPORT_FIELD_TYPE_ID_LEN 32
#define DM_REPORT_FIELD_TYPE_HEADING_LEN 32
-/* Reserved field names for special purposes. */
-#define DM_REPORT_FIELD_RESERVED_NAME_HELP "help" /* shows help */
-#define DM_REPORT_FIELD_RESERVED_NAME_HELP_ALT "?" /* shows help */
-
struct dm_report;
struct dm_report_field_type {
uint32_t type; /* object type id */
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 8e46f78..012dca4 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -194,8 +194,8 @@ struct row {
*/
#define COMMON_REPORT_TYPE 0x80000000
#define COMMON_FIELD_SELECTED_ID "selected"
-#define COMMON_FIELD_HELP_ID DM_REPORT_FIELD_RESERVED_NAME_HELP
-#define COMMON_FIELD_HELP_ALT_ID DM_REPORT_FIELD_RESERVED_NAME_HELP_ALT
+#define COMMON_FIELD_HELP_ID "help"
+#define COMMON_FIELD_HELP_ALT_ID "?"
static void *_null_returning_fn(void *obj __attribute__((unused)))
{
@@ -2663,8 +2663,8 @@ struct dm_report *dm_report_init_with_selection(uint32_t *report_types,
}
rh->reserved_values = reserved_values;
- if (!strcasecmp(selection, DM_REPORT_FIELD_RESERVED_NAME_HELP) ||
- !strcmp(selection, DM_REPORT_FIELD_RESERVED_NAME_HELP_ALT)) {
+ if (!strcasecmp(selection, COMMON_FIELD_HELP_ID) ||
+ !strcmp(selection, COMMON_FIELD_HELP_ALT_ID)) {
_display_fields(rh, 0, 1);
log_warn(" ");
_display_selection_help(rh);