^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /* -*- mode: c; c-basic-offset: 8; -*-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * vim: noexpandtab sw=8 ts=8 sts=0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * ocfs2_ioctl.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Defines OCFS2 ioctls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Copyright (C) 2010 Oracle. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #ifndef OCFS2_IOCTL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define OCFS2_IOCTL_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * ioctl commands
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define OCFS2_IOC_GETFLAGS FS_IOC_GETFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define OCFS2_IOC_SETFLAGS FS_IOC_SETFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define OCFS2_IOC32_GETFLAGS FS_IOC32_GETFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define OCFS2_IOC32_SETFLAGS FS_IOC32_SETFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) * Space reservation / allocation / free ioctls and argument structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) * are designed to be compatible with XFS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) * ALLOCSP* and FREESP* are not and will never be supported, but are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) * included here for completeness.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct ocfs2_space_resv {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) __s16 l_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) __s16 l_whence;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) __s64 l_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) __s64 l_len; /* len == 0 means until end of file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) __s32 l_sysid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) __u32 l_pid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) __s32 l_pad[4]; /* reserve area */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #define OCFS2_IOC_ALLOCSP _IOW ('X', 10, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #define OCFS2_IOC_FREESP _IOW ('X', 11, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #define OCFS2_IOC_RESVSP _IOW ('X', 40, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #define OCFS2_IOC_UNRESVSP _IOW ('X', 41, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define OCFS2_IOC_ALLOCSP64 _IOW ('X', 36, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #define OCFS2_IOC_FREESP64 _IOW ('X', 37, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #define OCFS2_IOC_RESVSP64 _IOW ('X', 42, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #define OCFS2_IOC_UNRESVSP64 _IOW ('X', 43, struct ocfs2_space_resv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) /* Used to pass group descriptor data when online resize is done */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) struct ocfs2_new_group_input {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) __u64 group; /* Group descriptor's blkno. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) __u32 clusters; /* Total number of clusters in this group */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) __u32 frees; /* Total free clusters in this group */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) __u16 chain; /* Chain for this group */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) __u16 reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) __u32 reserved2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) #define OCFS2_IOC_GROUP_EXTEND _IOW('o', 1, int)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #define OCFS2_IOC_GROUP_ADD _IOW('o', 2,struct ocfs2_new_group_input)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #define OCFS2_IOC_GROUP_ADD64 _IOW('o', 3,struct ocfs2_new_group_input)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) /* Used to pass 2 file names to reflink. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) struct reflink_arguments {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) __u64 old_path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) __u64 new_path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) __u64 preserve;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) #define OCFS2_IOC_REFLINK _IOW('o', 4, struct reflink_arguments)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) /* Following definitions dedicated for ocfs2_info_request ioctls. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #define OCFS2_INFO_MAX_REQUEST (50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #define OCFS2_TEXT_UUID_LEN (OCFS2_VOL_UUID_LEN * 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) /* Magic number of all requests */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) #define OCFS2_INFO_MAGIC (0x4F32494E)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) * Always try to separate info request into small pieces to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) * guarantee the backward&forward compatibility.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) struct ocfs2_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) __u64 oi_requests; /* Array of __u64 pointers to requests */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) __u32 oi_count; /* Number of requests in info_requests */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) __u32 oi_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) struct ocfs2_info_request {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) /*00*/ __u32 ir_magic; /* Magic number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) __u32 ir_code; /* Info request code */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) __u32 ir_size; /* Size of request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) __u32 ir_flags; /* Request flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) /*10*/ /* Request specific fields */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) struct ocfs2_info_clustersize {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) struct ocfs2_info_request ic_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) __u32 ic_clustersize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) __u32 ic_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) struct ocfs2_info_blocksize {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) struct ocfs2_info_request ib_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) __u32 ib_blocksize;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) __u32 ib_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct ocfs2_info_maxslots {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) struct ocfs2_info_request im_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) __u32 im_max_slots;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) __u32 im_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) struct ocfs2_info_label {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) struct ocfs2_info_request il_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) __u8 il_label[OCFS2_MAX_VOL_LABEL_LEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) struct ocfs2_info_uuid {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) struct ocfs2_info_request iu_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) __u8 iu_uuid_str[OCFS2_TEXT_UUID_LEN + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) } __attribute__ ((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) struct ocfs2_info_fs_features {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) struct ocfs2_info_request if_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) __u32 if_compat_features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) __u32 if_incompat_features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) __u32 if_ro_compat_features;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) __u32 if_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) struct ocfs2_info_journal_size {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) struct ocfs2_info_request ij_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) __u64 ij_journal_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) struct ocfs2_info_freeinode {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) struct ocfs2_info_request ifi_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) struct ocfs2_info_local_freeinode {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) __u64 lfi_total;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) __u64 lfi_free;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) } ifi_stat[OCFS2_MAX_SLOTS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) __u32 ifi_slotnum; /* out */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) __u32 ifi_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define OCFS2_INFO_MAX_HIST (32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) struct ocfs2_info_freefrag {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) struct ocfs2_info_request iff_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) struct ocfs2_info_freefrag_stats { /* (out) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) struct ocfs2_info_free_chunk_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) __u32 fc_chunks[OCFS2_INFO_MAX_HIST];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) __u32 fc_clusters[OCFS2_INFO_MAX_HIST];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) } ffs_fc_hist;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) __u32 ffs_clusters;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) __u32 ffs_free_clusters;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) __u32 ffs_free_chunks;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) __u32 ffs_free_chunks_real;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) __u32 ffs_min; /* Minimum free chunksize in clusters */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) __u32 ffs_max;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) __u32 ffs_avg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) __u32 ffs_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) } iff_ffs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) __u32 iff_chunksize; /* chunksize in clusters(in) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) __u32 iff_pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) /* Codes for ocfs2_info_request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) enum ocfs2_info_type {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) OCFS2_INFO_CLUSTERSIZE = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) OCFS2_INFO_BLOCKSIZE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) OCFS2_INFO_MAXSLOTS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) OCFS2_INFO_LABEL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) OCFS2_INFO_UUID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) OCFS2_INFO_FS_FEATURES,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) OCFS2_INFO_JOURNAL_SIZE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) OCFS2_INFO_FREEINODE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) OCFS2_INFO_FREEFRAG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) OCFS2_INFO_NUM_TYPES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) /* Flags for struct ocfs2_info_request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) /* Filled by the caller */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) #define OCFS2_INFO_FL_NON_COHERENT (0x00000001) /* Cluster coherency not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) required. This is a hint.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) It is up to ocfs2 whether
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) the request can be fulfilled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) without locking. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) /* Filled by ocfs2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) #define OCFS2_INFO_FL_FILLED (0x40000000) /* Filesystem understood
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) this request and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) filled in the answer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #define OCFS2_INFO_FL_ERROR (0x80000000) /* Error happened during
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) request handling. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) #define OCFS2_IOC_INFO _IOR('o', 5, struct ocfs2_info)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) struct ocfs2_move_extents {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /* All values are in bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) /* in */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) __u64 me_start; /* Virtual start in the file to move */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) __u64 me_len; /* Length of the extents to be moved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) __u64 me_goal; /* Physical offset of the goal,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) it's in block unit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) __u64 me_threshold; /* Maximum distance from goal or threshold
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) for auto defragmentation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) __u64 me_flags; /* Flags for the operation:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) * - auto defragmentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) * - refcount,xattr cases.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) /* out */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) __u64 me_moved_len; /* Moved/defraged length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) __u64 me_new_offset; /* Resulting physical location */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) __u32 me_reserved[2]; /* Reserved for futhure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) #define OCFS2_MOVE_EXT_FL_AUTO_DEFRAG (0x00000001) /* Kernel manages to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) claim new clusters
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) as the goal place
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) for extents moving */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) #define OCFS2_MOVE_EXT_FL_PART_DEFRAG (0x00000002) /* Allow partial extent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) moving, is to make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) movement less likely
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) to fail, may make fs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) even more fragmented */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) #define OCFS2_MOVE_EXT_FL_COMPLETE (0x00000004) /* Move or defragmenation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) completely gets done.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #define OCFS2_IOC_MOVE_EXT _IOW('o', 6, struct ocfs2_move_extents)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) #endif /* OCFS2_IOCTL_H */