~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/ocfs2/ocfs2_ioctl.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /fs/ocfs2/ocfs2_ioctl.h (Architecture alpha) and /fs/ocfs2/ocfs2_ioctl.h (Architecture m68k)


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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php