* [PATCH v3 0/1] xfs_io: make MADV_SOFT_OFFLINE conditional
@ 2024-05-31 19:57 Bastian Germann
2024-05-31 19:57 ` [PATCH v3 1/1] " Bastian Germann
0 siblings, 1 reply; 4+ messages in thread
From: Bastian Germann @ 2024-05-31 19:57 UTC (permalink / raw)
To: linux-xfs; +Cc: Bastian Germann
v2:
Suppress -o on the help message
v3:
Address Christoph Hellwig's comment that I should add a comment
that this is because of the missing definition on mips.
Bastian Germann (1):
xfs_io: make MADV_SOFT_OFFLINE conditional
io/madvise.c | 5 +++++
1 file changed, 5 insertions(+)
--
2.45.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/1] xfs_io: make MADV_SOFT_OFFLINE conditional
2024-05-31 19:57 [PATCH v3 0/1] xfs_io: make MADV_SOFT_OFFLINE conditional Bastian Germann
@ 2024-05-31 19:57 ` Bastian Germann
2024-06-01 4:48 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Bastian Germann @ 2024-05-31 19:57 UTC (permalink / raw)
To: linux-xfs; +Cc: Bastian Germann, Darrick J . Wong
mips64el does not have the symbol MADV_SOFT_OFFLINE, so wrap it in an
ifdef.
Signed-off-by: Bastian Germann <bage@debian.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
---
io/madvise.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/io/madvise.c b/io/madvise.c
index ede23395..f26c03f1 100644
--- a/io/madvise.c
+++ b/io/madvise.c
@@ -40,7 +40,9 @@ madvise_help(void)
" -H -- enable transparent hugepages (MADV_HUGEPAGE)\n"
" -m -- mark the range mergeable (MADV_MERGEABLE)\n"
" -M -- mark the range unmergeable (MADV_UNMERGEABLE)\n"
+#ifdef MADV_SOFT_OFFLINE
" -o -- mark the range offline (MADV_SOFT_OFFLINE)\n"
+#endif
" -p -- punch a hole in the file (MADV_REMOVE)\n"
" -P -- poison the page cache (MADV_HWPOISON)\n"
#ifdef MADV_POPULATE_READ
@@ -101,9 +103,12 @@ madvise_f(
case 'M': /* disable merging */
advise = MADV_UNMERGEABLE;
break;
+#ifdef MADV_SOFT_OFFLINE
+/* MADV_SOFT_OFFLINE is undefined on mips */
case 'o': /* offline */
advise = MADV_SOFT_OFFLINE;
break;
+#endif
case 'p': /* punch hole */
advise = MADV_REMOVE;
break;
--
2.45.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 1/1] xfs_io: make MADV_SOFT_OFFLINE conditional
2024-05-31 19:57 ` [PATCH v3 1/1] " Bastian Germann
@ 2024-06-01 4:48 ` Christoph Hellwig
2024-06-17 11:44 ` Carlos Maiolino
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2024-06-01 4:48 UTC (permalink / raw)
To: Bastian Germann; +Cc: linux-xfs, Darrick J . Wong
On Fri, May 31, 2024 at 09:57:51PM +0200, Bastian Germann wrote:
> +#ifdef MADV_SOFT_OFFLINE
> +/* MADV_SOFT_OFFLINE is undefined on mips */
... as of Linux 6.9 */
With that (can probably just be fixed when applying):
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 1/1] xfs_io: make MADV_SOFT_OFFLINE conditional
2024-06-01 4:48 ` Christoph Hellwig
@ 2024-06-17 11:44 ` Carlos Maiolino
0 siblings, 0 replies; 4+ messages in thread
From: Carlos Maiolino @ 2024-06-17 11:44 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Bastian Germann, linux-xfs, Darrick J . Wong
On Fri, May 31, 2024 at 09:48:05PM GMT, Christoph Hellwig wrote:
> On Fri, May 31, 2024 at 09:57:51PM +0200, Bastian Germann wrote:
> > +#ifdef MADV_SOFT_OFFLINE
> > +/* MADV_SOFT_OFFLINE is undefined on mips */
>
> ... as of Linux 6.9 */
no problem.
Carlos
>
> With that (can probably just be fixed when applying):
>
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-17 11:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 19:57 [PATCH v3 0/1] xfs_io: make MADV_SOFT_OFFLINE conditional Bastian Germann
2024-05-31 19:57 ` [PATCH v3 1/1] " Bastian Germann
2024-06-01 4:48 ` Christoph Hellwig
2024-06-17 11:44 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox