FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] xfs/541: _notrun if the file system can't mount
@ 2025-01-28  7:14 Christoph Hellwig
  2025-01-28 19:25 ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2025-01-28  7:14 UTC (permalink / raw)
  To: zlang; +Cc: djwong, fstests

A file system created without an RT section might not be able to mount
with an rtdev specified if the RT device has a larger LBA size.

Instead of letting the test fail, _notrun it for that case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/541 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/xfs/541 b/tests/xfs/541
index 42bcd95802c5..c8b312fddc92 100755
--- a/tests/xfs/541
+++ b/tests/xfs/541
@@ -26,7 +26,7 @@ _require_scratch
 
 # Format scratch fs with no realtime section.
 SCRATCH_RTDEV="" _scratch_mkfs | _filter_mkfs 2> $tmp.mkfs >> $seqres.full
-_scratch_mount
+_try_scratch_mount || _notrun "Can't mount file system"
 
 # Zoned file systems don't support rtextsize > 1
 _require_xfs_scratch_non_zoned
-- 
2.45.2


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

* Re: [PATCH] xfs/541: _notrun if the file system can't mount
  2025-01-28  7:14 [PATCH] xfs/541: _notrun if the file system can't mount Christoph Hellwig
@ 2025-01-28 19:25 ` Darrick J. Wong
  2025-01-29  5:49   ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2025-01-28 19:25 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, fstests

On Tue, Jan 28, 2025 at 08:14:48AM +0100, Christoph Hellwig wrote:
> A file system created without an RT section might not be able to mount
> with an rtdev specified if the RT device has a larger LBA size.

Where does the mount failure occur?  The initial mount (where we specify
-o rtdev but sb_rblocks is still zero) should succeed because
xfs_rtmount_init ignores m_rtdev_targp if !rblocks, right?  So it's only
when you get to growfs and we try to read the device that things fail?

--D

> Instead of letting the test fail, _notrun it for that case.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/xfs/541 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/541 b/tests/xfs/541
> index 42bcd95802c5..c8b312fddc92 100755
> --- a/tests/xfs/541
> +++ b/tests/xfs/541
> @@ -26,7 +26,7 @@ _require_scratch
>  
>  # Format scratch fs with no realtime section.
>  SCRATCH_RTDEV="" _scratch_mkfs | _filter_mkfs 2> $tmp.mkfs >> $seqres.full
> -_scratch_mount
> +_try_scratch_mount || _notrun "Can't mount file system"
>  
>  # Zoned file systems don't support rtextsize > 1
>  _require_xfs_scratch_non_zoned
> -- 
> 2.45.2
> 
> 

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

* Re: [PATCH] xfs/541: _notrun if the file system can't mount
  2025-01-28 19:25 ` Darrick J. Wong
@ 2025-01-29  5:49   ` Christoph Hellwig
  2025-01-29 21:06     ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2025-01-29  5:49 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, zlang, fstests

On Tue, Jan 28, 2025 at 11:25:06AM -0800, Darrick J. Wong wrote:
> On Tue, Jan 28, 2025 at 08:14:48AM +0100, Christoph Hellwig wrote:
> > A file system created without an RT section might not be able to mount
> > with an rtdev specified if the RT device has a larger LBA size.
> 
> Where does the mount failure occur?  The initial mount (where we specify
> -o rtdev but sb_rblocks is still zero) should succeed because
> xfs_rtmount_init ignores m_rtdev_targp if !rblocks, right?  So it's only
> when you get to growfs and we try to read the device that things fail?

There only is a single mount in the test.

The test only clears the rtdev for the mkfs call, not the mount call.
As XFS doesn't allow adding a new rtdev at runtime, just expanding the
file system to the already passed but not actually used rt device in
growfs that's actually needed, even if it sounds counterintuitive.

(that being said I sent the patch directly from my zoned branch,
so it won't apply as-is due to context issues)

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

* Re: [PATCH] xfs/541: _notrun if the file system can't mount
  2025-01-29  5:49   ` Christoph Hellwig
@ 2025-01-29 21:06     ` Darrick J. Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2025-01-29 21:06 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, fstests

On Wed, Jan 29, 2025 at 06:49:18AM +0100, Christoph Hellwig wrote:
> On Tue, Jan 28, 2025 at 11:25:06AM -0800, Darrick J. Wong wrote:
> > On Tue, Jan 28, 2025 at 08:14:48AM +0100, Christoph Hellwig wrote:
> > > A file system created without an RT section might not be able to mount
> > > with an rtdev specified if the RT device has a larger LBA size.
> > 
> > Where does the mount failure occur?  The initial mount (where we specify
> > -o rtdev but sb_rblocks is still zero) should succeed because
> > xfs_rtmount_init ignores m_rtdev_targp if !rblocks, right?  So it's only
> > when you get to growfs and we try to read the device that things fail?
> 
> There only is a single mount in the test.
> 
> The test only clears the rtdev for the mkfs call, not the mount call.
> As XFS doesn't allow adding a new rtdev at runtime, just expanding the
> file system to the already passed but not actually used rt device in
> growfs that's actually needed, even if it sounds counterintuitive.
> 
> (that being said I sent the patch directly from my zoned branch,
> so it won't apply as-is due to context issues)

Gross, it's the set_blocksize call in xfs_setsize_buftarg that trips
everything up.  But, it makes sense that one cannot mix sector sizes nor
mount an rtdev with a larger sector size than what's configured on the
data device.

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

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

end of thread, other threads:[~2025-01-29 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28  7:14 [PATCH] xfs/541: _notrun if the file system can't mount Christoph Hellwig
2025-01-28 19:25 ` Darrick J. Wong
2025-01-29  5:49   ` Christoph Hellwig
2025-01-29 21:06     ` Darrick J. Wong

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