ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Tristan Ye <tristan.ye@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/8] Ocfs2: Adding new ioctl code 'OCFS2_IOC_MOVE_EXT' to ocfs2.
Date: Thu, 13 Jan 2011 18:20:13 +0800	[thread overview]
Message-ID: <1294914020-21628-2-git-send-email-tristan.ye@oracle.com> (raw)
In-Reply-To: <1294914020-21628-1-git-send-email-tristan.ye@oracle.com>

Patch also manages to add a manipulative struture for this ioctl.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
---
 fs/ocfs2/ocfs2_ioctl.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/ocfs2_ioctl.h b/fs/ocfs2/ocfs2_ioctl.h
index b46f39b..25c28ec 100644
--- a/fs/ocfs2/ocfs2_ioctl.h
+++ b/fs/ocfs2/ocfs2_ioctl.h
@@ -171,4 +171,32 @@ enum ocfs2_info_type {
 
 #define OCFS2_IOC_INFO		_IOR('o', 5, struct ocfs2_info)
 
+#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_COMPLETE	(0x00000002)	/* Move or defragmenation
+							   completely gets done.
+							 */
+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_thresh;	/* 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_IOC_MOVE_EXT	_IOW('o', 6, struct ocfs2_move_extents)
+
 #endif /* OCFS2_IOCTL_H */
-- 
1.5.5

  reply	other threads:[~2011-01-13 10:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 10:20 [Ocfs2-devel] [PATCH 0/8] Ocfs2: Online defragmentaion V2 Tristan Ye
2011-01-13 10:20 ` Tristan Ye [this message]
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 2/8] Ocfs2: Add basic framework and source files for extent moving Tristan Ye
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 3/8] Ocfs2: Duplicate old clusters into new blk_offset by dirty and remap pages Tristan Ye
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 4/8] Ocfs2: move a range of extent Tristan Ye
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 5/8] Ocfs2: lock allocators and reserve metadata blocks and data clusters for extents moving Tristan Ye
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 6/8] Ocfs2: defrag a range of extent Tristan Ye
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 7/8] Ocfs2: move entire/partial extent Tristan Ye
2011-01-13 10:20 ` [Ocfs2-devel] [PATCH 8/8] Ocfs2: move/defrag extents within a certain range Tristan Ye
  -- strict thread matches above, loose matches on Subject: below --
2010-12-28 11:40 [Ocfs2-devel] [PATCH 0/8] Ocfs2: Online defragmentaion V1 Tristan Ye
2010-12-28 11:40 ` [Ocfs2-devel] [PATCH 1/8] Ocfs2: Adding new ioctl code 'OCFS2_IOC_MOVE_EXT' to ocfs2 Tristan Ye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294914020-21628-2-git-send-email-tristan.ye@oracle.com \
    --to=tristan.ye@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).