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.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 32477e8872d..44e3cb2f196 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -234,6 +234,7 @@ extern int dir_notify_enable;
234#define FS_IOC_SETFLAGS _IOW('f', 2, long) 234#define FS_IOC_SETFLAGS _IOW('f', 2, long)
235#define FS_IOC_GETVERSION _IOR('v', 1, long) 235#define FS_IOC_GETVERSION _IOR('v', 1, long)
236#define FS_IOC_SETVERSION _IOW('v', 2, long) 236#define FS_IOC_SETVERSION _IOW('v', 2, long)
237#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
237#define FS_IOC32_GETFLAGS _IOR('f', 1, int) 238#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
238#define FS_IOC32_SETFLAGS _IOW('f', 2, int) 239#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
239#define FS_IOC32_GETVERSION _IOR('v', 1, int) 240#define FS_IOC32_GETVERSION _IOR('v', 1, int)
@@ -294,6 +295,7 @@ extern int dir_notify_enable;
294#include <linux/mutex.h> 295#include <linux/mutex.h>
295#include <linux/capability.h> 296#include <linux/capability.h>
296#include <linux/semaphore.h> 297#include <linux/semaphore.h>
298#include <linux/fiemap.h>
297 299
298#include <asm/atomic.h> 300#include <asm/atomic.h>
299#include <asm/byteorder.h> 301#include <asm/byteorder.h>
@@ -1182,6 +1184,20 @@ extern void dentry_unhash(struct dentry *dentry);
1182extern int file_permission(struct file *, int); 1184extern int file_permission(struct file *, int);
1183 1185
1184/* 1186/*
1187 * VFS FS_IOC_FIEMAP helper definitions.
1188 */
1189struct fiemap_extent_info {
1190 unsigned int fi_flags; /* Flags as passed from user */
1191 unsigned int fi_extents_mapped; /* Number of mapped extents */
1192 unsigned int fi_extents_max; /* Size of fiemap_extent array */
1193 struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent
1194 * array */
1195};
1196int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
1197 u64 phys, u64 len, u32 flags);
1198int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
1199
1200/*
1185 * File types 1201 * File types
1186 * 1202 *
1187 * NOTE! These match bits 12..15 of stat.st_mode 1203 * NOTE! These match bits 12..15 of stat.st_mode
@@ -1290,6 +1306,8 @@ struct inode_operations {
1290 void (*truncate_range)(struct inode *, loff_t, loff_t); 1306 void (*truncate_range)(struct inode *, loff_t, loff_t);
1291 long (*fallocate)(struct inode *inode, int mode, loff_t offset, 1307 long (*fallocate)(struct inode *inode, int mode, loff_t offset,
1292 loff_t len); 1308 loff_t len);
1309 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
1310 u64 len);
1293}; 1311};
1294 1312
1295struct seq_file; 1313struct seq_file;
@@ -1987,6 +2005,9 @@ extern int vfs_fstat(unsigned int, struct kstat *);
1987 2005
1988extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, 2006extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
1989 unsigned long arg); 2007 unsigned long arg);
2008extern int generic_block_fiemap(struct inode *inode,
2009 struct fiemap_extent_info *fieinfo, u64 start,
2010 u64 len, get_block_t *get_block);
1990 2011
1991extern void get_filesystem(struct file_system_type *fs); 2012extern void get_filesystem(struct file_system_type *fs);
1992extern void put_filesystem(struct file_system_type *fs); 2013extern void put_filesystem(struct file_system_type *fs);