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 v2] xfs_io: make MADV_SOFT_OFFLINE conditional
Date: Thu, 23 May 2024 00:37:48 +0200 [thread overview]
Message-ID: <20240522223748.9986-1-bage@debian.org> (raw)
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
next reply other threads:[~2024-05-22 22:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 22:37 Bastian Germann [this message]
2024-05-24 8:18 ` [PATCH v2] xfs_io: make MADV_SOFT_OFFLINE conditional Christoph Hellwig
2024-05-25 11:25 ` Bastian Germann
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=20240522223748.9986-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox