Skip to content

Commit eb81cf9

Browse files
Christoph Hellwigdjwong
authored andcommitted
iomap: renumber IOMAP_HOLE to 0
Instead of keeping a separate unnamed state for uninitialized iomaps, renumber IOMAP_HOLE to zero so that an uninitialized iomap is treated as a hole. Suggested-by: Darrick J. Wong <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 32a38a4 commit eb81cf9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/linux/iomap.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ struct vm_fault;
2323
/*
2424
* Types of block ranges for iomap mappings:
2525
*/
26-
#define IOMAP_HOLE 0x01 /* no blocks allocated, need allocation */
27-
#define IOMAP_DELALLOC 0x02 /* delayed allocation blocks */
28-
#define IOMAP_MAPPED 0x03 /* blocks allocated at @addr */
29-
#define IOMAP_UNWRITTEN 0x04 /* blocks allocated at @addr in unwritten state */
30-
#define IOMAP_INLINE 0x05 /* data inline in the inode */
26+
#define IOMAP_HOLE 0 /* no blocks allocated, need allocation */
27+
#define IOMAP_DELALLOC 1 /* delayed allocation blocks */
28+
#define IOMAP_MAPPED 2 /* blocks allocated at @addr */
29+
#define IOMAP_UNWRITTEN 3 /* blocks allocated at @addr in unwritten state */
30+
#define IOMAP_INLINE 4 /* data inline in the inode */
3131

3232
/*
3333
* Flags reported by the file system from iomap_begin:

0 commit comments

Comments
 (0)