All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/4] xfs: don't assert if cmap covers imap after cycling lock
Date: Tue, 20 Dec 2022 15:49:51 +1100	[thread overview]
Message-ID: <20221220044951.GJ1971568@dread.disaster.area> (raw)
In-Reply-To: <167149470312.336919.14005739948269903315.stgit@magnolia>

On Mon, Dec 19, 2022 at 04:05:03PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> In xfs_reflink_fill_cow_hole, there's a debugging assertion that trips
> if (after cycling the ILOCK to get a transaction) the requeried cow
> mapping overlaps the start of the area being written.  IOWs, it trips if
> the hole in the cow fork that it's supposed to fill has been filled.
> 
> This is trivially possible since we cycled ILOCK_EXCL.  If we trip the
> assertion, then we know that cmap is a delalloc extent because @found is
> false.  Fortunately, the bmapi_write call below will convert the
> delalloc extent to a real unwritten cow fork extent, so all we need to
> do here is remove the assertion.
> 
> It turns out that generic/095 trips this pretty regularly with alwayscow
> mode enabled.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  fs/xfs/xfs_reflink.c |    2 --
>  1 file changed, 2 deletions(-)

Looks fine.


Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2022-12-20  4:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20  0:04 [PATCHSET 0/4] xfs: random fixes for 6.2, part 3 Darrick J. Wong
2022-12-20  0:05 ` [PATCH 1/4] xfs: don't assert if cmap covers imap after cycling lock Darrick J. Wong
2022-12-20  4:49   ` Dave Chinner [this message]
2022-12-20  0:05 ` [PATCH 2/4] xfs: don't stall background reclaim on inactvation Darrick J. Wong
2022-12-20  4:49   ` Dave Chinner
2022-12-20 16:28     ` Darrick J. Wong
2022-12-20  0:05 ` [PATCH 3/4] xfs: make xfs_iomap_page_ops static Darrick J. Wong
2022-12-20  4:49   ` Dave Chinner
2022-12-20  0:05 ` [PATCH 4/4] xfs: fix off-by-one error in xfs_btree_space_to_height Darrick J. Wong
2022-12-20  5:00   ` Dave Chinner
2022-12-20 16:10     ` Darrick J. Wong
2022-12-20 16:20       ` Darrick J. Wong
2022-12-20 20:39         ` Dave Chinner

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=20221220044951.GJ1971568@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.