summaryrefslogtreecommitdiff
path: root/include/linux/fiemap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-23 10:30:11 +0300
committerTheodore Ts'o <tytso@mit.edu>2020-06-04 06:16:55 +0300
commit10c5db286452b8c60e8f58e9a4c1cbc5a91e4e5b (patch)
tree6955d539abd703252b3706c267b69d0bd130a08a /include/linux/fiemap.h
parent44ebcd06bbb3ab3ee446b933800aca32fc4ca9b1 (diff)
downloadlinux-10c5db286452b8c60e8f58e9a4c1cbc5a91e4e5b.tar.xz
fs: move the fiemap definitions out of fs.h
No need to pull the fiemap definitions into almost every file in the kernel build. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Link: https://lore.kernel.org/r/20200523073016.2944131-5-hch@lst.de Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/fiemap.h')
-rw-r--r--include/linux/fiemap.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
new file mode 100644
index 000000000000..240d4f7d9116
--- /dev/null
+++ b/include/linux/fiemap.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_FIEMAP_H
+#define _LINUX_FIEMAP_H 1
+
+#include <uapi/linux/fiemap.h>
+#include <linux/fs.h>
+
+struct fiemap_extent_info {
+ unsigned int fi_flags; /* Flags as passed from user */
+ unsigned int fi_extents_mapped; /* Number of mapped extents */
+ unsigned int fi_extents_max; /* Size of fiemap_extent array */
+ struct fiemap_extent __user *fi_extents_start; /* Start of
+ fiemap_extent array */
+};
+
+int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
+ u64 phys, u64 len, u32 flags);
+int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
+
+int generic_block_fiemap(struct inode *inode,
+ struct fiemap_extent_info *fieinfo, u64 start, u64 len,
+ get_block_t *get_block);
+
+#endif /* _LINUX_FIEMAP_H 1 */