FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] generic/805: fix for external RT devices
@ 2026-09-24  6:21 Christoph Hellwig
  2026-09-24 13:56 ` Zorro Lang
  2026-09-28  9:50 ` Zorro Lang
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2026-09-24  6:21 UTC (permalink / raw)
  To: zlang; +Cc: moritz.tanner, fstests

use _mkfs_dev on the dm device instead of _scratch_mkfs_sized, otherwise
the file system could be created with an external RT device, and will
then fail to mount without it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/generic/805 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/805 b/tests/generic/805
index ae498f5c6698..401829c4c6fc 100755
--- a/tests/generic/805
+++ b/tests/generic/805
@@ -31,7 +31,7 @@ _cleanup()
 	rm -f $tmp.*
 }
 
-_require_scratch
+_require_scratch_nocheck
 _require_dm_target linear
 _require_freeze
 
@@ -39,13 +39,13 @@ echo "Silence is golden"
 
 size=$((256 * 1024 * 1024))
 size_in_sector=$((size / 512))
-_scratch_mkfs_sized $size >> $seqres.full 2>&1
 
 node=$seq-test
 lvdev=/dev/mapper/$node
 table="0 $size_in_sector linear $SCRATCH_DEV 0"
 _dmsetup_create $node --table "$table" || \
 	_fail "failed to create dm device"
+_mkfs_dev $lvdev >> $seqres.full 2>&1
 
 _mount $lvdev $SCRATCH_MNT || _fail "failed to mount dm device"
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] generic/805: fix for external RT devices
  2026-09-24  6:21 [PATCH] generic/805: fix for external RT devices Christoph Hellwig
@ 2026-09-24 13:56 ` Zorro Lang
  2026-09-25  5:03   ` Christoph Hellwig
  2026-09-28  9:50 ` Zorro Lang
  1 sibling, 1 reply; 4+ messages in thread
From: Zorro Lang @ 2026-09-24 13:56 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: moritz.tanner, fstests

On Thu, Sep 24, 2026 at 08:21:18AM +0200, Christoph Hellwig wrote:
> use _mkfs_dev on the dm device instead of _scratch_mkfs_sized, otherwise
> the file system could be created with an external RT device, and will
> then fail to mount without it.

This patch makes sense to me. But I was wondering if we should have a helper
similar to _ignore_scratch_external_devices to allow a temporary device to
act as SCRATCH_DEV, so it can use the _scratch_* helpers ?

Thanks,
Zorro

> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/generic/805 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/generic/805 b/tests/generic/805
> index ae498f5c6698..401829c4c6fc 100755
> --- a/tests/generic/805
> +++ b/tests/generic/805
> @@ -31,7 +31,7 @@ _cleanup()
>  	rm -f $tmp.*
>  }
>  
> -_require_scratch
> +_require_scratch_nocheck
>  _require_dm_target linear
>  _require_freeze
>  
> @@ -39,13 +39,13 @@ echo "Silence is golden"
>  
>  size=$((256 * 1024 * 1024))
>  size_in_sector=$((size / 512))
> -_scratch_mkfs_sized $size >> $seqres.full 2>&1
>  
>  node=$seq-test
>  lvdev=/dev/mapper/$node
>  table="0 $size_in_sector linear $SCRATCH_DEV 0"
>  _dmsetup_create $node --table "$table" || \
>  	_fail "failed to create dm device"
> +_mkfs_dev $lvdev >> $seqres.full 2>&1
>  
>  _mount $lvdev $SCRATCH_MNT || _fail "failed to mount dm device"
>  
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] generic/805: fix for external RT devices
  2026-09-24 13:56 ` Zorro Lang
@ 2026-09-25  5:03   ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2026-09-25  5:03 UTC (permalink / raw)
  To: Christoph Hellwig, moritz.tanner, fstests

On Thu, Sep 24, 2026 at 09:56:53PM +0800, Zorro Lang wrote:
> On Thu, Sep 24, 2026 at 08:21:18AM +0200, Christoph Hellwig wrote:
> > use _mkfs_dev on the dm device instead of _scratch_mkfs_sized, otherwise
> > the file system could be created with an external RT device, and will
> > then fail to mount without it.
> 
> This patch makes sense to me. But I was wondering if we should have a helper
> similar to _ignore_scratch_external_devices to allow a temporary device to
> act as SCRATCH_DEV, so it can use the _scratch_* helpers ?

You can't just ignore external devices, as options might also not apply
any more.  We could add new helpers for just use scratch without
external devices, but IMHO there is no much benefit over just using the
_dev helpers.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] generic/805: fix for external RT devices
  2026-09-24  6:21 [PATCH] generic/805: fix for external RT devices Christoph Hellwig
  2026-09-24 13:56 ` Zorro Lang
@ 2026-09-28  9:50 ` Zorro Lang
  1 sibling, 0 replies; 4+ messages in thread
From: Zorro Lang @ 2026-09-28  9:50 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: moritz.tanner, fstests

On Thu, Sep 24, 2026 at 08:21:18AM +0200, Christoph Hellwig wrote:
> use _mkfs_dev on the dm device instead of _scratch_mkfs_sized, otherwise
> the file system could be created with an external RT device, and will
> then fail to mount without it.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

This change is good to me,

Reviewed-by: Zorro Lang <zlang@kernel.org>

>  tests/generic/805 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/generic/805 b/tests/generic/805
> index ae498f5c6698..401829c4c6fc 100755
> --- a/tests/generic/805
> +++ b/tests/generic/805
> @@ -31,7 +31,7 @@ _cleanup()
>  	rm -f $tmp.*
>  }
>  
> -_require_scratch
> +_require_scratch_nocheck
>  _require_dm_target linear
>  _require_freeze
>  
> @@ -39,13 +39,13 @@ echo "Silence is golden"
>  
>  size=$((256 * 1024 * 1024))
>  size_in_sector=$((size / 512))
> -_scratch_mkfs_sized $size >> $seqres.full 2>&1
>  
>  node=$seq-test
>  lvdev=/dev/mapper/$node
>  table="0 $size_in_sector linear $SCRATCH_DEV 0"
>  _dmsetup_create $node --table "$table" || \
>  	_fail "failed to create dm device"
> +_mkfs_dev $lvdev >> $seqres.full 2>&1
>  
>  _mount $lvdev $SCRATCH_MNT || _fail "failed to mount dm device"
>  
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-28  9:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24  6:21 [PATCH] generic/805: fix for external RT devices Christoph Hellwig
2026-09-24 13:56 ` Zorro Lang
2026-09-25  5:03   ` Christoph Hellwig
2026-09-28  9:50 ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox