Skip to content

Commit 923936e

Browse files
riteshharjanibrauner
authored andcommitted
iomap: Fix conflicting values of iomap flags
IOMAP_F_ATOMIC_BIO mistakenly took the same value as of IOMAP_F_SIZE_CHANGED in patch '370a6de7651b ("iomap: rework IOMAP atomic flags")'. Let's fix this and let's also create some more space for filesystem reported flags to avoid this in future. This patch makes the core iomap flags to start from bit 15, moving downwards. Note that "flags" member within struct iomap is of type u16. Fixes: 370a6de ("iomap: rework IOMAP atomic flags") Signed-off-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com> Link: https://lore.kernel.org/r/20250327170119.61045-1-ritesh.list@gmail.com Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 9e6901f commit 923936e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

include/linux/iomap.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ struct vm_fault;
7878
#define IOMAP_F_ANON_WRITE (1U << 7)
7979
#define IOMAP_F_ATOMIC_BIO (1U << 8)
8080

81+
/*
82+
* Flag reserved for file system specific usage
83+
*/
84+
#define IOMAP_F_PRIVATE (1U << 12)
85+
8186
/*
8287
* Flags set by the core iomap code during operations:
8388
*
@@ -88,14 +93,8 @@ struct vm_fault;
8893
* range it covers needs to be remapped by the high level before the operation
8994
* can proceed.
9095
*/
91-
#define IOMAP_F_SIZE_CHANGED (1U << 8)
92-
#define IOMAP_F_STALE (1U << 9)
93-
94-
/*
95-
* Flags from 0x1000 up are for file system specific usage:
96-
*/
97-
#define IOMAP_F_PRIVATE (1U << 12)
98-
96+
#define IOMAP_F_SIZE_CHANGED (1U << 14)
97+
#define IOMAP_F_STALE (1U << 15)
9998

10099
/*
101100
* Magic value for addr:

0 commit comments

Comments
 (0)