[PATCH 5/5] fiemap: rename fe_length to fe_logi_length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pick a more descriptive name for the logical length.

Signed-off-by: David Sterba <dsterba@xxxxxxx>
---
 Documentation/filesystems/fiemap.txt | 10 +++++-----
 fs/ioctl.c                           |  2 +-
 include/uapi/linux/fiemap.h          |  3 ++-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/Documentation/filesystems/fiemap.txt b/Documentation/filesystems/fiemap.txt
index 353f299bcbeb..c2aba3a23d47 100644
--- a/Documentation/filesystems/fiemap.txt
+++ b/Documentation/filesystems/fiemap.txt
@@ -82,7 +82,7 @@ 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 and sets additional extent flags */
 	__u64	fe_reserved64;
@@ -93,12 +93,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 always set.  It may be different from fe_length and sets
-additional extent flags that indicate the reason, eg. for compression it's
-FIEMAP_EXTENT_DATA_COMPRESSED.
+fe_phys_length is always set.  It may be different from fe_logi_length and
+sets 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 24a9d912d1e6..20203a8c27b1 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -113,7 +113,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;
 
 	WARN_ONCE((flags & FIEMAP_EXTENT_DATA_COMPRESSED)
diff --git a/include/uapi/linux/fiemap.h b/include/uapi/linux/fiemap.h
index 11b51887b94a..561d9b4e7755 100644
--- a/include/uapi/linux/fiemap.h
+++ b/include/uapi/linux/fiemap.h
@@ -18,7 +18,8 @@ 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 and sets additional extent flags */
 	__u64 fe_reserved64;
-- 
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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux