From db151f4702153b89311819fc874449fb6251b97c Mon Sep 17 00:00:00 2001 From: Tristan Ye Date: Wed, 25 May 2011 13:37:51 +0800 Subject: [PATCH] --- yaml --- r: 251802 b: refs/heads/master c: 220ebc4334326bc23e4c4c3f076dc5a58ec293f6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/ocfs2_ioctl.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9d1f6de46d12..31534fa70e54 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3e19a25e0591a6248f3ddd2c08566666607d827d +refs/heads/master: 220ebc4334326bc23e4c4c3f076dc5a58ec293f6 diff --git a/trunk/fs/ocfs2/ocfs2_ioctl.h b/trunk/fs/ocfs2/ocfs2_ioctl.h index 18b6770dc468..5b27ff1fa577 100644 --- a/trunk/fs/ocfs2/ocfs2_ioctl.h +++ b/trunk/fs/ocfs2/ocfs2_ioctl.h @@ -205,4 +205,38 @@ enum ocfs2_info_type { #define OCFS2_IOC_INFO _IOR('o', 5, struct ocfs2_info) +struct ocfs2_move_extents { +/* All values are in bytes */ + /* in */ + __u64 me_start; /* Virtual start in the file to move */ + __u64 me_len; /* Length of the extents to be moved */ + __u64 me_goal; /* Physical offset of the goal, + it's in block unit */ + __u64 me_threshold; /* Maximum distance from goal or threshold + for auto defragmentation */ + __u64 me_flags; /* Flags for the operation: + * - auto defragmentation. + * - refcount,xattr cases. + */ + /* out */ + __u64 me_moved_len; /* Moved/defraged length */ + __u64 me_new_offset; /* Resulting physical location */ + __u32 me_reserved[2]; /* Reserved for futhure */ +}; + +#define OCFS2_MOVE_EXT_FL_AUTO_DEFRAG (0x00000001) /* Kernel manages to + claim new clusters + as the goal place + for extents moving */ +#define OCFS2_MOVE_EXT_FL_PART_DEFRAG (0x00000002) /* Allow partial extent + moving, is to make + movement less likely + to fail, may make fs + even more fragmented */ +#define OCFS2_MOVE_EXT_FL_COMPLETE (0x00000004) /* Move or defragmenation + completely gets done. + */ + +#define OCFS2_IOC_MOVE_EXT _IOW('o', 6, struct ocfs2_move_extents) + #endif /* OCFS2_IOCTL_H */