Re: [PATCH 1/5] vfs: vfs-level fiemap interface

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

 



On May 24, 2008  17:01 -0700, Mark Fasheh wrote:
> +Each extent is described by a single fiemap_extent structure as
> +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_length; /* length in bytes for the extent */
> +	__u32	fe_flags;  /* returned FIEMAP_EXTENT_* flags for the extent */
> +	__u32	fe_lun;	   /* logical device number for extent (starting at 0)*/
> +};

I was reading through the original FIEMAP thread, and one requirement
which isn't addressed with the current code (it was missed in the original
patch also) is the ability to return a physical extent length different
from the logical extent length.

This was originally brought up by Jörn Engel in the context of logfs
compressing data on disk.  It makes sense that the physical extent
length is shorter than the logical extent length in this case.  The
same is probably true for cramfs, and even ext* if the block compression
code was still maintained.  It wouldn't be a surprise if Chris was to
add compression to btrfs also.

So, I think we need another __u64 in he fiemap_extent which is
fe_loglength, and rename fe_length to fe_physlength.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
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