diff options
| -rw-r--r-- | fs/ocfs2/ocfs2_ioctl.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_ioctl.h b/fs/ocfs2/ocfs2_ioctl.h index 18b6770dc468..5b27ff1fa577 100644 --- a/fs/ocfs2/ocfs2_ioctl.h +++ b/fs/ocfs2/ocfs2_ioctl.h | |||
| @@ -205,4 +205,38 @@ enum ocfs2_info_type { | |||
| 205 | 205 | ||
| 206 | #define OCFS2_IOC_INFO _IOR('o', 5, struct ocfs2_info) | 206 | #define OCFS2_IOC_INFO _IOR('o', 5, struct ocfs2_info) |
| 207 | 207 | ||
| 208 | struct ocfs2_move_extents { | ||
| 209 | /* All values are in bytes */ | ||
| 210 | /* in */ | ||
| 211 | __u64 me_start; /* Virtual start in the file to move */ | ||
| 212 | __u64 me_len; /* Length of the extents to be moved */ | ||
| 213 | __u64 me_goal; /* Physical offset of the goal, | ||
| 214 | it's in block unit */ | ||
| 215 | __u64 me_threshold; /* Maximum distance from goal or threshold | ||
| 216 | for auto defragmentation */ | ||
| 217 | __u64 me_flags; /* Flags for the operation: | ||
| 218 | * - auto defragmentation. | ||
| 219 | * - refcount,xattr cases. | ||
| 220 | */ | ||
| 221 | /* out */ | ||
| 222 | __u64 me_moved_len; /* Moved/defraged length */ | ||
| 223 | __u64 me_new_offset; /* Resulting physical location */ | ||
| 224 | __u32 me_reserved[2]; /* Reserved for futhure */ | ||
| 225 | }; | ||
| 226 | |||
| 227 | #define OCFS2_MOVE_EXT_FL_AUTO_DEFRAG (0x00000001) /* Kernel manages to | ||
| 228 | claim new clusters | ||
| 229 | as the goal place | ||
| 230 | for extents moving */ | ||
| 231 | #define OCFS2_MOVE_EXT_FL_PART_DEFRAG (0x00000002) /* Allow partial extent | ||
| 232 | moving, is to make | ||
| 233 | movement less likely | ||
| 234 | to fail, may make fs | ||
| 235 | even more fragmented */ | ||
| 236 | #define OCFS2_MOVE_EXT_FL_COMPLETE (0x00000004) /* Move or defragmenation | ||
| 237 | completely gets done. | ||
| 238 | */ | ||
| 239 | |||
| 240 | #define OCFS2_IOC_MOVE_EXT _IOW('o', 6, struct ocfs2_move_extents) | ||
| 241 | |||
| 208 | #endif /* OCFS2_IOCTL_H */ | 242 | #endif /* OCFS2_IOCTL_H */ |
