public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>, xfs@oss.sgi.com
Subject: Re: [PATCH 1/5] xfs: clean up inode locking for RENAME_WHITEOUT
Date: Tue, 24 Mar 2015 16:11:24 -0500	[thread overview]
Message-ID: <5511D2FC.8080907@sandeen.net> (raw)
In-Reply-To: <1427194771-3105-2-git-send-email-david@fromorbit.com>

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 ;)

Patch5 uses *wip, so if you want consistency, might consider that.

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-03-24 21:11 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 [this message]
2015-03-24 21:26     ` Dave Chinner
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=5511D2FC.8080907@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.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