From: Christoph Hellwig <hch@infradead.org>
To: Filipe Manana <fdmanana@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
Filipe Manana <fdmanana@suse.com>,
linux-xfs@vger.kernel.org, johannes.thumshirn@wdc.com,
naohiro.aota@wdc.com
Subject: Re: [PATCH v2] generic: test overwriting file with mmap on a full filesystem
Date: Tue, 22 Jul 2025 22:48:35 -0700 [thread overview]
Message-ID: <aIB3s2z84mjGGAQM@infradead.org> (raw)
In-Reply-To: <CAL3q7H4_Pc8F6QA4qY420MZzpF8gyEXsr8Dg83UksSBG2mmWCw@mail.gmail.com>
On Tue, Jul 22, 2025 at 11:27:35AM +0100, Filipe Manana wrote:
> > Can you please rework the patch to see that setting the nocow flag
> > works first and only try with that or something like that?
>
> Reworking it is late as it's already in for-next, but we can add a
> patch to skip it on zoned xfs:
It though I explained it before, but let me try again.
This is not about zoned xfs, zoned xfs is just the canary in the coal
mine.
The test fundamentally assumes file systems can overwrite without
space allocations. And then noticed that this isn't true with a weird
btrfs hack.
It needs to be reworked to only run when that is known to be true.
>
> 1) The quickest way would be to add to the test:
> _require_non_zoned_device $SCRATCH_DEV
That test is not relevant here. While zoned device require out of place
updates, they are also common for many other cases.
> 2) Or add a "_require_nocow_data_writes" helper to check we can write
> in place and skip the test if not, as you suggest, as it's more
> generic in case there are other filesystems or configurations where
> data writes are always COWed.
That's the only thing that works. Only run on file systems that are
known to do in-place updates, or in the odd btrfs case can be forced to
even if they don't normally do it.
To be honest the hardcoded btrfs hack should have been a big red flag,
those almost always means the test is fishy.
prev parent reply other threads:[~2025-07-23 5:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 8:53 [PATCH] generic: test overwriting file with mmap on a full filesystem fdmanana
2025-07-10 7:29 ` Zorro Lang
2025-07-10 7:45 ` Qu Wenruo
2025-07-10 11:47 ` Filipe Manana
2025-07-10 16:07 ` Zorro Lang
2025-07-10 17:02 ` Filipe Manana
2025-07-10 17:03 ` [PATCH v2] " fdmanana
2025-07-10 18:24 ` Zorro Lang
2025-07-10 22:00 ` Qu Wenruo
2025-07-22 6:55 ` Christoph Hellwig
2025-07-22 7:50 ` Johannes Thumshirn
2025-07-22 8:16 ` hch
2025-07-22 10:27 ` Filipe Manana
2025-07-23 5:48 ` Christoph Hellwig [this message]
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=aIB3s2z84mjGGAQM@infradead.org \
--to=hch@infradead.org \
--cc=fdmanana@kernel.org \
--cc=fdmanana@suse.com \
--cc=fstests@vger.kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
/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).