* TAKE 981498 - kill xfs_lock_dir_and_entry
@ 2008-07-25 5:18 Donald Douwsma
2008-07-25 6:12 ` Dave Chinner
0 siblings, 1 reply; 2+ messages in thread
From: Donald Douwsma @ 2008-07-25 5:18 UTC (permalink / raw)
To: xfs, sgi.bugs.xfs
kill xfs_lock_dir_and_entry
When multiple inodes are locked in XFS it happens in order of the inode
number, with the everything but the first inode trylocked if any of
the previous inodes is in the AIL.
Except for the sorting of the inodes this logic is implemented in
xfs_lock_inodes, but also partially duplicated in xfs_lock_dir_and_entry
in a particularly stupid way adds a lock roundtrip if the inode ordering
is not optimal.
This patch adds a new helper xfs_lock_two_inodes that takes two inodes
and locks them in the most optimal way according to the above locking
protocol and uses it for all places that want to lock two inodes.
The only caller of xfs_lock_inodes is xfs_rename which might lock up to
four inodes.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Date: Fri Jul 25 15:14:03 AEST 2008
Workarea: linuxbuild.melbourne.sgi.com:/home/donaldd/isms/2.6.x-xfs
Inspected by: hch
The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
Modid: xfs-linux-melb:xfs-kern:31772a
fs/xfs/xfs_vnodeops.c - 1.769 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.769&r2=text&tr2=1.768&f=h
- kill xfs_lock_dir_and_entry
fs/xfs/xfs_dfrag.c - 1.70 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dfrag.c.diff?r1=text&tr1=1.70&r2=text&tr2=1.69&f=h
- kill xfs_lock_dir_and_entry
fs/xfs/xfs_inode.h - 1.252 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.252&r2=text&tr2=1.251&f=h
- kill xfs_lock_dir_and_entry
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: TAKE 981498 - kill xfs_lock_dir_and_entry
2008-07-25 5:18 TAKE 981498 - kill xfs_lock_dir_and_entry Donald Douwsma
@ 2008-07-25 6:12 ` Dave Chinner
0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2008-07-25 6:12 UTC (permalink / raw)
To: Donald Douwsma; +Cc: xfs
On Fri, Jul 25, 2008 at 03:18:59PM +1000, Donald Douwsma wrote:
> kill xfs_lock_dir_and_entry
....
> Date: Fri Jul 25 15:14:03 AEST 2008
> Workarea: linuxbuild.melbourne.sgi.com:/home/donaldd/isms/2.6.x-xfs
> Inspected by: hch
Ah - I think you are dropping the review on all these checkins,
Donald. My name should be against that as having reviewed it....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-25 6:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 5:18 TAKE 981498 - kill xfs_lock_dir_and_entry Donald Douwsma
2008-07-25 6:12 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox