Re: [PATCH] xfs/073: destroy loop device when mount fails

"Darrick J. Wong" <[email protected]>
Newsgroups org.kernel.vger.fstests,org.kernel.vger.linux-xfs
Message-ID <20260821154013.GK6072@frogsfrogsfrogs>
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 <[email protected]>

Yeah, we should pull down the loopdev if we're bailing out.
Reviewed-by: "Darrick J. Wong" <[email protected]>

--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
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.