Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] xfs/073: destroy loop device when mount fails
@ 2026-08-21  5:14 Christoph Hellwig
  2026-08-21 15:40 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2026-08-21  5:14 UTC (permalink / raw)
  To: zlang, djwong; +Cc: linux-xfs, fstests

Otherwise the failure will leave a dangling loop device around and
prevent unmounting of $TEST_DIR and thus various cascading later
failures.

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

diff --git a/tests/xfs/073 b/tests/xfs/073
index 2274079ef43b..057d1447639a 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -74,6 +74,7 @@ _verify_copy()
 		_mount -o nouuid $loop_dev1 $target_dir
 		if [ $? -ne 0 ]; then
 			echo mount failed - evil!
+			_destroy_loop_device $loop_dev1
 			return
 		fi
 	fi
-- 
2.53.0


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

* Re: [PATCH] xfs/073: destroy loop device when mount fails
  2026-08-21  5:14 [PATCH] xfs/073: destroy loop device when mount fails Christoph Hellwig
@ 2026-08-21 15:40 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2026-08-21 15:40 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, linux-xfs, fstests

On Fri, Aug 21, 2026 at 07:14:24AM +0200, Christoph Hellwig wrote:
> Otherwise the failure will leave a dangling loop device around and
> prevent unmounting of $TEST_DIR and thus various cascading later
> failures.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Yeah, we should pull down the loopdev if we're bailing out.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  tests/xfs/073 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index 2274079ef43b..057d1447639a 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -74,6 +74,7 @@ _verify_copy()
>  		_mount -o nouuid $loop_dev1 $target_dir
>  		if [ $? -ne 0 ]; then
>  			echo mount failed - evil!
> +			_destroy_loop_device $loop_dev1
>  			return
>  		fi
>  	fi
> -- 
> 2.53.0
> 
> 

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

end of thread, other threads:[~2026-08-21 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  5:14 [PATCH] xfs/073: destroy loop device when mount fails Christoph Hellwig
2026-08-21 15:40 ` 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