[LTP] [PATCH V3 4/5] libswap: add function to prealloc contiguous file

Li Wang liwang@redhat.com
Wed Jan 24 05:08:34 CET 2024


On Tue, Jan 23, 2024 at 11:47 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi Petr,
>
> > On Tue, Jan 23, 2024 at 8:37 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> > > Hi Li,
>
> > > > Hi Li,
>
> > > > swapoff01 fails on TMPDIR on btrfs (regardless kernel version):
>
> > > FYI it works on Tumbleweed with 6.7 kernel. It's broken on some older
> SLES
> > > with 5.14 and all older kernels. I suppose with nocow (fixes I
> suggested
> > > previously) would work as expected (TPASS, or TCONF on kernel < 5.0).
>
>
> > You're right.
>
> > We have to guarantee the swapfile is a contiguous file whatever the FS
> type
> > is.
> > So here making use of make_swapfile() is a hard requirement.
> > And, I don't think the file first with 65536 blocks (in swapoff01) is not
> > necessary.
>
> Maybe not, but now we test on single swap size. Testing small swap and big
> swap
> was IMHO more testing coverage (various filesystems behave differently on
> different size), but given this would be more important for whole
> .all_filesystems = 1 testing I'm ok with the change.
>

Ok, that could be achieved by customizing the swap file size later.
It's not very hard. But now I don't want to increase the patchset number
just for more coverage, that will be a burden for release testing work.


-- 
Regards,
Li Wang


More information about the ltp mailing list