CC: linux-doc@xxxxxxxxxxxxxxx CC: Rob Landley <rob@xxxxxxxxxxx> Signed-off-by: David Sterba <dsterba@xxxxxxx> --- Documentation/filesystems/fiemap.txt | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Documentation/filesystems/fiemap.txt b/Documentation/filesystems/fiemap.txt index 1b805a0..46bfc1c 100644 --- a/Documentation/filesystems/fiemap.txt +++ b/Documentation/filesystems/fiemap.txt @@ -80,10 +80,12 @@ returned in fm_extents. struct fiemap_extent { __u64 fe_logical; /* logical offset in bytes for the start of * the extent */ - __u64 fe_physical; /* physical offset in bytes for the start - * of the extent */ + __u64 fe_physical; /* physical offset in bytes for the start + * of the extent from the beginning of the disk */ __u64 fe_length; /* length in bytes for the extent */ - __u64 fe_reserved64[2]; + __u64 fe_phys_length; /* physical length in bytes, undefined if + * DATA_COMPRESSED not set */ + __u64 fe_reserved64; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_reserved[3]; }; @@ -93,7 +95,8 @@ for an extents logical offset to start before the request or its logical length to extend past the request. Unless FIEMAP_EXTENT_NOT_ALIGNED is returned, fe_logical, fe_physical, and fe_length will be aligned to the block size of the file system. With the exception of extents flagged as -FIEMAP_EXTENT_MERGED, adjacent extents will not be merged. +FIEMAP_EXTENT_MERGED, adjacent extents will not be merged. The value of +fe_phys_length is valid only if FIEMAP_EXTENT_DATA_COMPRESSED is set. The fe_flags field contains flags which describe the extent returned. A special flag, FIEMAP_EXTENT_LAST is always set on the last extent in @@ -143,6 +146,12 @@ unmounted, and then only if the FIEMAP_EXTENT_ENCODED flag is clear; user applications must not try reading or writing to the filesystem via the block device under any other circumstances. +* FIEMAP_EXTENT_DATA_COMPRESSED + - This will also set FIEMAP_EXTENT_ENCODED +The data in this extent has been compressed by the file system. When +set, fe_phys_length contains the physical extent length in bytes. The +value may be rounded depending on the filesystem implementation. + * FIEMAP_EXTENT_DATA_ENCRYPTED - This will also set FIEMAP_EXTENT_ENCODED The data in this extent has been encrypted by the file system. -- 1.7.9 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html