summaryrefslogtreecommitdiff
path: root/include/linux/iomap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-06-21 02:22:39 +0300
committerDave Chinner <david@fromorbit.com>2016-06-21 02:22:39 +0300
commit199a31c6d93ba9dc6f831fa1e77d9926f34f4e8a (patch)
tree012149fab5fc79d6f015f07f911bac174e48964b /include/linux/iomap.h
parent1a695a905c18548062509178b98bc91e67510864 (diff)
downloadlinux-199a31c6d93ba9dc6f831fa1e77d9926f34f4e8a.tar.xz
fs: move struct iomap from exportfs.h to a separate header
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'include/linux/iomap.h')
-rw-r--r--include/linux/iomap.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
new file mode 100644
index 000000000000..1b22197bcf01
--- /dev/null
+++ b/include/linux/iomap.h
@@ -0,0 +1,21 @@
+#ifndef LINUX_IOMAP_H
+#define LINUX_IOMAP_H 1
+
+#include <linux/types.h>
+
+/* types of block ranges for multipage write mappings. */
+#define IOMAP_HOLE 0x01 /* no blocks allocated, need allocation */
+#define IOMAP_DELALLOC 0x02 /* delayed allocation blocks */
+#define IOMAP_MAPPED 0x03 /* blocks allocated @blkno */
+#define IOMAP_UNWRITTEN 0x04 /* blocks allocated @blkno in unwritten state */
+
+#define IOMAP_NULL_BLOCK -1LL /* blkno is not valid */
+
+struct iomap {
+ sector_t blkno; /* first sector of mapping */
+ loff_t offset; /* file offset of mapping, bytes */
+ u64 length; /* length of mapping, bytes */
+ int type; /* type of mapping */
+};
+
+#endif /* LINUX_IOMAP_H */