From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix shared extent data corruption due to missing cow reservation
Date: Thu, 15 Nov 2018 01:50:50 -0800 [thread overview]
Message-ID: <20181115095050.GB10264@infradead.org> (raw)
In-Reply-To: <20181113170819.15220-1-bfoster@redhat.com>
On Tue, Nov 13, 2018 at 12:08:19PM -0500, Brian Foster wrote:
> diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> index ecdb086bc23e..c56bdbfcf7ae 100644
> --- a/fs/xfs/xfs_reflink.c
> +++ b/fs/xfs/xfs_reflink.c
> @@ -296,6 +296,7 @@ xfs_reflink_reserve_cow(
> if (error)
> return error;
>
> + xfs_trim_extent(imap, got.br_startoff, got.br_blockcount);
> trace_xfs_reflink_cow_alloc(ip, &got);
> return 0;
It would be kinda nice to have a comment explaining this trimming,
and a goto label to share it with the case where we find existing
delalloc reservations.
That being said my always_cow series totally reshuffles this area, so
it might not be worth to spend the effort here, so:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2018-11-15 19:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 17:08 [PATCH] xfs: fix shared extent data corruption due to missing cow reservation Brian Foster
2018-11-15 5:50 ` Darrick J. Wong
2018-11-15 9:49 ` Christoph Hellwig
2018-11-15 12:33 ` Brian Foster
2018-11-16 4:35 ` Dave Chinner
2018-11-16 13:32 ` Brian Foster
2018-11-16 21:19 ` Dave Chinner
2018-11-17 13:33 ` Brian Foster
2018-11-15 9:50 ` Christoph Hellwig [this message]
2018-11-15 15:51 ` Eric Sandeen
2018-11-15 15:58 ` Brian Foster
2018-11-15 15:59 ` Eric Sandeen
2018-11-15 16:10 ` Brian Foster
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=20181115095050.GB10264@infradead.org \
--to=hch@infradead.org \
--cc=bfoster@redhat.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).