From: mbroz@sourceware.org <mbroz@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW daemons/clvmd/lvm-functions.c ...
Date: 19 Jan 2010 13:25:01 -0000 [thread overview]
Message-ID: <20100119132501.15445.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2010-01-19 13:25:00
Modified files:
. : WHATS_NEW
daemons/clvmd : lvm-functions.c
lib/commands : toolcontext.c
Log message:
Never scan suspended devices in clvmd.
For mirror repair (and similar tasks) it can happen that full
device rescan is issued from clvmd.
Because code can be in the middle of repair (calling suspend)
clvmd should never try to scan suspended devices
(otherwise it causes deadlock).
Also code must not change ignore_suspended_device flag when
doing refresh_filters (called from lvmcache scan code).
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1394&r2=1.1395
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.82&r2=1.83
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.90&r2=1.91
--- LVM2/WHATS_NEW 2010/01/15 20:47:52 1.1394
+++ LVM2/WHATS_NEW 2010/01/19 13:25:00 1.1395
@@ -1,5 +1,6 @@
Version 2.02.59 -
===================================
+ Fix clvmd to never scan suspended devices.
Initial version of the cmirror init script (Red Hat).
Initial version of the cmirrord man page.
Make cluster log communication structures architecture independant.
--- LVM2/daemons/clvmd/lvm-functions.c 2010/01/05 16:09:33 1.82
+++ LVM2/daemons/clvmd/lvm-functions.c 2010/01/19 13:25:00 1.83
@@ -499,6 +499,9 @@
cmd->partial_activation = (lock_flags & LCK_PARTIAL_MODE) ? 1 : 0;
+ /* clvmd should never try to read suspended device */
+ init_ignore_suspended_devices(1);
+
switch (command & LCK_MASK) {
case LCK_LV_EXCLUSIVE:
status = do_activate_lv(resource, lock_flags, LKM_EXMODE);
@@ -627,6 +630,7 @@
}
init_full_scan_done(0);
+ init_ignore_suspended_devices(1);
lvmcache_label_scan(cmd, 2);
dm_pool_empty(cmd->mem);
@@ -860,6 +864,7 @@
/* Check lvm.conf is setup for cluster-LVM */
check_config();
+ init_ignore_suspended_devices(1);
/* Remove any non-LV locks that may have been left around */
if (using_gulm)
--- LVM2/lib/commands/toolcontext.c 2010/01/07 19:54:21 1.90
+++ LVM2/lib/commands/toolcontext.c 2010/01/19 13:25:00 1.91
@@ -1231,12 +1231,21 @@
int refresh_filters(struct cmd_context *cmd)
{
+ int r, saved_ignore_suspended_devices = ignore_suspended_devices();
+
if (cmd->filter) {
cmd->filter->destroy(cmd->filter);
cmd->filter = NULL;
}
- return _init_filters(cmd, 0);
+ r = _init_filters(cmd, 0);
+
+ /*
+ * During repair code must not reset suspended flag.
+ */
+ init_ignore_suspended_devices(saved_ignore_suspended_devices);
+
+ return r;
}
int refresh_toolcontext(struct cmd_context *cmd)
next reply other threads:[~2010-01-19 13:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 13:25 mbroz [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-20 0:27 LVM2 ./WHATS_NEW daemons/clvmd/lvm-functions.c jbrassow
2011-12-08 21:24 agk
2011-09-27 22:43 agk
2011-08-10 20:25 zkabelac
2011-02-18 14:16 zkabelac
2011-02-18 0:36 jbrassow
2011-02-04 20:30 jbrassow
2011-02-03 16:03 zkabelac
2011-02-03 1:58 zkabelac
2010-12-08 20:51 agk
2010-11-23 1:56 agk
2010-03-26 15:40 snitzer
2010-03-23 22:30 snitzer
2010-01-05 16:09 mbroz
2010-01-05 16:06 mbroz
2010-01-05 16:03 mbroz
2009-11-23 10:44 mbroz
2009-07-24 18:15 agk
2009-07-16 0:37 agk
2009-07-15 23:57 agk
2009-07-13 19:49 agk
2009-06-12 8:30 mbroz
2009-02-22 21:14 agk
2009-01-26 19:01 agk
2008-09-19 6:42 agk
2007-08-07 9:06 meyering
2007-01-25 14:37 agk
2007-01-23 15:58 agk
2007-01-19 22:21 agk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100119132501.15445.qmail@sourceware.org \
--to=mbroz@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.