CC: linux-doc@xxxxxxxxxxxxxxx CC: Rob Landley <rob@xxxxxxxxxxx> Signed-off-by: David Sterba <dsterba@xxxxxxx> --- Documentation/filesystems/fiemap.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/fiemap.txt b/Documentation/filesystems/fiemap.txt index 1b805a0efbb0..1275dc27ab82 100644 --- a/Documentation/filesystems/fiemap.txt +++ b/Documentation/filesystems/fiemap.txt @@ -83,7 +83,9 @@ struct fiemap_extent { __u64 fe_physical; /* physical offset in bytes for the start * of the extent */ __u64 fe_length; /* length in bytes for the extent */ - __u64 fe_reserved64[2]; + __u64 fe_phys_length; /* physical length in bytes, may be different from + * fe_length, is valid if PHYS_LENGTH flag set */ + __u64 fe_reserved64; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_reserved[3]; }; @@ -93,7 +95,10 @@ 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 if FIEMAP_EXTENT_PHYS_LENGTH is set. It may be +different from fe_length and may set additional extent flags that indicate +the reason, eg. for compression it's FIEMAP_EXTENT_DATA_COMPRESSED. 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 +148,16 @@ 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_PHYS_LENGTH +If set then fe_phys_length is valid and contains the physical size of the +extent. + +* 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.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html