]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iomap: renumber IOMAP_HOLE to 0
authorChristoph Hellwig <hch@lst.de>
Fri, 18 Oct 2019 23:43:08 +0000 (16:43 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Oct 2019 15:51:59 +0000 (08:51 -0700)
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 <darrick.wong@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
include/linux/iomap.h

index 1623851ade9003faaea51096cf17dd7954e593b7..53e6e2275d3d9b74e9df7f1dd0ebcd3fe90a300c 100644 (file)
@@ -23,11 +23,11 @@ struct vm_fault;
 /*
  * Types of block ranges for iomap mappings:
  */
-#define IOMAP_HOLE     0x01    /* no blocks allocated, need allocation */
-#define IOMAP_DELALLOC 0x02    /* delayed allocation blocks */
-#define IOMAP_MAPPED   0x03    /* blocks allocated at @addr */
-#define IOMAP_UNWRITTEN        0x04    /* blocks allocated at @addr in unwritten state */
-#define IOMAP_INLINE   0x05    /* data inline in the inode */
+#define IOMAP_HOLE     0       /* no blocks allocated, need allocation */
+#define IOMAP_DELALLOC 1       /* delayed allocation blocks */
+#define IOMAP_MAPPED   2       /* blocks allocated at @addr */
+#define IOMAP_UNWRITTEN        3       /* blocks allocated at @addr in unwritten state */
+#define IOMAP_INLINE   4       /* data inline in the inode */
 
 /*
  * Flags reported by the file system from iomap_begin: