From: Anand Jain <anajain.sg@gmail.com>
To: Zorro Lang <zlang@redhat.com>, Anand Jain <asj@kernel.org>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/9] fstests: add _mkfs_scratch_clone() helper
Date: Wed, 11 Mar 2026 10:32:18 +0800 [thread overview]
Message-ID: <43710dd2-4282-4475-a29d-983295fab86f@gmail.com> (raw)
In-Reply-To: <20260309191317.vxcjvqfpoqdiycki@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>
> What about if ${#devs[@]} > 2 ?
On purpose- so tests using _scratch_mkfs_sized_clone() don't
pick a random higher number. If a test needs more than two
devices, opens an opportunity to critically review this function.
>> + fi
>> +
>> + case "$FSTYP" in
>> + "btrfs")
>> + _scratch_mkfs_sized $size
>> + _scratch_mount
>> + $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/sv1
>> + _scratch_unmount
>> + ;;
>> + "xfs"|"ext4")
>> + _scratch_mkfs_sized $size
>> + ;;
>> + *)
>> + _notrun "fstests clone op unsupported for FS $FSTYP"
>> + ;;
>> + esac
>> +
>> + # clone SCRATCH_DEV devs[0] to devs[1].
>> + dd if=$SCRATCH_DEV of=${devs[1]} bs=$size status=none count=1 || \
>> + _fail "Clone failed"
>
> I'm wondering if we absolutely need to use SCRATCH_DEV_POOL for this test. Could we clone SCRATCH_DEV
> to an image file instead? Or would it be feasible to simply run the test using two image files?
Using a config file and testing directly on block devices lets
us cover a wider range of devices.
When I wrote this test case, I was also considering whether a
serial-number–based mount without extra mount option, would be
better in the kernel.
The downside is that xfs/ext4 testers now need to use
SCRATCH_DEV_POOL. Let me know what you prefer.
next prev parent reply other threads:[~2026-03-11 2:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 14:41 [PATCH 0/9] fstests: add test coverage for cloned filesystem ids Anand Jain
2026-02-26 14:41 ` [PATCH 1/9] fstests: allow SCRATCH_DEV_POOL for non-Btrfs filesystems Anand Jain
2026-02-26 14:41 ` [PATCH 2/9] fstests: add _mkfs_scratch_clone() helper Anand Jain
2026-03-09 19:13 ` Zorro Lang
2026-03-11 2:32 ` Anand Jain [this message]
2026-03-14 17:04 ` Zorro Lang
2026-03-16 16:15 ` Christoph Hellwig
2026-03-21 12:02 ` Anand Jain
2026-02-26 14:41 ` [PATCH 3/9] fstests: add _clone_mount_option() helper Anand Jain
2026-02-26 14:41 ` [PATCH 4/9] fstests: add test for inotify isolation on cloned devices Anand Jain
2026-03-01 13:07 ` Amir Goldstein
2026-03-02 13:24 ` Anand Jain
2026-02-26 14:41 ` [PATCH 5/9] fstests: verify fanotify isolation on cloned filesystems Anand Jain
2026-03-01 13:15 ` Amir Goldstein
2026-03-02 13:30 ` Anand Jain
2026-02-26 14:41 ` [PATCH 6/9] fstests: verify f_fsid for " Anand Jain
2026-02-26 14:41 ` [PATCH 7/9] fstests: verify libblkid resolution of duplicate UUIDs Anand Jain
2026-02-26 14:41 ` [PATCH 8/9] fstests: verify IMA isolation on cloned filesystems Anand Jain
2026-02-26 14:41 ` [PATCH 9/9] fstests: verify exportfs file handles " Anand Jain
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=43710dd2-4282-4475-a29d-983295fab86f@gmail.com \
--to=anajain.sg@gmail.com \
--cc=asj@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.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