From: Bastian Germann <bage@debian.org>
To: linux-xfs@vger.kernel.org
Cc: Bastian Germann <bage@debian.org>,
"Darrick J . Wong" <djwong@kernel.org>
Subject: [PATCH v3 1/1] xfs_io: make MADV_SOFT_OFFLINE conditional
Date: Fri, 31 May 2024 21:57:51 +0200 [thread overview]
Message-ID: <20240531195751.15302-2-bage@debian.org> (raw)
In-Reply-To: <20240531195751.15302-1-bage@debian.org>
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
next prev parent reply other threads:[~2024-05-31 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-06-01 4:48 ` [PATCH v3 1/1] " Christoph Hellwig
2024-06-17 11:44 ` Carlos Maiolino
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=20240531195751.15302-2-bage@debian.org \
--to=bage@debian.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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.