diff mbox series

[07/20] iomap: renumber IOMAP_HOLE to 0

Message ID 20191008071527.29304-8-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/20] iomap: better document the IOMAP_F_* flags | expand

Commit Message

Christoph Hellwig Oct. 8, 2019, 7:15 a.m. UTC
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>
---
 include/linux/iomap.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Darrick J. Wong Oct. 8, 2019, 3:01 p.m. UTC | #1
On Tue, Oct 08, 2019 at 09:15:14AM +0200, Christoph Hellwig wrote:
> 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>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  include/linux/iomap.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 220f6b17a1a7..24c784e44274 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -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:
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 220f6b17a1a7..24c784e44274 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -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: