fs: move struct iomap from exportfs.h to a separate header
[cascardo/linux.git] / include / linux / iomap.h
1 #ifndef LINUX_IOMAP_H
2 #define LINUX_IOMAP_H 1
3
4 #include <linux/types.h>
5
6 /* types of block ranges for multipage write mappings. */
7 #define IOMAP_HOLE      0x01    /* no blocks allocated, need allocation */
8 #define IOMAP_DELALLOC  0x02    /* delayed allocation blocks */
9 #define IOMAP_MAPPED    0x03    /* blocks allocated @blkno */
10 #define IOMAP_UNWRITTEN 0x04    /* blocks allocated @blkno in unwritten state */
11
12 #define IOMAP_NULL_BLOCK -1LL   /* blkno is not valid */
13
14 struct iomap {
15         sector_t        blkno;  /* first sector of mapping */
16         loff_t          offset; /* file offset of mapping, bytes */
17         u64             length; /* length of mapping, bytes */
18         int             type;   /* type of mapping */
19 };
20
21 #endif /* LINUX_IOMAP_H */