From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/5] xfs: clean up inode locking for RENAME_WHITEOUT
Date: Wed, 25 Mar 2015 08:26:47 +1100 [thread overview]
Message-ID: <20150324212647.GV28621@dastard> (raw)
In-Reply-To: <5511D2FC.8080907@sandeen.net>
On Tue, Mar 24, 2015 at 04:11:24PM -0500, Eric Sandeen wrote:
> On 3/24/15 5:59 AM, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > When doing RENAME_WHITEOUT, we now have to lock 5 inodes into the
> > rename transaction. This means we need to update
> > xfs_sort_for_rename() and xfs_lock_inodes() to handle up to 5
> > inodes. Because of the vagaries of rename, this means we could have
> > anywhere between 3 and 5 inodes locked into the transaction....
> >
> > While xfs_lock_inodes() does not need anything other than an assert
> > telling us we are passing more inodes that we ever thought we should
> > see, it could do with a logic rework to remove all the indenting.
> > This is not a functional change - it just makes the code a lot
> > easier to read.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
>
> ...
>
> > @@ -2681,19 +2668,22 @@ xfs_remove(
> > /*
> > * Enter all inodes for a rename transaction into a sorted array.
> > */
> > +#define __XFS_SORT_INODES 5
> > STATIC void
> > xfs_sort_for_rename(
> > - xfs_inode_t *dp1, /* in: old (source) directory inode */
> > - xfs_inode_t *dp2, /* in: new (target) directory inode */
> > - xfs_inode_t *ip1, /* in: inode of old entry */
> > - xfs_inode_t *ip2, /* in: inode of new entry, if it
> > - already exists, NULL otherwise. */
> > - xfs_inode_t **i_tab,/* out: array of inode returned, sorted */
> > - int *num_inodes) /* out: number of inodes in array */
> > + struct xfs_inode *dp1, /* in: old (source) directory inode */
> > + struct xfs_inode *dp2, /* in: new (target) directory inode */
> > + struct xfs_inode *ip1, /* in: inode of old entry */
> > + struct xfs_inode *ip2, /* in: inode of new entry */
> > + struct xfs_inode *wino, /* in: whiteout inode */
>
> I'm not 100% morally opposed, but you still have a wino lurking around here ;)
Ah, I missed that one when splitting the patch. Will fix.
-Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-03-24 21:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 10:59 [PATCH 0/5 V2] xfs: RENAME_WHITEOUT support Dave Chinner
2015-03-24 10:59 ` [PATCH 1/5] xfs: clean up inode locking for RENAME_WHITEOUT Dave Chinner
2015-03-24 21:11 ` Eric Sandeen
2015-03-24 21:26 ` Dave Chinner [this message]
2015-03-24 10:59 ` [PATCH 2/5] xfs: cleanup xfs_rename error handling Dave Chinner
2015-03-24 10:59 ` [PATCH 3/5] xfs: factor out xfs_rename_finish() Dave Chinner
2015-03-24 21:04 ` Eric Sandeen
2015-03-24 21:27 ` Dave Chinner
2015-03-24 10:59 ` [PATCH 4/5] xfs: make xfs_cross_rename() complete fully Dave Chinner
2015-03-24 10:59 ` [PATCH 5/5] xfs: add RENAME_WHITEOUT support Dave Chinner
2015-03-24 19:41 ` [PATCH 0/5 V2] xfs: " Brian Foster
2015-03-24 21:12 ` Eric Sandeen
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=20150324212647.GV28621@dastard \
--to=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.