public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dave Chinner <david@fromorbit.com>
Cc: ross.zwisler@linux.intel.com, jack@suse.cz, xfs@oss.sgi.com
Subject: Re: [PATCH 3/4 v2] xfs: dynamically switch modes when XFS_DIFLAG2_DAX is set/cleared
Date: Wed, 17 Feb 2016 13:57:27 -0700	[thread overview]
Message-ID: <20160217205727.GA30126@linux.intel.com> (raw)
In-Reply-To: <20160217073121.GC19486@dastard>

On Wed, Feb 17, 2016 at 06:31:21PM +1100, Dave Chinner wrote:
> xfs: dynamically switch modes when XFS_DIFLAG2_DAX is set/cleared
> 
> From: Dave Chinner <dchinner@redhat.com>
> 
> When we set or clear the XFS_DIFLAG2_DAX flag, we should also
> set/clear the S_DAX flag in the VFS inode. To do this, we need to
> ensure that we first flush and remove any cached entries in the
> radix tree to ensure the correct data access method is used when we
> next try to read or write data. We ahve to be especially careful
> here to lock out page faults so they don't race with the flush and
> invalidation before we change the access mode.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
> Version 2:
> - fix lock leak in xfs_ioctl_setattr where dquot allocation could
>   fail after we'd locked the inode iolock and mmaplock but we didn't
>   unlock them on error.
> 
>  fs/xfs/xfs_ioctl.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 92 insertions(+), 13 deletions(-)
<>
> @@ -1072,19 +1115,27 @@ xfs_ioctl_setattr_xflags(
>   * have permission to do so. On success, return a clean transaction and the
>   * inode locked exclusively ready for further operation specific checks. On
>   * failure, return an error without modifying or locking the inode.
> + *
> + * The inode might already be IO locked on call. If this is the case, it is
> + * indicated in @join_flags and we take full responsibility for ensuring they
> + * are unlocked from now on. Hence if we have an error here, we still have to
> + * unlock them. Otherwise, once they are joined to the transaction, they will
> + * be unlocked on commit/cancel.
>   */
>  static struct xfs_trans *
>  xfs_ioctl_setattr_get_trans(
> -	struct xs_inode	*ip)
> +	struct xfs_inode	*ip,

Interesting - it looks like 'xfs_inode' got corrupted to 'xs_inode'?

After fixing this the series passed all my testing.
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>

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

  reply	other threads:[~2016-02-17 20:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  5:22 [PATCH 0/4] xfs: fixes for XFS_DIFLAG2_DAX support Dave Chinner
2016-02-15  5:22 ` [PATCH 1/4] xfs: XFS_DIFLAG_DAX is only for regular files or directories Dave Chinner
2016-02-15  5:22 ` [PATCH 2/4] xfs: S_DAX is only for regular files Dave Chinner
2016-02-15  5:22 ` [PATCH 3/4] xfs: dynamically switch modes when XFS_DIFLAG2_DAX is set/cleared Dave Chinner
2016-02-17  7:31   ` [PATCH 3/4 v2] " Dave Chinner
2016-02-17 20:57     ` Ross Zwisler [this message]
2016-02-15  5:22 ` [PATCH 4/4] xfs: XFS_DIFLAG2_DAX limited by PAGE_SIZE Dave Chinner
2016-02-16  0:12   ` Eric Sandeen
2016-02-16  0:39     ` Dave Chinner
2016-02-16  0:54       ` Eric Sandeen
2016-02-16 23:53 ` [PATCH 0/4] xfs: fixes for XFS_DIFLAG2_DAX support Ross Zwisler
2016-02-17  0:23   ` Dave Chinner
2016-02-17 20:04 ` Brian Foster
2016-02-17 22:56 ` Ross Zwisler

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=20160217205727.GA30126@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --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