* [PATCH] xfs_io: make MADV_SOFT_OFFLINE conditional
@ 2024-05-22 22:06 Bastian Germann
2024-05-22 22:24 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Bastian Germann @ 2024-05-22 22:06 UTC (permalink / raw)
To: linux-xfs; +Cc: Bastian Germann
mips64el does not have the symbol MADV_SOFT_OFFLINE, so wrap it in an
ifdef.
Signed-off-by: Bastian Germann <bage@debian.org>
---
io/madvise.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/io/madvise.c b/io/madvise.c
index ede23395..1d664f8d 100644
--- a/io/madvise.c
+++ b/io/madvise.c
@@ -101,9 +101,11 @@ madvise_f(
case 'M': /* disable merging */
advise = MADV_UNMERGEABLE;
break;
+#ifdef MADV_SOFT_OFFLINE
case 'o': /* offline */
advise = MADV_SOFT_OFFLINE;
break;
+#endif
case 'p': /* punch hole */
advise = MADV_REMOVE;
break;
--
2.45.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs_io: make MADV_SOFT_OFFLINE conditional
2024-05-22 22:06 [PATCH] xfs_io: make MADV_SOFT_OFFLINE conditional Bastian Germann
@ 2024-05-22 22:24 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2024-05-22 22:24 UTC (permalink / raw)
To: Bastian Germann; +Cc: linux-xfs
On Thu, May 23, 2024 at 12:06:56AM +0200, Bastian Germann wrote:
> mips64el does not have the symbol MADV_SOFT_OFFLINE, so wrap it in an
> ifdef.
>
> Signed-off-by: Bastian Germann <bage@debian.org>
> ---
> io/madvise.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/io/madvise.c b/io/madvise.c
> index ede23395..1d664f8d 100644
> --- a/io/madvise.c
> +++ b/io/madvise.c
> @@ -101,9 +101,11 @@ madvise_f(
> case 'M': /* disable merging */
> advise = MADV_UNMERGEABLE;
> break;
> +#ifdef MADV_SOFT_OFFLINE
> case 'o': /* offline */
> advise = MADV_SOFT_OFFLINE;
> break;
> +#endif
Please #ifdef guard the -o line in madvise_help so it doesn't show up in
the help screen on mips64el.
With that added,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> case 'p': /* punch hole */
> advise = MADV_REMOVE;
> break;
> --
> 2.45.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-22 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 22:06 [PATCH] xfs_io: make MADV_SOFT_OFFLINE conditional Bastian Germann
2024-05-22 22:24 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox