From: "Roger Lucas" <roger@planbit.co.uk>
To: 'LVM general discussion and development' <linux-lvm@redhat.com>
Subject: RE: [linux-lvm] Re: [RFC] Reverting "bd_mount_mutex" to "bd_mount_sem"
Date: Mon, 23 Oct 2006 09:39:38 +0100 [thread overview]
Message-ID: <20061023083944.CAD7112EE2@bluewhale.planbit.co.uk> (raw)
In-Reply-To: <1160493546.3000.303.camel@laptopd505.fenrus.org>
Hi,
Checking through the code, I think that the semaphore -> mutex change was introduced in the original 2.6.17 kernel release. If it
has problems, then it will affect all 2.6.17 and 2.6.18 kernels as the mutex code is still in the 2.6.18.1 release.
Can someone explain under what conditions this bug will occur and what its impact is? We are currently using the 2.6.16.20 kernel
(which seems OK) but were keen to move to 2.6.18 as it has the new SATA hotplug ability. We use LVM and dmapper heavily, however,
so don't want to switch if there are issues with it.
Alternatively, would locally updating the 2.6.18.1 kernel with Srinivasa's patch be sensible to restore the 2.6.16 style semaphore
code (which does seem to be stable)?
Thanks,
Roger
> -----Original Message-----
> From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On Behalf Of Arjan van de
> Ven
> Sent: 10 October 2006 16:19
> To: Srinivasa Ds
> Cc: Eric Sandeen; linux-kernel@vger.kernel.org; dm-devel@redhat.com; linux-lvm@redhat.com; Ingo
> Molnar; agk@redhat.com
> Subject: [linux-lvm] Re: [RFC] Reverting "bd_mount_mutex" to "bd_mount_sem"
>
> On Tue, 2006-10-10 at 20:34 +0530, Srinivasa Ds wrote:
> > Eric Sandeen wrote:
> > > Ingo Molnar wrote:
> > >
> > >> * Srinivasa Ds <srinivasa@in.ibm.com> wrote:
> > >>
> > >>
> > >>> On debugging I found out that,"dmsetup suspend <device name>" calls
> > >>> "freeze_bdev()",which locks "bd_mount_mutex" to make sure that no new
> > >>> mounts happen on bdev until thaw_bdev() is called.
> > >>> This "thaw_bdev()" is getting called when we resume the device
> > >>> through "dmsetup resume <device-name>".
> > >>> Hence we have 2 processes,one of which locks
> > >>> "bd_mount_mutex"(dmsetup suspend) and Another(dmsetup resume) unlocks
> > >>> it.
> > >>>
> > >> hm, to me this seems quite a fragile construct - even if the
> > >> mutex-debugging warning is worked around by reverting to a semaphore.
> > >>
> > >> Ingo
> > >>
> > >
> > > Ingo, what do you feel is fragile about this? It seems like this is a
> > > reasonable way to go, except that maybe a down_trylock would be good if
> > > a 2nd process tries to freeze while it's already frozen...
> > >
> > > Thanks,
> > >
> > > -Eric
> > >
> > Ingo, As per the discussion resending the patch with down_trylock.
>
> Hi,
>
> I still think that effectively exporting this semaphore to userspace is
> a big design mistake; but at least it can't be a mutex for this reason
> so the patch is sane in that regard...
>
> Greetings,
> Arjan van de Ven
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
prev parent reply other threads:[~2006-10-23 8:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 13:13 [linux-lvm] [RFC] Reverting "bd_mount_mutex" to "bd_mount_sem" Srinivasa Ds
2006-09-27 13:57 ` [linux-lvm] " Ingo Molnar
2006-10-06 20:50 ` Eric Sandeen
2006-10-10 15:04 ` Srinivasa Ds
2006-10-10 15:19 ` Arjan van de Ven
2006-10-23 8:39 ` Roger Lucas [this message]
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=20061023083944.CAD7112EE2@bluewhale.planbit.co.uk \
--to=roger@planbit.co.uk \
--cc=linux-lvm@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 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 NNTP newsgroup(s).