From: donaldd@sgi.com (Donald Douwsma)
To: xfs@oss.sgi.com, sgi.bugs.xfs@engr.sgi.com
Subject: TAKE 981498 - kill xfs_lock_dir_and_entry
Date: Fri, 25 Jul 2008 15:18:59 +1000 (EST) [thread overview]
Message-ID: <20080725051859.C7093359F6F9@linuxbuild.melbourne.sgi.com> (raw)
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
next reply other threads:[~2008-07-25 5:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 5:18 Donald Douwsma [this message]
2008-07-25 6:12 ` TAKE 981498 - kill xfs_lock_dir_and_entry Dave Chinner
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=20080725051859.C7093359F6F9@linuxbuild.melbourne.sgi.com \
--to=donaldd@sgi.com \
--cc=sgi.bugs.xfs@engr.sgi.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