public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	zlang@kernel.org, luca.dimaio1@gmail.com,
	linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] xfs/841: create a block device that must exist
Date: Wed, 4 Mar 2026 13:55:02 +0100	[thread overview]
Message-ID: <20260304125502.GA13048@lst.de> (raw)
In-Reply-To: <20260303175300.GT57948@frogsfrogsfrogs>

On Tue, Mar 03, 2026 at 09:53:00AM -0800, Darrick J. Wong wrote:
> On Mon, Feb 02, 2026 at 09:57:01AM +0100, Christoph Hellwig wrote:
> > This test currently creates a block device node for /dev/ram0,
> > which isn't guaranteed to exist, and can thus cause the test to
> > fail with:
> > 
> > mkfs.xfs: cannot open $TEST_DIR/proto/blockdev: No such device or address
> > 
> > Instead, create a node for the backing device for $TEST_DIR, which must
> > exist.
> 
> Hrm.  I'm still noticing regressions with this test, particularly when
> the blocksize of the test filesystem is different from the block size
> of the $IMG_FILE filesystem.

That is with the test in general, and not because of the block device
fix, right?  Your description seems to indicate that, I'm just a bit
confused as it is replying to my incremental patch.

> So I started looking for fsblock discrepancies between
> xfs_reproducible_test.img.[1-3] and noticed that EOF block contents are
> different if the file being copied in has sparse holes in it that are
> not aligned to the fsblock size of the new filesystem.

Oooh.

> Next, the region at 3k causes mkfs to re-call libxfs_file_write, but
> this time it writes 3072 bytes of zeroes and 1024 bytes of copied-in
> data, thus obliterating the first write.
> 
> That bug's on me,

Yeah.


> and I'll fix it in writefile by rounding data_pos and
> hole_pos outward as needed to be aligned to the block size of the copied
> in filesystem.  And I'll update xfs/841 to compare $PROTO_DIR against
> what's in the new filesystem.
> 
> That fixes the data corruption problem, but then the test still fails
> because now the space map isn't the same between mkfs invocations.

Aarg.  But I'm glad we got a test for this feature that's uncovering
old buggy/sloppy libxfs code..


  reply	other threads:[~2026-03-04 12:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02  8:57 [PATCH] xfs/841: create a block device that must exist Christoph Hellwig
2026-02-02 18:54 ` Luca Di Maio
2026-02-03  8:28 ` Zorro Lang
2026-03-03 17:53 ` Darrick J. Wong
2026-03-04 12:55   ` Christoph Hellwig [this message]
2026-03-04 16:49     ` 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=20260304125502.GA13048@lst.de \
    --to=hch@lst.de \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=luca.dimaio1@gmail.com \
    --cc=zlang@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