--On 18 April 2007 6:21:39 PM -0600 Andreas Dilger <[EMAIL PROTECTED]> wrote:
Below is an aggregation of the comments in this thread:
struct fiemap_extent {
__u64 fe_start; /* starting offset in bytes */
__u64 fe_len; /* length in bytes */
__u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
__u32 fe_lun; /* logical storage device number in array */
}
struct fiemap {
__u64 fm_start; /* logical start offset of mapping (in/out) */
__u64 fm_len; /* logical length of mapping (in/out) */
__u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
__u32 fm_extent_count; /* number of extents in fm_extents (in/out) */
__u64 fm_unused;
struct fiemap_extent fm_extents[0];
}
/* flags for the fiemap request */
# define FIEMAP_FLAG_SYNC 0x00000001 /* flush delalloc data to disk*/
# define FIEMAP_FLAG_HSM_READ 0x00000002 /* retrieve data from HSM */
# define FIEMAP_FLAG_INCOMPAT 0xff000000 /* must understand these flags*/
/* flags for the returned extents */
# define FIEMAP_EXTENT_HOLE 0x00000001 /* no space allocated */
# define FIEMAP_EXTENT_UNWRITTEN 0x00000002 /* uninitialized space
*/
# define FIEMAP_EXTENT_UNKNOWN 0x00000004 /* in use, location unknown */
# define FIEMAP_EXTENT_ERROR 0x00000008 /* error mapping space */
# define FIEMAP_EXTENT_NO_DIRECT 0x00000010 /* no direct data
access */
SUMMARY OF CHANGES
==================
- use fm_* fields directly in request instead of making it a fiemap_extent
(though they are layed out identically)
I much prefer that - it makes it a lot clearer to me to have fiemap_extent
just for fm_extents (no different meanings now).
(Don't like the word "offset" in comment without "physical" or some such but
whatever;-)
I also prefer the flags as separate fields too :)
--Tim
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html