diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h')
-rw-r--r-- | drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h b/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h index 09088f40ba88..07d45de69dd9 100644 --- a/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h +++ b/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h @@ -47,9 +47,11 @@ struct ll_fiemap_extent { __u64 fe_logical; /* logical offset in bytes for the start of - * the extent from the beginning of the file */ + * the extent from the beginning of the file + */ __u64 fe_physical; /* physical offset in bytes for the start - * of the extent from the beginning of the disk */ + * of the extent from the beginning of the disk + */ __u64 fe_length; /* length in bytes for this extent */ __u64 fe_reserved64[2]; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ @@ -59,9 +61,11 @@ struct ll_fiemap_extent { struct ll_user_fiemap { __u64 fm_start; /* logical offset (inclusive) at - * which to start mapping (in) */ + * which to start mapping (in) + */ __u64 fm_length; /* logical length of mapping which - * userspace wants (in) */ + * userspace wants (in) + */ __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */ __u32 fm_mapped_extents;/* number of extents that were mapped (out) */ __u32 fm_extent_count; /* size of fm_extents array (in) */ @@ -71,28 +75,38 @@ struct ll_user_fiemap { #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_EXTENT_LAST 0x00000001 /* Last extent in file. */ -#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */ -#define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending. - * Sets EXTENT_UNKNOWN. */ -#define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be read - * while fs is unmounted */ -#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs. - * Sets EXTENT_NO_DIRECT. */ +#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before + * map + */ +#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute + * tree + */ +#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */ +#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */ +#define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending. + * Sets EXTENT_UNKNOWN. + */ +#define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be read + * while fs is unmounted + */ +#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs. + * Sets EXTENT_NO_DIRECT. + */ #define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be - * block aligned. */ + * block aligned. + */ #define FIEMAP_EXTENT_DATA_INLINE 0x00000200 /* Data mixed with metadata. * Sets EXTENT_NOT_ALIGNED.*/ -#define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block. - * Sets EXTENT_NOT_ALIGNED.*/ -#define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but - * no data (i.e. zero). */ -#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively +#define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block. + * Sets EXTENT_NOT_ALIGNED. + */ +#define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but + * no data (i.e. zero). + */ +#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively * support extents. Result - * merged for efficiency. */ + * merged for efficiency. + */ static inline size_t fiemap_count_to_size(size_t extent_count) { @@ -114,7 +128,8 @@ static inline unsigned fiemap_size_to_count(size_t array_size) /* Lustre specific flags - use a high bit, don't conflict with upstream flag */ #define FIEMAP_EXTENT_NO_DIRECT 0x40000000 /* Data mapping undefined */ -#define FIEMAP_EXTENT_NET 0x80000000 /* Data stored remotely. - * Sets NO_DIRECT flag */ +#define FIEMAP_EXTENT_NET 0x80000000 /* Data stored remotely. + * Sets NO_DIRECT flag + */ #endif /* _LUSTRE_FIEMAP_H */ |