public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/5] xfs: cancel COW blocks before swapext
Date: Mon, 1 Oct 2018 07:03:59 -0400	[thread overview]
Message-ID: <20181001110359.GB53694@bfoster> (raw)
In-Reply-To: <20180930225030.GB18893@lst.de>

On Mon, Oct 01, 2018 at 12:50:30AM +0200, Christoph Hellwig wrote:
> On Thu, Sep 27, 2018 at 11:07:31AM -0400, Brian Foster wrote:
> > On Thu, Sep 20, 2018 at 04:42:16PM +0200, Christoph Hellwig wrote:
> > > We need to make sure we have no outstanding COW blocks before we swap
> > > extents, as there is nothing preventing us from having COW preallocations
> > > on an inode that swapext is called on.  That case can easily be
> > > reproduced by the upcoming always_cow mode.
> > > 
> > 
> > Why? Is the current code to swap the cow forks not sufficient or
> > problematic in some way?
> 
> The code didn't seem happy with non-delalloc COW fork extents sticking
> around over swapext, but I'd have to go back and look up why.
> 

It would be nice to have at least a high level note in the commit log
for historical purposes, so we have a reference on what needs fixing if
we revisit it in the future.

> It seemed easiest to just cancel them as there is no reason to keep
> these alive over a swapext.

Seems reasonable to me. I'd just perhaps replace the cowblocks flag swap
code with asserts or something to be consistent, because it seems that
should never be set on either inode with this change in place.

Brian

  reply	other threads:[~2018-10-01 17:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 14:42 more reflink fixes & debug Christoph Hellwig
2018-09-20 14:42 ` [PATCH 1/5] xfs: cancel COW blocks before swapext Christoph Hellwig
2018-09-20 20:04   ` Darrick J. Wong
2018-09-27 15:07   ` Brian Foster
2018-09-30 22:50     ` Christoph Hellwig
2018-10-01 11:03       ` Brian Foster [this message]
2018-09-20 14:42 ` [PATCH 2/5] xfs: skip delalloc COW blocks in xfs_reflink_end_cow Christoph Hellwig
2018-09-20 20:22   ` Darrick J. Wong
2018-09-20 14:42 ` [PATCH 3/5] xfs: fix fork selection in xfs_find_trim_cow_extent Christoph Hellwig
2018-09-20 14:42 ` [PATCH 4/5] xfs: print dangling delalloc extents Christoph Hellwig
2018-09-20 20:06   ` Darrick J. Wong
2018-09-27 15:07   ` Brian Foster
2018-09-20 14:42 ` [PATCH 5/5] xfs: introduce an always_cow mode Christoph Hellwig
2018-09-20 20:17   ` Darrick J. Wong
2018-09-20 21:23     ` Dave Chinner
2018-09-21  5:23       ` 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=20181001110359.GB53694@bfoster \
    --to=bfoster@redhat.com \
    --cc=hch@lst.de \
    --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