From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] swapoff01.c: Adjust blocks size base on pagesize
Date: Fri, 23 Feb 2024 09:32:12 +0100 [thread overview]
Message-ID: <20240223083212.GA1423688@pevik> (raw)
In-Reply-To: <CAEemH2dtarpDtPuzHgG6eeoB3Bhbfa1u9fjsb6dBFX-rPg-3dw@mail.gmail.com>
Hi all,
> Hi Wei, Cyril,
> > > I do not think that this is a right solution though. Is there any reason
> > > why we pass number of blocks to the make_swapfile instead of megabytes?
> > @Li Wang, could you give some clue for above question(for why pass number
> > of blocks instead of megabytes)?
> I just keep the function interface like the original
> (it wasn't designed by me:), but I guess the only
> advantage is to test 1 block for different FS types.
We use this function with 1 block, 10 blocks and 65536 blocks
How about to have special function for 1 block and then other function which
accepts MB? (e.g. 1 MB and 256 MB)?
But could we first merge Yang Xu patchset so that he does not have to rebase it
for ever?
https://patchwork.ozlabs.org/project/ltp/list/?series=395713&state=*
Also it'd be nice to have, but this can definitely wait after other things are
solved.
-int make_swapfile(const char *swapfile, int blocks, int safe)
+int _make_swapfile(const char *swapfile, int blocks, int safe)
+#define MAKE_SWAPFILE(const char *swapfile, int blocks, int safe) \
+ _make_swapfile(swapfile, blocks, 0)
+#define SAFE_SWAPFILE(const char *swapfile, int blocks, int safe) \
+ _make_swapfile(swapfile, blocks, 1)
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-02-23 8:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 4:41 [LTP] [PATCH v1] swapoff01.c: Adjust blocks size base on pagesize Wei Gao via ltp
2024-02-22 7:57 ` Li Wang
2024-02-22 13:46 ` Wei Gao via ltp
2024-02-22 8:39 ` Cyril Hrubis
2024-02-22 13:37 ` Wei Gao via ltp
2024-02-22 13:50 ` Cyril Hrubis
2024-02-23 4:11 ` Li Wang
2024-02-23 8:32 ` Petr Vorel [this message]
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=20240223083212.GA1423688@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox