From: David Chinner <dgc@sgi.com>
To: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Oliver Pinter <oliver.pntr@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
xfs@oss.sgi.com
Subject: Re: [REGRESSION 2.6-git] possible circular locking dependency detected with XFS
Date: Mon, 25 Jun 2007 09:22:46 +1000 [thread overview]
Message-ID: <20070624232246.GF86004887@sgi.com> (raw)
In-Reply-To: <6bffcb0e0706221553s3a74ef58hcadc69bfa252283@mail.gmail.com>
On Sat, Jun 23, 2007 at 12:53:11AM +0200, Michal Piotrowski wrote:
> Hi Oliver,
>
> On 22/06/07, Oliver Pinter <oliver.pntr@gmail.com> wrote:
> >Hi all!
> >
> >I found this info:
> >
> >======================================================= [ INFO: possible
> >circular locking dependency detected ] 2.6.22-rc5-wifi1 #2
> >------------------------------------------------------- mount/2209 is
> >trying to acquire lock: (&(&ip->i_lock)->mr_lock/1){--..}, at: [<c022b62d>]
> >xfs_ilock+0x66/0x90
> >
> >but task is already holding lock: (&(&ip->i_lock)->mr_lock){----}, at:
> >[<c022b62d>] xfs_ilock+0x66/0x90
> >
>
> AFAIR it is not a regression. It is a known bug (harmless).
FWIW, it's not even a bug. The bug (if any) is due to the fact we
can't properly express the XFS locking rules with lockdep. We
recently added a bunch of notations that fixed the common false
positives we were seeing, but as a result, it appears we now have a
whole new set of false positive reports coming in that are even
harder to fix.
As Christoph Hellwig has previously noted, the correct way to fix
this in XFS is to completely change the locking within XFS directory
operations to do strict parent/child locking like the VFS does.
Unfortunately, that's not as simple as it sounds, because inode
flushing and log tail pushing rely on inodes being locked in
ascending inode order to prevent deadlocks within XFS.
That means when we lock multiple inodes in link, rename, etc, we
have to lock them in ascending order. The exception to this is
create, mkdir, mknod because the newly created inode will not be
locked by definition so it is always safe to lock it.
Hence if the new inode's number is less than the parent inode's
number we can get lockdep warning about circular locking
dependencies which don't actually exist. That is where this warning
is coming from....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
prev parent reply other threads:[~2007-06-24 23:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-22 20:40 [REGRESSION 2.6-git] possible circular locking dependency detected with XFS Oliver Pinter
2007-06-22 20:47 ` Oliver Pinter
2007-06-22 22:53 ` Michal Piotrowski
2007-06-24 23:22 ` David Chinner [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=20070624232246.GF86004887@sgi.com \
--to=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=oliver.pntr@gmail.com \
--cc=xfs@oss.sgi.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