fiemap: Introduce FIEMAP_FLAG_COW flag to map shared extents
RFC PATCH 1/3 fiemap: Introduce FIEMAP_FLAG_COW flag to map shared extents
Introduce a new flag FIEMAP_FLAG_COW to fiemap ioctl(2) interface.
If this flag is set, the kernel will only return the mapped extents which are in copy-on-write state.
Signed-off-by Jie Liu <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Andreas Dilger <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
Cc Jan Kara <[email protected]>
Cc Chris Mason <[email protected]>
Cc Christoph Hellwig <[email protected]>
--- include/uapi/linux/fiemap.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
include/uapi/linux/fiemap.h +3 -1
@@ -40,8 +40,10 @@ struct fiemap {#define FIEMAP_FLAG_SYNC 0x00000001/* sync file data before map */ #define FIEMAP_FLAG_XATTR 0x00000002/* map extended attribute tree */ +#define FIEMAP_FLAG_COW 0x00000004/* map copy-on-write extents */ -#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR) +#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR | \ + FIEMAP_FLAG_COW)#define FIEMAP_EXTENT_LAST 0x00000001/* Last extent in file. */ #define FIEMAP_EXTENT_UNKNOWN 0x00000002/* Data location unknown. */
Signature · 1 line
1.7.9.5