public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: fix reflink source file racing with directio writes
Date: Thu, 15 Aug 2019 23:42:06 -0700	[thread overview]
Message-ID: <20190816064206.GC2024@infradead.org> (raw)
In-Reply-To: <20190815213716.GS6129@dread.disaster.area>

On Fri, Aug 16, 2019 at 07:37:17AM +1000, Dave Chinner wrote:
> I don't think this is quite right yet. The source inode locking
> change is good, but it doesn't break the layout on the source inode
> and so there is still they possibility that something has physical
> access and is directly modifying the source file.
> 
> And with that, I suspect the locking algorithm changes
> substantially:
> 
> 	order inodes
> restart:
> 	lock first inode
> 	break layout on first inode
> 	lock second inode
> 	break layout on second inode
> 	fail then unlock both inodes, goto restart

Agreed, that is the locking scheme I'd expect.

  reply	other threads:[~2019-08-16  6:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 16:50 [PATCH] xfs: fix reflink source file racing with directio writes Darrick J. Wong
2019-08-15 21:37 ` Dave Chinner
2019-08-16  6:42   ` Christoph Hellwig [this message]
2019-08-16 16:11 ` [PATCH v2] " Darrick J. Wong
2019-08-18  8:38   ` Christoph Hellwig

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=20190816064206.GC2024@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /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