public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xfs_io: make MADV_SOFT_OFFLINE conditional
@ 2024-05-22 22:37 Bastian Germann
  2024-05-24  8:18 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Bastian Germann @ 2024-05-22 22:37 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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/io/madvise.c b/io/madvise.c
index ede23395..644c85e0 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,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] 3+ messages in thread

* Re: [PATCH v2] xfs_io: make MADV_SOFT_OFFLINE conditional
  2024-05-22 22:37 [PATCH v2] xfs_io: make MADV_SOFT_OFFLINE conditional Bastian Germann
@ 2024-05-24  8:18 ` Christoph Hellwig
  2024-05-25 11:25   ` Bastian Germann
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2024-05-24  8:18 UTC (permalink / raw)
  To: Bastian Germann
  Cc: linux-xfs, Darrick J . Wong, Thomas Bogendoerfer, linux-mips,
	linux-api

> +#ifdef MADV_SOFT_OFFLINE

Can you add a comment here that this is missing on mips as of Linux
6.9?

Also adding the mips maintainer so he can add it, as missing a madvise
random feature on a random architecture looks like a bug that should be
fixed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] xfs_io: make MADV_SOFT_OFFLINE conditional
  2024-05-24  8:18 ` Christoph Hellwig
@ 2024-05-25 11:25   ` Bastian Germann
  0 siblings, 0 replies; 3+ messages in thread
From: Bastian Germann @ 2024-05-25 11:25 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-xfs, Darrick J . Wong, Thomas Bogendoerfer, linux-mips,
	linux-api

Am 24.05.24 um 10:18 schrieb Christoph Hellwig:
>> +#ifdef MADV_SOFT_OFFLINE
> 
> Can you add a comment here that this is missing on mips as of Linux
> 6.9?

Sure.

> Also adding the mips maintainer so he can add it, as missing a madvise
> random feature on a random architecture looks like a bug that should be
> fixed.

There are more of this class of bugs which f82b77462b ("tools include:
Add mman macros needed by perf for all arch") presents.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-25 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 22:37 [PATCH v2] xfs_io: make MADV_SOFT_OFFLINE conditional Bastian Germann
2024-05-24  8:18 ` Christoph Hellwig
2024-05-25 11:25   ` Bastian Germann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox