Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Bastian Germann <bage@debian.org>
To: linux-xfs@vger.kernel.org
Cc: Bastian Germann <bage@debian.org>
Subject: [PATCH] xfs_io: make MADV_SOFT_OFFLINE conditional
Date: Thu, 23 May 2024 00:06:56 +0200	[thread overview]
Message-ID: <20240522220656.8460-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>
---
 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


             reply	other threads:[~2024-05-22 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 22:06 Bastian Germann [this message]
2024-05-22 22:24 ` [PATCH] xfs_io: make MADV_SOFT_OFFLINE conditional Darrick J. Wong

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=20240522220656.8460-1-bage@debian.org \
    --to=bage@debian.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