public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: mornfall@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/metadata mirror.c Date: Thu, 19 Nov 2009 13:42:00 -0000 [thread overview] Message-ID: <20091119134239.26005.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2009-11-19 13:42:39 Modified files: lib/metadata : mirror.c Log message: The double resume in remove_mirror_images does not happen *always*. Only call memlock_inc() when it actually does happen. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.94&r2=1.95 --- LVM2/lib/metadata/mirror.c 2009/11/19 12:09:53 1.94 +++ LVM2/lib/metadata/mirror.c 2009/11/19 13:42:38 1.95 @@ -608,21 +608,24 @@ * As it's now detached from mirrored_seg->lv we must resume it * explicitly. */ - if (lv1 && !resume_lv(lv1->vg->cmd, lv1)) { - log_error("Problem resuming temporary LV, %s", lv1->name); - return 0; - } + if (lv1) { + if (!resume_lv(lv1->vg->cmd, lv1)) { + log_error("Problem resuming temporary LV, %s", lv1->name); + return 0; + } - /* - * The code above calls a suspend_lv once, however we now need to - * resume 2 LVs, due to image removal: the mirror image itself above, - * and now the remaining mirror LV. Since suspend_lv/resume_lv call - * memlock_inc/memlock_dec and these need to be balanced, we need to - * call an extra memlock_inc() here to balance for the second resume, - * which could otherwise either deadlock due to suspended devices, or - * alternatively drop memlock_count below 0. - */ - memlock_inc(); + /* + * The code above calls a suspend_lv once, however we now need + * to resume 2 LVs, due to image removal: the mirror image + * itself here, and now the remaining mirror LV. Since + * suspend_lv/resume_lv call memlock_inc/memlock_dec and these + * need to be balanced, we need to call an extra memlock_inc() + * here to balance for the this extra resume -- the following + * one could otherwise either deadlock due to suspended + * devices, or alternatively drop memlock_count below 0. + */ + memlock_inc(); + } if (!resume_lv(mirrored_seg->lv->vg->cmd, mirrored_seg->lv)) { log_error("Problem reactivating %s", mirrored_seg->lv->name);
next reply other threads:[~2009-11-19 13:42 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-11-19 13:42 mornfall [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-02-01 15:05 agk 2011-09-19 14:28 jbrassow 2011-09-16 16:41 jbrassow 2011-09-14 9:54 zkabelac 2011-09-14 4:10 jbrassow 2011-09-13 18:11 jbrassow 2011-06-24 23:39 agk 2011-04-12 14:13 zkabelac 2011-03-24 12:28 mornfall 2011-01-11 17:21 jbrassow 2010-07-09 17:57 jbrassow 2010-06-23 13:57 jbrassow 2010-04-20 12:14 agk 2010-04-01 14:54 agk 2010-01-08 10:50 zkabelac 2009-12-17 15:59 mornfall 2009-12-09 19:43 mbroz 2009-11-19 12:09 mornfall 2009-11-18 18:23 mornfall 2009-10-14 14:55 jbrassow 2009-04-23 16:43 mornfall 2008-09-19 4:30 agk 2008-09-19 0:20 agk 2008-01-17 13:37 agk 2008-01-16 19:50 agk 2008-01-16 19:38 agk 2008-01-16 19:11 agk 2008-01-16 19:09 agk 2006-11-10 20:15 agk 2004-05-05 18:35 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=20091119134239.26005.qmail@sourceware.org \ --to=mornfall@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).