[Ocfs2-tools-devel] [PATCH 1/1] ocfs2-tools: add definition of ocfs2_move_extents in ocfs2_ioctl.h
Tristan Ye
tye.kernel at gmail.com
Tue Aug 30 00:20:59 PDT 2011
Cool, Tiger.
SOB
BTW, I guess a defrag utility calling ioctl(MOVE_EXT) will be posted later?
On Tue, Aug 30, 2011 at 11:13 AM, Tiger Yang <tiger.yang at oracle.com> wrote:
> This patch update the definition of ocfs2_move_extents from
> kernel head file.
>
> Signed-off-by: Tiger Yang <tiger.yang at oracle.com>
> ---
> include/ocfs2-kernel/ocfs2_ioctl.h | 34
> ++++++++++++++++++++++++++++++++++
> 1 files changed, 34 insertions(+), 0 deletions(-)
>
> diff --git a/include/ocfs2-kernel/ocfs2_ioctl.h
> b/include/ocfs2-kernel/ocfs2_ioctl.h
> index 05ea113..0ba4f2e 100644
> --- a/include/ocfs2-kernel/ocfs2_ioctl.h
> +++ b/include/ocfs2-kernel/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 */
> --
> 1.7.4.4
>
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20110830/ae5d469f/attachment.html
More information about the Ocfs2-tools-devel
mailing list