xfs_io: make MADV_SOFT_OFFLINE conditional
v3 cover xfs_io: make MADV_SOFT_OFFLINE conditional
v2:
Suppress -o on the help message
v3:
Address Christoph Hellwig's comment that I should add a comment that this is because of the missing definition on mips.
Bastian Germann (1):
xfs_io: make MADV_SOFT_OFFLINE conditional
io/madvise.c | 5 +++++ 1 file changed, 5 insertions(+)
Signature · 1 line
2.45.1
PATCH v3 1/1 xfs_io: make MADV_SOFT_OFFLINE conditional
mips64el does not have the symbol MADV_SOFT_OFFLINE, so wrap it in an ifdef.
Signed-off-by Bastian Germann <[email protected]>
Reviewed-by Darrick J. Wong <[email protected]>
--- io/madvise.c | 5 +++++ 1 file changed, 5 insertions(+)
io/madvise.c +5 -0
@@ -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 ;
Signature · 1 line
2.45.1
io/madvise.c madvise_f( · line 107
Quoted 2 lines · Bastian Germann
io/madvise.c +2
-0+#ifdef MADV_SOFT_OFFLINE +/* MADV_SOFT_OFFLINE is undefined on mips */
... as of Linux 6.9 */
With that (can probably just be fixed when applying):
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 5 lines · Christoph Hellwig
io/madvise.c madvise_f( · line 107
Quoted 2 lines · Bastian Germann
io/madvise.c +2
-0+#ifdef MADV_SOFT_OFFLINE +/* MADV_SOFT_OFFLINE is undefined on mips */ ... as of Linux 6.9 */
no problem.
Carlos
Quoted 6 lines
With that (can probably just be fixed when applying):
Reviewed-by Christoph Hellwig <[email protected]>