From: Li Wang <li.wang@linux.dev>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 2/3] swapon04: Add test for discard flags
Date: Fri, 28 Aug 2026 17:12:14 +0800 [thread overview]
Message-ID: <apFQ7jIcG2CJzrd0@linux.dev> (raw)
In-Reply-To: <6a914eb4.cfcabfe1.269b6.bc9c@mx.google.com>
On Fri, Aug 28, 2026 at 09:02:43AM +0000, Andrea Cervesato wrote:
> > Great, this works!
> >
> > I think the fsync after tst_fill_file() ensures all allocated blocks are
> > flushed to disk, so stat() reflects the real block count.
> >
> > Feel free to add my RBT with this change applied:
> >
> > Reviewed-by: Li Wang <li.wang@linux.dev>
>
> there we are :-) will send a new version with the R-B tags
Hmm, I thought about it again. Perhaps we don't need this change.
Comparing the results on 6.12 and 5.14 kernels, only 6.6 needs the sync().
If the swap file contains delalloc blocks, the kernel should flush
them to disk first, then perform the discard.
If the kernel instead discards "nonexistent blocks" directly — making
the discard ineffective — that could be considered a minor bug, though
the impact is limited.
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-08-28 9:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 11:54 [LTP] [PATCH 0/3] Increase coverage for swapon syscall Andrea Cervesato
2026-08-27 11:54 ` [LTP] [PATCH 1/3] lapi: fallback definitions " Andrea Cervesato
2026-08-27 13:58 ` [LTP] " linuxtestproject.agent
2026-08-28 7:54 ` [LTP] [PATCH 1/3] " Li Wang
2026-08-27 11:54 ` [LTP] [PATCH 2/3] swapon04: Add test for discard flags Andrea Cervesato
2026-08-28 3:57 ` Li Wang
2026-08-28 8:30 ` Andrea Cervesato via ltp
2026-08-28 8:47 ` Li Wang
2026-08-28 9:02 ` Andrea Cervesato via ltp
2026-08-28 8:47 ` Andrea Cervesato via ltp
2026-08-28 9:01 ` Li Wang
2026-08-28 9:02 ` Andrea Cervesato via ltp
2026-08-28 9:12 ` Li Wang [this message]
2026-08-27 11:54 ` [LTP] [PATCH 3/3] swapon02: Add test cases for invalid swapflags Andrea Cervesato
2026-08-28 7:59 ` Li Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apFQ7jIcG2CJzrd0@linux.dev \
--to=li.wang@linux.dev \
--cc=andrea.cervesato@suse.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.