Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9e4dc8324117165358f2e…
Commit: 9e4dc8324117165358f2e329e5f9a5b9f27b1e0a
Parent: b910c34f09f45987fe56f0e90455a166e047144c
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Dec 6 10:41:14 2017 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Dec 6 10:41:14 2017 +0100
Update WHATS_NEW
---
WHATS_NEW | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 674e7f1..a5ec3e7 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,7 +1,12 @@
Version 2.02.177 -
====================================
+ Fix lvmlockd to use pool lock when accessing _tmeta volume.
+ Report expected sanlock_convert errors only when retries fail.
+ Avoid blocking in sanlock_convert on SH to EX lock conversion.
+ Deactivate missing raid LV legs (_rimage_X-missing_Y_Z) on decativation.
Skip read-modify-write when entire block is replaced.
Categorise I/O with reason annotations in debug messages.
+ Allow extending of raid LVs created with --nosync after a failed repair.
Command will lock memory only when suspending volumes.
Merge segments when pvmove is finished.
Remove label_verify that has never been used.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b910c34f09f45987fe56f…
Commit: b910c34f09f45987fe56f0e90455a166e047144c
Parent: b9e419850086473d4309c5211852b0237020421d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Dec 5 14:31:03 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Dec 5 14:31:03 2017 -0600
lvmlockd: use pool lock for tmeta access
When a command is run on a named tmeta LV, use
the lock on the pool.
---
lib/locking/lvmlockd.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index d8bb818..eb7076c 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -2161,6 +2161,10 @@ static int _lockd_lv_thin(struct cmd_context *cmd, struct logical_volume *lv,
/* FIXME: there should be a function to get pool lv from data lv. */
pool_lv = lv_parent(lv);
+ } else if (lv_is_thin_pool_metadata(lv)) {
+ struct lv_segment *pool_seg = get_only_segment_using_this_lv(lv);
+ pool_lv = pool_seg->lv;
+
} else {
/* This should not happen AFAIK. */
log_error("Lock on incorrect thin lv type %s/%s",
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5d5807b238f12cbe1e3ba…
Commit: 5d5807b238f12cbe1e3ba7bbb31e2db2f08ed173
Parent: 46d6f7a6393d1d99411d7896285f6f1556de8547
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Nov 29 15:54:44 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Dec 5 11:53:03 2017 -0600
lvmlockd: improve error message for VG lock conflict
When there is significant VG lock contention which retries
have not been able to mask, print a better error message.
---
lib/locking/lvmlockd.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index 325549a..5870d05 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -1913,6 +1913,23 @@ int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode,
}
/*
+ * The lock is held by another host, and retries have been unsuccessful.
+ */
+ if (result == -EAGAIN) {
+ if (!strcmp(mode, "un")) {
+ ret = 1;
+ goto out;
+ } else if (!strcmp(mode, "sh")) {
+ log_warn("VG %s lock skipped: held by other host.", vg_name, result);
+ ret = 1;
+ goto out;
+ } else {
+ log_error("VG %s lock failed: held by other host.", vg_name, result);
+ ret = 0;
+ goto out;
+ }
+ }
+ /*
* No lockspace for the VG was found. It may be a local
* VG that lvmlockd doesn't keep track of, or it may be
* a lockd VG that lvmlockd doesn't yet know about (it hasn't
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bd893348b415d4e604a7f…
Commit: bd893348b415d4e604a7f9a503f17623d485e76e
Parent: 94632eb155a0a1814e69b1baa0516323cbbae648
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Nov 29 14:59:11 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Dec 5 11:53:03 2017 -0600
lvmlockd: avoid blocking in sanlock_convert
Use the same flag as sanlock_acquire() for the
same purpose. sanlock_convert can block like
acquire when doing a sh to ex conversion.
---
daemons/lvmlockd/lvmlockd-sanlock.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c
index 358c588..079e952 100644
--- a/daemons/lvmlockd/lvmlockd-sanlock.c
+++ b/daemons/lvmlockd/lvmlockd-sanlock.c
@@ -1688,6 +1688,16 @@ int lm_convert_sanlock(struct lockspace *ls, struct resource *r,
if (daemon_test)
return 0;
+ /*
+ * Don't block waiting for a failed lease to expire since it causes
+ * sanlock_convert to block for a long time, which would prevent this
+ * thread from processing other lock requests.
+ *
+ * FIXME: SANLK_CONVERT_OWNER_NOWAIT is the same as SANLK_ACQUIRE_OWNER_NOWAIT.
+ * Change to use the CONVERT define when the latest sanlock version has it.
+ */
+ flags |= SANLK_ACQUIRE_OWNER_NOWAIT;
+
rv = sanlock_convert(lms->sock, -1, flags, rs);
if (rv == -EAGAIN) {
/* FIXME: When could this happen? Should something different be done? */