Re: [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl

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

 



On Sat, May 24, 2008 at 05:01:48PM -0700, Mark Fasheh wrote:
> * FIEMAP_FLAG_HSM_READ
> If the extent is offline, retrieve it before mapping and do not flag
> it as FIEMAP_EXTENT_SECONDARY. This flag has no effect if the file
> system does not support HSM.

Given that there's no HSM support in mainline this should not be added.
It'll be useful once we add proper HSM support, though :)

> * FIEMAP_FLAG_LUN_ORDER
> If the file system stripes file data, this will return contiguous
> regions of physical allocation, sorted by LUN. Logical offsets may not
> make sense if this flag is passed. If the file system does not support
> multiple LUNs, this flag will be ignored.

A LUN doesn't make any sense in filesystem context.  That's a
scsi-centric acronym that doesn't even make sense in a scsi-centric
filesystem universe because a LUN can of course contain multiple
partitions.  It's also extremly ill-defined when using volume managers.

There's also no filesystems that actually support a single file on
multiple device in mainline, the only filesystem that supports multiple
data devices at all (XFS) requires each file to be on a single device.

Once we have a filesystem with real multiple data device support like
btrfs or a future XFS version we can worry about this and defined
a different ioctl for it.

> 
> 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)*/

Again this lun thing is horribly ill-defined.  There is no such thing
as a logic device number in our filesystem terminology.

> struct fiemap_extent_info {
> 	unsigned int	fi_flags;		/* Flags as passed from user */
> 	unsigned int	fi_extents_mapped;	/* Number of mapped extents */
> 	unsigned int	fi_extents_max;		/* Size of fiemap_extent array */
> 	char		*fi_extents_start;	/* Start of fiemap_extent array */
> };

Why is this passes a structure instead of individual arguments?
Also why isn't fi_extents_start properly typed?

> If the request has the FIEMAP_FLAG_NUM_EXTENTS flag set, then calling
> this helper is not necessary and fi_extents_mapped can be set
> directly.

Sounds like the count number of extents request should be a separate
ioctl and separate filesystem entry point instead of overloading FIEMAP.

Just define a simple FIECOUNT ioctl.
--
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