Pick a more descriptive name for the logical length. Signed-off-by: David Sterba <dsterba@xxxxxxx> --- Documentation/filesystems/fiemap.txt | 11 ++++++----- fs/ioctl.c | 2 +- include/uapi/linux/fiemap.h | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Documentation/filesystems/fiemap.txt b/Documentation/filesystems/fiemap.txt index 1275dc27ab82..0e0b51e90cf4 100644 --- a/Documentation/filesystems/fiemap.txt +++ b/Documentation/filesystems/fiemap.txt @@ -82,9 +82,10 @@ struct fiemap_extent { * the 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_logi_length; /* logical length in bytes for the extent */ __u64 fe_phys_length; /* physical length in bytes, may be different from - * fe_length, is valid if PHYS_LENGTH flag set */ + * fe_logi_length, is valid if PHYS_LENGTH flag + * is set */ __u64 fe_reserved64; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_reserved[3]; @@ -93,12 +94,12 @@ struct fiemap_extent { All offsets and lengths are in bytes and mirror those on disk. It is valid 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 +returned, fe_logical, fe_physical, and fe_logi_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. 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. +different from fe_logi_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 diff --git a/fs/ioctl.c b/fs/ioctl.c index 902b1d5a6316..442b5630d608 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -109,7 +109,7 @@ int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical, memset(&extent, 0, sizeof(extent)); extent.fe_logical = logical; extent.fe_physical = phys; - extent.fe_length = len; + extent.fe_logi_length = len; extent.fe_flags = flags; extent.fe_phys_length = phys_len; diff --git a/include/uapi/linux/fiemap.h b/include/uapi/linux/fiemap.h index 64fb1b3a7e1f..28ae5a0cbba0 100644 --- a/include/uapi/linux/fiemap.h +++ b/include/uapi/linux/fiemap.h @@ -18,9 +18,11 @@ struct fiemap_extent { * 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 */ - __u64 fe_length; /* length in bytes for this extent */ +#define fe_length fe_logi_length + __u64 fe_logi_length; /* logical length in bytes for this extent */ __u64 fe_phys_length; /* physical length in bytes, may be different from - * fe_length, is valid if PHYS_LENGTH flag set */ + * fe_logi_length, is valid if PHYS_LENGTH flag + * is set */ __u64 fe_reserved64; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_reserved[3]; -- 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