login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
25
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Lachlan McIlroy
Subject:
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
Date: Sunday, August 24, 2008 - 7:12 pm
Dave Chinner wrote:
quoted text
> On Fri, Aug 22, 2008 at 10:12:59PM +0100, Daniel J Blueman wrote: >> On 2.6.27-rc4 with various debug options enabled, lockdep claims lock >> ordering issues with XFS [1] - easiest reproducer is just running >> xfs_fsr. Mount options I was using were >> 'nobarrier,noatime,nodiratime'. >> >> Thanks, >> Daniel >> >> --- [1] >> >> ======================================================= >> [ INFO: possible circular locking dependency detected ] >> 2.6.27-rc4-224c #1 >> ------------------------------------------------------- >> xfs_fsr/5763 is trying to acquire lock: >> (&(&ip->i_lock)->mr_lock/2){--..}, at: [<ffffffff803ad8fc>] xfs_ilock+0x8c/0xb0 >> >> but task is already holding lock: >> (&(&ip->i_iolock)->mr_lock/3){--..}, at: [<ffffffff803ad915>] >> xfs_ilock+0xa5/0xb0 > > False positive. We do: > > xfs_lock_two_inodes(ip, tip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL);
Why not just change the above line to two lines: xfs_lock_two_inodes(ip, tip, XFS_IOLOCK_EXCL); xfs_lock_two_inodes(ip, tip, XFS_ILOCK_EXCL);
quoted text
> ..... > xfs_iunlock(ip, XFS_ILOCK_EXCL); > xfs_iunlock(tip, XFS_ILOCK_EXCL); > ..... > xfs_lock_two_inodes(ip, tip, XFS_ILOCK_EXCL); > > Which is a perfectly valid thing to do. > > The problem is that lockdep is complaining about the second call > to xfs_lock_two_inodes(), which uses the subclasses 2 and 3. > effectively it is seeing: > > xfs_lock_two_inodes(ip, tip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL); > iolock/2 > ilock/2 > iolock/3 > ilock/3 > ..... > xfs_lock_two_inodes(ip, tip, XFS_ILOCK_EXCL); > ilock/2 > ilock/3 > > > But because the original lock order was ilock/2->iolock/3, the > second call to xfs_lock_two_inodes is seeing iolock/3->ilock/2 > which it then complains about.... > > Christoph - I think we're going to need to pass a lockdep 'order' > flag into xfs_lock_two_inodes() to avoid this so the second call > can use different classes to the first call. Or perhaps a '_nested' > variant of the call... > > Cheers, > > Dave.
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[2.6.27-rc4] XFS i_lock vs i_iolock...
, Daniel J Blueman
, (Fri Aug 22, 2:12 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Dave Chinner
, (Sun Aug 24, 6:02 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Lachlan McIlroy
, (Sun Aug 24, 7:12 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Dave Chinner
, (Sun Aug 24, 8:55 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Peter Zijlstra
, (Sun Aug 24, 11:57 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Peter Zijlstra
, (Sun Aug 24, 11:59 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Christoph Hellwig
, (Mon Aug 25, 2:55 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Dave Chinner
, (Mon Aug 25, 6:55 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Dave Chinner
, (Mon Aug 25, 7:45 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Christoph Hellwig
, (Tue Aug 26, 12:35 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Daniel J Blueman
, (Tue Aug 26, 1:13 pm)
Re: [2.6.27-rc4] XFS i_lock vs i_iolock...
, Daniel J Blueman
, (Tue Aug 26, 2:34 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Hugh Dickins
Re: Linux 2.6.26-rc1 - pgtable_32.c:178 pmd_bad
Bernhard Beck
[PATCH 001/001] usb-serial: Add ThinkOptics WavIT
Oleg Nesterov
Re: [PATCH 4/5] don't panic if /sbin/init exits or killed
Greg KH
[patch 07/21] rtc-pcf8563: detect polarity of century bit automatically
git
:
Jonathan del Strother
Re: [PATCH] Fixing path quoting issues
Gerrit Pape
[PATCH] fix skipping merge-order test with NO_OPENSSL=1.
Linus Torvalds
Re: Implementing branch attributes in git config
Johannes Schindelin
Re: Trying to use git-filter-branch to compress history by removing large, obsolet...
Gerrit Pape
[PATCH] hooks--update: fix test for properly set up project description file
linux-netdev
:
David Miller
Re: [PATCH 04/15] tg3: Preserve LAA when device control is released
Jean-Louis Dupond
Re: tg3 driver not advertising 1000mbit
Sven Wegener
[PATCH] ipvs: Add missing locking during connection table hashing and unhashing
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
Stephen Hemminger
[PATCH 2/2] sky2: fix transmit state on resume
git-commits-head
:
Linux Kernel Mailing List
[SCSI] scsi ioctl: fix kernel-doc warning
Linux Kernel Mailing List
ALSA: HDA - Correct trivial typos in comments.
Linux Kernel Mailing List
i2c-viapro: Add support for SMBus Process Call transactions
Linux Kernel Mailing List
i2c: Documentation: upgrading clients HOWTO
Linux Kernel Mailing List
[PATCH] fix sysctl_nr_open bugs
openbsd-misc
:
Die Gestalt
Re: How to re-build openssl with SHA1 support?
Edwin Eyan Moragas
Re: managing routes for multiple PPPoE connections
Brian Candler
Re: OBSD's perspective on SELinux
Jonathan Schleifer
Why is getaddrinfo breaking POSIX?
Predrag Punosevac
Re: Kernel developers guide/tutorial
Colocation donated by:
Syndicate