aboutsummaryrefslogtreecommitdiff
path: root/lib/ext2fs/fiemap.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs/fiemap.h')
-rw-r--r--lib/ext2fs/fiemap.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ext2fs/fiemap.h b/lib/ext2fs/fiemap.h
index 0d1072ac..33ab8fb7 100644
--- a/lib/ext2fs/fiemap.h
+++ b/lib/ext2fs/fiemap.h
@@ -45,10 +45,23 @@ struct fiemap {
#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
#endif
+#if defined(__linux__) && !defined(FS_IOC_GETSTATE)
+#define EXT4_IOC_GETSTATE _IOW('f', 41, __u32)
+#endif
+
+#if defined(__linux__) && !defined(EXT4_IOC_GET_ES_CACHE)
+#define EXT4_IOC_GET_ES_CACHE _IOWR('f', 42, struct fiemap)
+#endif
+
+#if defined(__linux__) && !defined(EXT4_STATE_FLAG_EXT_PRECACHED)
+#define EXT4_STATE_FLAG_EXT_PRECACHED 0x00000001
+#endif
+
#define FIEMAP_MAX_OFFSET (~0ULL)
#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
+#define FIEMAP_FLAG_CACHE 0x00000004 /* request caching of the extents */
#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
@@ -74,4 +87,7 @@ struct fiemap {
#define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other
* files. */
+#define EXT4_FIEMAP_EXTENT_HOLE 0x08000000 /* Entry in extent status
+ cache for a hole*/
+
#endif /* _LINUX_FIEMAP_H */