[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251112182617.GH196366@frogsfrogsfrogs>
Date: Wed, 12 Nov 2025 10:26:17 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: Baokun Li <libaokun1@...wei.com>
Cc: zlang@...hat.com, neal@...pa.dev, fstests@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
joannelkoong@...il.com, bernd@...ernd.com
Subject: Re: [PATCH 04/33] common/rc: skip test if swapon doesn't work
On Wed, Nov 12, 2025 at 02:35:32PM +0800, Baokun Li wrote:
> Hi Darrick,
>
> On 2025-10-29 09:21, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@...nel.org>
> >
> > In _require_scratch_swapfile, skip the test if swapon fails for whatever
> > reason, just like all the other filesystems.
> >
> > Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
> > ---
> > common/rc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >
> > diff --git a/common/rc b/common/rc
> > index 18d11e2c5cad3a..98609cb6e7a058 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -3278,7 +3278,7 @@ _require_scratch_swapfile()
> > _notrun "swapfiles are not supported"
> > else
> > _scratch_unmount
> > - _fail "swapon failed for $FSTYP"
> > + _notrun "swapon failed for $FSTYP"
> > fi
> > fi
> > ;;
>
> Could you also clean up the corresponding comments?
>
> # ext* has supported all variants of swap files since their
> # introduction, so swapon should not fail.
>
> At present, swap files don’t support block sizes greater than the page
> size, which means swapon will fail when LBS is enabled.
Well at that point we might as well collapse everything into:
if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then
_scratch_unmount
_notrun "swapfiles are not supported for $FSTYP"
fi
(note the removal of the case "$FSTYP"...esac code)
---D
>
> Thanks,
> Baokun
>
>
Powered by blists - more mailing lists