From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] xfs: don't allocate into the data fork for an unshare request
Date: Thu, 27 Apr 2023 19:20:55 -0700 [thread overview]
Message-ID: <20230428022055.GG59213@frogsfrogsfrogs> (raw)
In-Reply-To: <20230428021346.GQ3223426@dread.disaster.area>
On Fri, Apr 28, 2023 at 12:13:46PM +1000, Dave Chinner wrote:
> On Thu, Apr 27, 2023 at 03:49:16PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > For an unshare request, we only have to take action if the data fork has
> > a shared mapping. We don't care if someone else set up a cow operation.
> > If we find nothing in the data fork, return a hole to avoid allocating
> > space.
> >
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> > fs/xfs/xfs_iomap.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
>
> Looks ok, but I'm unsure of what bad behaviour this might be fixing.
> Did you just notice this, or does it fix some kind of test failure?
I noticed it while I was running the freespace defrag code in djwong-dev
with tracepoints turned on. THere was a math bug that I was trying to
sort out that resulted in FUNSHARE being called on a hole, and I was
surprised that it would create a delalloc reservation and then convert
it to an unwritten extent instead of going straight to an unwritten
extent.
AFAICT it has no user visible effect other than not wasting cycles on
pointless work.
--D
> -Dave.
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2023-04-28 2:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 22:48 [PATCHSET 0/4] xfs: bug fixes for 6.4-rc1 Darrick J. Wong
2023-04-27 22:48 ` [PATCH 1/4] xfs: don't unconditionally null args->pag in xfs_bmap_btalloc_at_eof Darrick J. Wong
2023-04-28 1:49 ` Dave Chinner
2023-04-28 4:30 ` Darrick J. Wong
2023-04-27 22:49 ` [PATCH 2/4] xfs: set bnobt/cntbt numrecs correctly when formatting new AGs Darrick J. Wong
2023-04-28 2:11 ` Dave Chinner
2023-04-28 4:29 ` Darrick J. Wong
2023-04-27 22:49 ` [PATCH 3/4] xfs: flush dirty data and drain directios before scrubbing cow fork Darrick J. Wong
2023-04-28 2:11 ` Dave Chinner
2023-04-27 22:49 ` [PATCH 4/4] xfs: don't allocate into the data fork for an unshare request Darrick J. Wong
2023-04-28 2:13 ` Dave Chinner
2023-04-28 2:20 ` Darrick J. Wong [this message]
2023-04-28 2:31 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2023-05-01 18:26 [PATCHSET v2 0/4] xfs: bug fixes for 6.4-rc1 Darrick J. Wong
2023-05-01 18:27 ` [PATCH 4/4] xfs: don't allocate into the data fork for an unshare request Darrick J. Wong
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=20230428022055.GG59213@frogsfrogsfrogs \
--to=djwong@kernel.org \
--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