aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 580b513668fe..194fb237a307 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -231,6 +231,7 @@ extern int dir_notify_enable;
231#define FS_IOC_SETFLAGS _IOW('f', 2, long) 231#define FS_IOC_SETFLAGS _IOW('f', 2, long)
232#define FS_IOC_GETVERSION _IOR('v', 1, long) 232#define FS_IOC_GETVERSION _IOR('v', 1, long)
233#define FS_IOC_SETVERSION _IOW('v', 2, long) 233#define FS_IOC_SETVERSION _IOW('v', 2, long)
234#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
234#define FS_IOC32_GETFLAGS _IOR('f', 1, int) 235#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
235#define FS_IOC32_SETFLAGS _IOW('f', 2, int) 236#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
236#define FS_IOC32_GETVERSION _IOR('v', 1, int) 237#define FS_IOC32_GETVERSION _IOR('v', 1, int)
@@ -291,6 +292,7 @@ extern int dir_notify_enable;
291#include <linux/mutex.h> 292#include <linux/mutex.h>
292#include <linux/capability.h> 293#include <linux/capability.h>
293#include <linux/semaphore.h> 294#include <linux/semaphore.h>
295#include <linux/fiemap.h>
294 296
295#include <asm/atomic.h> 297#include <asm/atomic.h>
296#include <asm/byteorder.h> 298#include <asm/byteorder.h>
@@ -1179,6 +1181,20 @@ extern void dentry_unhash(struct dentry *dentry);
1179extern int file_permission(struct file *, int); 1181extern int file_permission(struct file *, int);
1180 1182
1181/* 1183/*
1184 * VFS FS_IOC_FIEMAP helper definitions.
1185 */
1186struct fiemap_extent_info {
1187 unsigned int fi_flags; /* Flags as passed from user */
1188 unsigned int fi_extents_mapped; /* Number of mapped extents */
1189 unsigned int fi_extents_max; /* Size of fiemap_extent array */
1190 struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent
1191 * array */
1192};
1193int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
1194 u64 phys, u64 len, u32 flags);
1195int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
1196
1197/*
1182 * File types 1198 * File types
1183 * 1199 *
1184 * NOTE! These match bits 12..15 of stat.st_mode 1200 * NOTE! These match bits 12..15 of stat.st_mode
@@ -1287,6 +1303,8 @@ struct inode_operations {
1287 void (*truncate_range)(struct inode *, loff_t, loff_t); 1303 void (*truncate_range)(struct inode *, loff_t, loff_t);
1288 long (*fallocate)(struct inode *inode, int mode, loff_t offset, 1304 long (*fallocate)(struct inode *inode, int mode, loff_t offset,
1289 loff_t len); 1305 loff_t len);
1306 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
1307 u64 len);
1290}; 1308};
1291 1309
1292struct seq_file; 1310struct seq_file;