From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/4] xfs: don't be so eager to clear the cowblocks tag on truncate
Date: Tue, 19 Dec 2017 11:12:58 +1100 [thread overview]
Message-ID: <20171219001258.GI4094@dastard> (raw)
In-Reply-To: <151335788573.26575.10453091656387965703.stgit@magnolia>
On Fri, Dec 15, 2017 at 09:11:25AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Currently, xfs_itruncate_extents clears the cowblocks tag if i_cnextents
> is zero. This is wrong, since i_cnextents only tracks real extents in
> the CoW fork, which means that we could have some delayed CoW
> reservations still in there that will now never get cleaned.
>
> Fix a further bug where we /don't/ clear the reflink iflag if there are
> any attribute blocks -- really, it's only safe to clear the reflink flag
> if there are no data fork extents and no cow fork extents.
>
> Found by adding clonerange to fsstress in xfs/017.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-12-19 0:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 17:11 [PATCH 0/4] xfs: more reflink fixes Darrick J. Wong
2017-12-15 17:11 ` [PATCH 1/4] xfs: track cowblocks separately in i_flags Darrick J. Wong
2017-12-19 0:12 ` Dave Chinner
2017-12-21 13:36 ` Christoph Hellwig
2017-12-15 17:11 ` [PATCH 2/4] xfs: don't be so eager to clear the cowblocks tag on truncate Darrick J. Wong
2017-12-19 0:12 ` Dave Chinner [this message]
2017-12-21 13:37 ` Christoph Hellwig
2017-12-15 17:11 ` [PATCH 3/4] xfs: remove leftover CoW reservations when remounting ro Darrick J. Wong
2017-12-19 0:17 ` Dave Chinner
2017-12-19 3:49 ` Darrick J. Wong
2017-12-19 4:37 ` Dave Chinner
2017-12-19 4:53 ` Darrick J. Wong
2017-12-19 6:46 ` Dave Chinner
2017-12-19 19:00 ` Darrick J. Wong
2017-12-19 20:55 ` Dave Chinner
2017-12-19 21:08 ` [PATCH v2 " Darrick J. Wong
2017-12-21 13:38 ` Christoph Hellwig
2017-12-15 17:11 ` [PATCH 4/4] xfs: set cowblocks tag for direct cow writes too Darrick J. Wong
2017-12-19 0:18 ` Dave Chinner
2017-12-21 13:39 ` Christoph Hellwig
2017-12-19 21:09 ` [PATCH 5/4] xfs: clean up cow mappings during fs data freeze Darrick J. Wong
2017-12-21 13:39 ` 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=20171219001258.GI4094@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.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;
as well as URLs for NNTP newsgroup(s).