master - format_text: Log additional circular buffer information.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=46393bfca0692ebddbe...
Commit: 46393bfca0692ebddbecdfb1f3b8699c3caa4f16
Parent: 49d486319fa6cb48e693c364ee6d72e4b6c364d2
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Dec 11 15:59:40 2017 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Dec 11 16:07:34 2017 +0000
format_text: Log additional circular buffer information.
---
lib/format_text/format-text.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index adaf0a8..0dbab11 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -541,8 +541,8 @@ static struct volume_group *_vg_read_raw_area(struct format_instance *fid,
wrap = (uint32_t) ((rlocn->offset + rlocn->size) - mdah->size);
if (wrap > rlocn->offset) {
- log_error("VG %s metadata too large for circular buffer",
- vgname);
+ log_error("VG %s metadata on %s (" FMTu64 " bytes) too large for circular buffer (" FMTu64 " bytes)",
+ vgname, dev_name(area->dev), rlocn->size, mdah->size - MDA_HEADER_SIZE);
goto out;
}
@@ -672,14 +672,14 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
if ((new_wrap && old_wrap) ||
(rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset)) ||
(MDA_HEADER_SIZE + (rlocn ? rlocn->size : 0) + mdac->rlocn.size >= mdah->size)) {
- log_error("VG %s metadata too large for circular buffer",
- vg->name);
+ log_error("VG %s metadata on %s (" FMTu64 " bytes) too large for circular buffer (" FMTu64 " bytes with " FMTu64 " used)",
+ vg->name, dev_name(mdac->area.dev), mdac->rlocn.size, mdah->size - MDA_HEADER_SIZE, rlocn ? rlocn->size : 0);
goto out;
}
- log_debug_metadata("Writing %s metadata to %s at " FMTu64 " len " FMTu64,
+ log_debug_metadata("Writing %s metadata to %s at " FMTu64 " len " FMTu64 " of " FMTu64,
vg->name, dev_name(mdac->area.dev), mdac->area.start +
- mdac->rlocn.offset, mdac->rlocn.size - new_wrap);
+ mdac->rlocn.offset, mdac->rlocn.size - new_wrap, mdac->rlocn.size);
/* Write text out, circularly */
if (!dev_write(mdac->area.dev, mdac->area.start + mdac->rlocn.offset,
@@ -688,9 +688,9 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
goto_out;
if (new_wrap) {
- log_debug_metadata("Writing wrapped metadata to %s at " FMTu64 " len " FMTu64,
+ log_debug_metadata("Writing wrapped metadata to %s at " FMTu64 " len " FMTu64 " of " FMTu64,
dev_name(mdac->area.dev), mdac->area.start +
- MDA_HEADER_SIZE, new_wrap);
+ MDA_HEADER_SIZE, new_wrap, mdac->rlocn.size);
if (!dev_write(mdac->area.dev, mdac->area.start + MDA_HEADER_SIZE,
(size_t) new_wrap, MDA_CONTENT_REASON(mda_is_primary(mda)),
@@ -1228,8 +1228,8 @@ int vgname_from_mda(const struct format_type *fmt,
wrap = (uint32_t) ((rlocn->offset + rlocn->size) - mdah->size);
if (wrap > rlocn->offset) {
- log_error("%s: metadata too large for circular buffer",
- dev_name(dev_area->dev));
+ log_error("%s: metadata (" FMTu64 " bytes) too large for circular buffer (" FMTu64 " bytes)",
+ dev_name(dev_area->dev), rlocn->size, mdah->size - MDA_HEADER_SIZE);
return 0;
}
6 years, 4 months
master - format_text: Replace PRI with FMT.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=49d486319fa6cb48e69...
Commit: 49d486319fa6cb48e693c364ee6d72e4b6c364d2
Parent: 75d4d8e9a42a4709ed40348395b1e75dff4197e8
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Dec 11 15:32:53 2017 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Dec 11 15:39:25 2017 +0000
format_text: Replace PRI with FMT.
---
lib/format_text/archiver.c | 2 +-
lib/format_text/export.c | 16 +++++-----
lib/format_text/format-text.c | 58 ++++++++++++++++++++--------------------
lib/format_text/text_label.c | 6 ++--
4 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index 3e519ca..1eb6654 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -413,7 +413,7 @@ int backup_restore_vg(struct cmd_context *cmd, struct volume_group *vg,
new_pvl->pv = pv;
dm_list_add(&new_pvs, &new_pvl->list);
- log_verbose("Set up physical volume for \"%s\" with %" PRIu64
+ log_verbose("Set up physical volume for \"%s\" with " FMTu64
" available sectors.", pv_dev_name(pv), pv_size(pv));
}
diff --git a/lib/format_text/export.c b/lib/format_text/export.c
index 9fede20..e535237 100644
--- a/lib/format_text/export.c
+++ b/lib/format_text/export.c
@@ -121,7 +121,7 @@ static int _extend_buffer(struct formatter *f)
{
char *newbuf;
- log_debug_metadata("Doubling metadata output buffer to %" PRIu32,
+ log_debug_metadata("Doubling metadata output buffer to " FMTu32,
f->data.buf.size * 2);
if (!(newbuf = dm_realloc(f->data.buf.start,
f->data.buf.size * 2))) {
@@ -561,15 +561,15 @@ static int _print_pvs(struct formatter *f, struct volume_group *vg)
if (!_out_list(f, &pv->tags, "tags"))
return_0;
- outsize(f, pv->size, "dev_size = %" PRIu64, pv->size);
+ outsize(f, pv->size, "dev_size = " FMTu64, pv->size);
- outf(f, "pe_start = %" PRIu64, pv->pe_start);
+ outf(f, "pe_start = " FMTu64, pv->pe_start);
outsize(f, vg->extent_size * (uint64_t) pv->pe_count,
"pe_count = %u", pv->pe_count);
if (pv->ba_start && pv->ba_size) {
- outf(f, "ba_start = %" PRIu64, pv->ba_start);
- outsize(f, pv->ba_size, "ba_size = %" PRIu64, pv->ba_size);
+ outf(f, "ba_start = " FMTu64, pv->ba_start);
+ outsize(f, pv->ba_size, "ba_size = " FMTu64, pv->ba_size);
}
_dec_indent(f);
@@ -631,7 +631,7 @@ int out_areas(struct formatter *f, const struct lv_segment *seg,
switch (seg_type(seg, s)) {
case AREA_PV:
if (!(pv = seg_pv(seg, s))) {
- log_error(INTERNAL_ERROR "Missing PV for area %" PRIu32 " of %s segment of LV %s.",
+ log_error(INTERNAL_ERROR "Missing PV for area " FMTu32 " of %s segment of LV %s.",
s, type, display_lvname(seg->lv));
return 0;
}
@@ -670,7 +670,7 @@ int out_areas(struct formatter *f, const struct lv_segment *seg,
break;
case AREA_UNASSIGNED:
- log_error(INTERNAL_ERROR "Invalid type for area %" PRIu32 " of %s segment of LV %s.",
+ log_error(INTERNAL_ERROR "Invalid type for area " FMTu32 " of %s segment of LV %s.",
s, type, display_lvname(seg->lv));
return 0;
}
@@ -694,7 +694,7 @@ static int _print_timestamp(struct formatter *f,
"%Y-%m-%d %T %z", local_tm))
buf[0] = 0;
- outfc(f, buf, "%s = %" PRIu64, name, (uint64_t) ts);
+ outfc(f, buf, "%s = " FMTu64, name, (uint64_t) ts);
}
return 1;
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index c96fad9..adaf0a8 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -183,8 +183,8 @@ static int _pv_analyze_mda_raw (const struct format_type * fmt,
mdac = (struct mda_context *) mda->metadata_locn;
- log_print("Found text metadata area: offset=%" PRIu64 ", size=%"
- PRIu64, mdac->area.start, mdac->area.size);
+ log_print("Found text metadata area: offset=" FMTu64 ", size="
+ FMTu64, mdac->area.start, mdac->area.size);
area = &mdac->area;
if (!dev_open_readonly(area->dev))
@@ -240,8 +240,8 @@ static int _pv_analyze_mda_raw (const struct format_type * fmt,
/* FIXME: Validate region, pull out timestamp?, etc */
/* FIXME: Do something with this region */
log_verbose ("Found LVM2 metadata record at "
- "offset=%"PRIu64", size=%"PRIsize_t", "
- "offset2=%"PRIu64" size2=%"PRIsize_t,
+ "offset=" FMTu64 ", size=" FMTsize_t ", "
+ "offset2=" FMTu64 " size2=" FMTsize_t,
offset, size, offset2, size2);
offset = prev_sector;
size = SECTOR_SIZE;
@@ -333,7 +333,7 @@ static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev
MDA_HEADER_SIZE -
sizeof(mdah->checksum_xl)))) {
log_error("Incorrect metadata area header checksum on %s"
- " at offset %"PRIu64, dev_name(dev_area->dev),
+ " at offset " FMTu64, dev_name(dev_area->dev),
dev_area->start);
return 0;
}
@@ -342,21 +342,21 @@ static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev
if (strncmp((char *)mdah->magic, FMTT_MAGIC, sizeof(mdah->magic))) {
log_error("Wrong magic number in metadata area header on %s"
- " at offset %"PRIu64, dev_name(dev_area->dev),
+ " at offset " FMTu64, dev_name(dev_area->dev),
dev_area->start);
return 0;
}
if (mdah->version != FMTT_VERSION) {
log_error("Incompatible metadata area header version: %d on %s"
- " at offset %"PRIu64, mdah->version,
+ " at offset " FMTu64, mdah->version,
dev_name(dev_area->dev), dev_area->start);
return 0;
}
if (mdah->start != dev_area->start) {
- log_error("Incorrect start sector in metadata area header: %"
- PRIu64" on %s at offset %"PRIu64, mdah->start,
+ log_error("Incorrect start sector in metadata area header: "
+ FMTu64 " on %s at offset " FMTu64, mdah->start,
dev_name(dev_area->dev), dev_area->start);
return 0;
}
@@ -456,7 +456,7 @@ static struct raw_locn *_find_vg_rlocn(struct device_area *dev_area,
(isspace(vgnamebuf[len]) || vgnamebuf[len] == '{'))
return rlocn;
- log_debug_metadata("Volume group name found in %smetadata on %s at %" PRIu64 " does "
+ log_debug_metadata("Volume group name found in %smetadata on %s at " FMTu64 " does "
"not match expected name %s.",
*precommitted ? "precommitted " : "",
dev_name(dev_area->dev), dev_area->start + rlocn->offset, vgname);
@@ -557,13 +557,13 @@ static struct volume_group *_vg_read_raw_area(struct format_instance *fid,
goto_out;
if (vg)
- log_debug_metadata("Read %s %smetadata (%u) from %s at %" PRIu64 " size %"
- PRIu64, vg->name, precommitted ? "pre-commit " : "",
+ log_debug_metadata("Read %s %smetadata (%u) from %s at " FMTu64 " size "
+ FMTu64, vg->name, precommitted ? "pre-commit " : "",
vg->seqno, dev_name(area->dev),
area->start + rlocn->offset, rlocn->size);
else
- log_debug_metadata("Skipped reading %smetadata from %s at %" PRIu64 " size %"
- PRIu64 " with matching checksum.", precommitted ? "pre-commit " : "",
+ log_debug_metadata("Skipped reading %smetadata from %s at " FMTu64 " size "
+ FMTu64 " with matching checksum.", precommitted ? "pre-commit " : "",
dev_name(area->dev),
area->start + rlocn->offset, rlocn->size);
@@ -677,7 +677,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
goto out;
}
- log_debug_metadata("Writing %s metadata to %s at %" PRIu64 " len %" PRIu64,
+ log_debug_metadata("Writing %s metadata to %s at " FMTu64 " len " FMTu64,
vg->name, dev_name(mdac->area.dev), mdac->area.start +
mdac->rlocn.offset, mdac->rlocn.size - new_wrap);
@@ -688,7 +688,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
goto_out;
if (new_wrap) {
- log_debug_metadata("Writing wrapped metadata to %s at %" PRIu64 " len %" PRIu64,
+ log_debug_metadata("Writing wrapped metadata to %s at " FMTu64 " len " FMTu64,
dev_name(mdac->area.dev), mdac->area.start +
MDA_HEADER_SIZE, new_wrap);
@@ -787,13 +787,13 @@ static int _vg_commit_raw_rlocn(struct format_instance *fid,
rlocn->offset = mdac->rlocn.offset;
rlocn->size = mdac->rlocn.size;
rlocn->checksum = mdac->rlocn.checksum;
- log_debug_metadata("%sCommitting %s %smetadata (%u) to %s header at %"
- PRIu64, precommit ? "Pre-" : "", vg->name,
+ log_debug_metadata("%sCommitting %s %smetadata (%u) to %s header at "
+ FMTu64, precommit ? "Pre-" : "", vg->name,
mda_is_ignored(mda) ? "(ignored) " : "", vg->seqno,
dev_name(mdac->area.dev), mdac->area.start);
} else
log_debug_metadata("Wiping pre-committed %s %smetadata from %s "
- "header at %" PRIu64, vg->name,
+ "header at " FMTu64, vg->name,
mda_is_ignored(mda) ? "(ignored) " : "",
dev_name(mdac->area.dev), mdac->area.start);
@@ -1253,8 +1253,8 @@ int vgname_from_mda(const struct format_type *fmt,
if (!validate_name(vgsummary->vgname))
return_0;
- log_debug_metadata("%s: %s metadata at %" PRIu64 " size %" PRIu64
- " (in area at %" PRIu64 " size %" PRIu64
+ log_debug_metadata("%s: %s metadata at " FMTu64 " size " FMTu64
+ " (in area at " FMTu64 " size " FMTu64
") for %s (" FMTVGID ")",
dev_name(dev_area->dev),
used_cached_metadata ? "Using cached" : "Found",
@@ -1402,8 +1402,8 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
continue;
mdac = (struct mda_context *) mda->metadata_locn;
- log_debug_metadata("Creating metadata area on %s at sector %"
- PRIu64 " size %" PRIu64 " sectors",
+ log_debug_metadata("Creating metadata area on %s at sector "
+ FMTu64 " size " FMTu64 " sectors",
dev_name(mdac->area.dev),
mdac->area.start >> SECTOR_SHIFT,
mdac->area.size >> SECTOR_SHIFT);
@@ -1782,10 +1782,10 @@ static int _mda_export_text_raw(struct metadata_area *mda,
return 1; /* pretend the MDA does not exist */
return config_make_nodes(cft, parent, NULL,
- "ignore = %" PRId64, (int64_t) mda_is_ignored(mda),
- "start = %" PRId64, (int64_t) mdc->area.start,
- "size = %" PRId64, (int64_t) mdc->area.size,
- "free_sectors = %" PRId64, (int64_t) mdc->free_sectors,
+ "ignore = " FMTd64, (int64_t) mda_is_ignored(mda),
+ "start = " FMTd64, (int64_t) mdc->area.start,
+ "size = " FMTd64, (int64_t) mdc->area.size,
+ "free_sectors = " FMTd64, (int64_t) mdc->free_sectors,
NULL) ? 1 : 0;
}
@@ -2306,13 +2306,13 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
if (limit_applied)
log_very_verbose("Using limited metadata area size on %s "
- "with value %" PRIu64 " (limited by %s of "
+ "with value " FMTu64 " (limited by %s of "
FMTu64 ").", pv_dev_name(pv),
mda_size, limit_name, limit);
if (mda_size) {
if (mda_size < MDA_SIZE_MIN) {
- log_error("Metadata area size too small: %" PRIu64" bytes. "
+ log_error("Metadata area size too small: " FMTu64 " bytes. "
"It must be at least %u bytes.", mda_size, MDA_SIZE_MIN);
goto bad;
}
diff --git a/lib/format_text/text_label.c b/lib/format_text/text_label.c
index c567709..7058f70 100644
--- a/lib/format_text/text_label.c
+++ b/lib/format_text/text_label.c
@@ -148,7 +148,7 @@ static int _text_write(struct label *label, void *buf)
!xlate64(pvhdr->disk_areas_xl[mda2].size))
mda2 = 0;
- log_debug_metadata("%s: Preparing PV label header %s size %" PRIu64 " with"
+ log_debug_metadata("%s: Preparing PV label header %s size " FMTu64 " with"
"%s%.*" PRIu64 "%s%.*" PRIu64 "%s"
"%s%.*" PRIu64 "%s%.*" PRIu64 "%s"
"%s%.*" PRIu64 "%s%.*" PRIu64 "%s"
@@ -352,7 +352,7 @@ static int _update_mda(struct metadata_area *mda, void *baton)
mda_set_ignored(mda, rlocn_is_ignored(mdah->raw_locns));
if (mda_is_ignored(mda)) {
- log_debug_metadata("Ignoring mda on device %s at offset %"PRIu64,
+ log_debug_metadata("Ignoring mda on device %s at offset " FMTu64,
dev_name(mdac->area.dev),
mdac->area.start);
if (!dev_close(mdac->area.dev))
@@ -428,7 +428,7 @@ static int _text_read(struct labeller *l, struct device *dev, void *buf,
if (!(ext_version = xlate32(pvhdr_ext->version)))
goto out;
- log_debug_metadata("%s: PV header extension version %" PRIu32 " found",
+ log_debug_metadata("%s: PV header extension version " FMTu32 " found",
dev_name(dev), ext_version);
/* Extension version */
6 years, 4 months
master - configure: Fix deprecation warning for lvmapp
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=75d4d8e9a42a4709ed4...
Commit: 75d4d8e9a42a4709ed40348395b1e75dff4197e8
Parent: 2aedc98242cefd29a5eccabb600be6f37e756fda
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Dec 11 15:20:48 2017 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Dec 11 15:20:48 2017 +0100
configure: Fix deprecation warning for lvmapp
* and properly regenerate configure script
---
configure | 6 +++---
configure.in | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 903ad6e..7e2969a 100755
--- a/configure
+++ b/configure
@@ -12777,8 +12777,8 @@ test "$APPLIB" = yes \
&& LVM2APP_LIB=-llvm2app \
|| LVM2APP_LIB=
if test "$APPLIB"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python bindings are deprecated. Use D-Bus API" >&5
-$as_echo "$as_me: WARNING: Python bindings are deprecated. Use D-Bus API" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: liblvm2app is deprecated. Use D-Bus API" >&5
+$as_echo "$as_me: WARNING: liblvm2app is deprecated. Use D-Bus API" >&2;}
fi
################################################################################
@@ -13791,7 +13791,7 @@ fi
PYTHON3_INCDIRS=`"$PYTHON3_CONFIG" --includes`
PYTHON3_LIBDIRS=`"$PYTHON3_CONFIG" --libs`
PYTHON3DIR=$pythondir
- PYTHON_BINDINGS=yes
+ test "$PYTHON3_BINDINGS" = yes && PYTHON_BINDINGS=yes
fi
if test "$BUILD_LVMDBUSD" = yes; then
diff --git a/configure.in b/configure.in
index 85ddce0..88ee5ad 100644
--- a/configure.in
+++ b/configure.in
@@ -1455,7 +1455,7 @@ test "$APPLIB" = yes \
&& LVM2APP_LIB=-llvm2app \
|| LVM2APP_LIB=
AS_IF([test "$APPLIB"],
- [AC_MSG_WARN([Python bindings are deprecated. Use D-Bus API])])
+ [AC_MSG_WARN([liblvm2app is deprecated. Use D-Bus API])])
################################################################################
dnl -- Enable cmdlib
6 years, 4 months
master - lvmdbusd: Fix path to python3
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2aedc98242cefd29a5e...
Commit: 2aedc98242cefd29a5eccabb600be6f37e756fda
Parent: 6a6c8d7b81703205a283528da5b7b8630e32d0d0
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Dec 11 12:36:54 2017 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Dec 11 12:36:54 2017 +0100
lvmdbusd: Fix path to python3
lvmdbusd executable script must use python3 interpreter detected by
configure script, as site-packages directory used for library is only
used by that interpreter.
---
WHATS_NEW | 1 +
configure | 3 ++-
configure.in | 1 +
daemons/lvmdbusd/.gitignore | 1 +
daemons/lvmdbusd/lvmdbusd | 16 ----------------
daemons/lvmdbusd/lvmdbusd.in | 16 ++++++++++++++++
6 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index db256b0..6f13fe3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.177 -
====================================
+ Fix python3 path in lvmdbusd to use value detected by configure.
Reduce checks for active LVs in vgchange before background polling.
Ensure _node_send_message always uses clean status of thin pool.
Fix lvmlockd to use pool lock when accessing _tmeta volume.
diff --git a/configure b/configure
index fc0a27a..903ad6e 100755
--- a/configure
+++ b/configure
@@ -15778,7 +15778,7 @@ _ACEOF
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/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/dmfilemapd/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/path.py daemons/lvmetad/Makefile 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/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaem
on/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat 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_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_
red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/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/dmfilemapd/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/path.py daemons/lvmetad/Makefile 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/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaem
on/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat 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_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service script
s/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -16488,6 +16488,7 @@ do
"daemons/dmeventd/plugins/thin/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/plugins/thin/Makefile" ;;
"daemons/dmfilemapd/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmfilemapd/Makefile" ;;
"daemons/lvmdbusd/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/Makefile" ;;
+ "daemons/lvmdbusd/lvmdbusd") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/lvmdbusd" ;;
"daemons/lvmdbusd/path.py") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/path.py" ;;
"daemons/lvmetad/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmetad/Makefile" ;;
"daemons/lvmpolld/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmpolld/Makefile" ;;
diff --git a/configure.in b/configure.in
index a0a47cd..85ddce0 100644
--- a/configure.in
+++ b/configure.in
@@ -2186,6 +2186,7 @@ daemons/dmeventd/plugins/snapshot/Makefile
daemons/dmeventd/plugins/thin/Makefile
daemons/dmfilemapd/Makefile
daemons/lvmdbusd/Makefile
+daemons/lvmdbusd/lvmdbusd
daemons/lvmdbusd/path.py
daemons/lvmetad/Makefile
daemons/lvmpolld/Makefile
diff --git a/daemons/lvmdbusd/.gitignore b/daemons/lvmdbusd/.gitignore
index 09375e7..c0f6b4e 100644
--- a/daemons/lvmdbusd/.gitignore
+++ b/daemons/lvmdbusd/.gitignore
@@ -1 +1,2 @@
path.py
+lvmdbusd
diff --git a/daemons/lvmdbusd/lvmdbusd b/daemons/lvmdbusd/lvmdbusd
deleted file mode 100755
index 73d0f13..0000000
--- a/daemons/lvmdbusd/lvmdbusd
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions
-# of the GNU General Public License v.2.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import sys
-from lvmdbusd import main
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/daemons/lvmdbusd/lvmdbusd.in b/daemons/lvmdbusd/lvmdbusd.in
new file mode 100755
index 0000000..bd84cd8
--- /dev/null
+++ b/daemons/lvmdbusd/lvmdbusd.in
@@ -0,0 +1,16 @@
+#!@PYTHON3@
+
+# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import sys
+from lvmdbusd import main
+
+if __name__ == '__main__':
+ sys.exit(main())
6 years, 4 months
master - configure: applib is not required by dbusd
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6a6c8d7b81703205a28...
Commit: 6a6c8d7b81703205a283528da5b7b8630e32d0d0
Parent: a64c73a979062c097395735372bbb33456d445f2
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Dec 11 12:12:42 2017 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Dec 11 12:12:42 2017 +0100
configure: applib is not required by dbusd
---
configure.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 7d4f5b3..a0a47cd 100644
--- a/configure.in
+++ b/configure.in
@@ -1530,7 +1530,7 @@ if test "$PYTHON3_BINDINGS" = yes -o "$BUILD_LVMDBUSD" = yes; then
PYTHON3_INCDIRS=`"$PYTHON3_CONFIG" --includes`
PYTHON3_LIBDIRS=`"$PYTHON3_CONFIG" --libs`
PYTHON3DIR=$pythondir
- PYTHON_BINDINGS=yes
+ test "$PYTHON3_BINDINGS" = yes && PYTHON_BINDINGS=yes
fi
if test "$BUILD_LVMDBUSD" = yes; then
6 years, 4 months
master - cleanup: debug message
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a64c73a979062c09739...
Commit: a64c73a979062c097395735372bbb33456d445f2
Parent: 700e2a2d251cf8dcaf56035e0bd83ce8f808b5c0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 8 13:17:15 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 8 13:21:15 2017 +0100
cleanup: debug message
---
tools/vgchange.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index ea737ba..616a9d3 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -124,8 +124,8 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct volume_group *vg,
* If the LV is active exclusive remotely,
* then ignore it here
*/
- log_verbose("%s/%s is exclusively active on"
- " a remote node", vg->name, lv->name);
+ log_verbose("%s is exclusively active on a remote node.",
+ display_lvname(lv));
expected_count--; /* not accounted */
}
continue;
@@ -783,7 +783,7 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name,
if (!arg_is_set(cmd, refresh_ARG) &&
!vgchange_background_polling(cmd, vg))
- return_ECMD_FAILED;
+ return_ECMD_FAILED;
return ret;
}
6 years, 4 months
master - cleanup: switch to standard query
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=700e2a2d251cf8dcaf5...
Commit: 700e2a2d251cf8dcaf56035e0bd83ce8f808b5c0
Parent: 71485ebfc759299610e279a91b97215b556295df
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 8 13:15:21 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 8 13:21:15 2017 +0100
cleanup: switch to standard query
In /tools part we should mostly use standard functions
lv_is_active* unless there is good reason to not use it.
---
tools/vgchange.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 48e64c5..ea737ba 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -58,19 +58,12 @@ static int _poll_lvs_in_vg(struct cmd_context *cmd,
{
struct lv_list *lvl;
struct logical_volume *lv;
- struct lvinfo info;
- int lv_active;
int count = 0;
dm_list_iterate_items(lvl, &vg->lvs) {
lv = lvl->lv;
- if (!lv_info(cmd, lv, 0, &info, 0, 0))
- lv_active = 0;
- else
- lv_active = info.exists;
-
- if (lv_active &&
+ if (lv_is_active_locally(lv) &&
(lv_is_pvmove(lv) || lv_is_converting(lv) || lv_is_merging(lv))) {
lv_spawn_background_polling(cmd, lv);
count++;
6 years, 4 months
master - thin: regression fix for metadata checking
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=71485ebfc759299610e...
Commit: 71485ebfc759299610e279a91b97215b556295df
Parent: 455b26b8dbdd05ec773a84da2ef64b669c80e194
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 8 13:09:45 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 8 13:21:15 2017 +0100
thin: regression fix for metadata checking
Fix regression from commit f173274fe4888cc73eb573cf2c6913f54641c1aa
and restore support for 'disabled' checking via lvm.conf.
---
lib/activate/dev_manager.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index ced50fa..2faf1cc 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -1913,7 +1913,12 @@ static int _pool_callback(struct dm_tree_node *node,
long buf[64 / sizeof(long)]; /* buffer for short disk header (64B) */
int args = 0;
char *mpath;
- const char *argv[19] = { 0 }; /* Max supported 15 args */
+ const char *argv[19] = { /* Max supported 15 args */
+ find_config_tree_str_allow_empty(pool_lv->vg->cmd, data->exec, NULL)
+ };
+
+ if (!*argv[0]) /* *_check tool is unconfigured/disabled with "" setting */
+ return 1;
if (!(mpath = lv_dmpath_dup(data->dm->mem, mlv))) {
log_error("Failed to build device path for checking pool metadata %s.",
@@ -1947,9 +1952,6 @@ static int _pool_callback(struct dm_tree_node *node,
}
}
- if (!(argv[0] = find_config_tree_str_allow_empty(pool_lv->vg->cmd, data->exec, NULL)))
- return 1; /* Checking disabled */
-
if (!(cn = find_config_tree_array(mlv->vg->cmd, data->opts, NULL))) {
log_error(INTERNAL_ERROR "Unable to find configuration for pool check options.");
return 0;
6 years, 4 months
master - activation: keep priority till memlock_unlock
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=455b26b8dbdd05ec773...
Commit: 455b26b8dbdd05ec773a84da2ef64b669c80e194
Parent: 4e8af1d3aa136eae8dbb66186bfc331b0b2887e6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 8 13:11:35 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 8 13:21:15 2017 +0100
activation: keep priority till memlock_unlock
Although it doesn't look like it can be a measurable problem
and costs some time to flip priorities outside of activation window.
So just like with memory locking preserve priority until call
memlock_unlock() appears.
(addition to commit c086dfadc389551b9a2d7b4c26931e5e74ada8d6).
---
lib/mm/memlock.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index f72b86c..897bf10 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -627,8 +627,6 @@ void critical_section_dec(struct cmd_context *cmd, const char *reason)
log_debug_activation("Leaving critical section (%s).", reason);
} else
log_debug_activation("Leaving section (%s).", reason);
-
- _restore_priority_if_possible(cmd);
}
int critical_section(void)
@@ -683,6 +681,7 @@ void memlock_reset(void)
void memlock_unlock(struct cmd_context *cmd)
{
_unlock_mem_if_possible(cmd);
+ _restore_priority_if_possible(cmd);
}
int memlock_count_daemon(void)
6 years, 4 months
master - vgchange: drop extra counting
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4e8af1d3aa136eae8db...
Commit: 4e8af1d3aa136eae8dbb66186bfc331b0b2887e6
Parent: 14b1e5270dbca71870a79b37d6614e2cb96b180f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 8 13:17:34 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 8 13:21:14 2017 +0100
vgchange: drop extra counting
As the loop for background polling _poll_lvs_in_vg checks for active LVs,
avoid doing unnecessary extra check before.
---
WHATS_NEW | 1 +
tools/vgchange.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4659d55..db256b0 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.177 -
====================================
+ Reduce checks for active LVs in vgchange before background polling.
Ensure _node_send_message always uses clean status of thin pool.
Fix lvmlockd to use pool lock when accessing _tmeta volume.
Report expected sanlock_convert errors only when retries fail.
diff --git a/tools/vgchange.c b/tools/vgchange.c
index ae97a4a..48e64c5 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -178,7 +178,7 @@ int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg
{
int polled;
- if (lvs_in_vg_activated(vg) && background_polling()) {
+ if (background_polling()) {
polled = _poll_lvs_in_vg(cmd, vg);
if (polled)
log_print_unless_silent("Background polling started for %d logical volume(s) "
6 years, 4 months