1
2
3
4
5
6#ifndef __XFS_FS_H__
7#define __XFS_FS_H__
8
9
10
11
12
13
14
15
16
17
18#ifndef HAVE_DIOATTR
19struct dioattr {
20 __u32 d_mem;
21 __u32 d_miniosz;
22 __u32 d_maxiosz;
23};
24#endif
25
26
27
28
29
30
31
32
33#ifndef HAVE_GETBMAP
34struct getbmap {
35 __s64 bmv_offset;
36 __s64 bmv_block;
37 __s64 bmv_length;
38 __s32 bmv_count;
39 __s32 bmv_entries;
40};
41#endif
42
43
44
45
46
47
48
49
50
51
52#ifndef HAVE_GETBMAPX
53struct getbmapx {
54 __s64 bmv_offset;
55 __s64 bmv_block;
56 __s64 bmv_length;
57 __s32 bmv_count;
58 __s32 bmv_entries;
59 __s32 bmv_iflags;
60 __s32 bmv_oflags;
61 __s32 bmv_unused1;
62 __s32 bmv_unused2;
63};
64#endif
65
66
67#define BMV_IF_ATTRFORK 0x1
68#define BMV_IF_NO_DMAPI_READ 0x2
69#define BMV_IF_PREALLOC 0x4
70#define BMV_IF_DELALLOC 0x8
71#define BMV_IF_NO_HOLES 0x10
72#define BMV_IF_COWFORK 0x20
73#define BMV_IF_VALID \
74 (BMV_IF_ATTRFORK|BMV_IF_NO_DMAPI_READ|BMV_IF_PREALLOC| \
75 BMV_IF_DELALLOC|BMV_IF_NO_HOLES|BMV_IF_COWFORK)
76
77
78#define BMV_OF_PREALLOC 0x1
79#define BMV_OF_DELALLOC 0x2
80#define BMV_OF_LAST 0x4
81#define BMV_OF_SHARED 0x8
82
83
84#define XFS_FMR_OWN_FREE FMR_OWN_FREE
85#define XFS_FMR_OWN_UNKNOWN FMR_OWN_UNKNOWN
86#define XFS_FMR_OWN_FS FMR_OWNER('X', 1)
87#define XFS_FMR_OWN_LOG FMR_OWNER('X', 2)
88#define XFS_FMR_OWN_AG FMR_OWNER('X', 3)
89#define XFS_FMR_OWN_INOBT FMR_OWNER('X', 4)
90#define XFS_FMR_OWN_INODES FMR_OWNER('X', 5)
91#define XFS_FMR_OWN_REFC FMR_OWNER('X', 6)
92#define XFS_FMR_OWN_COW FMR_OWNER('X', 7)
93#define XFS_FMR_OWN_DEFECTIVE FMR_OWNER('X', 8)
94
95
96
97
98
99typedef struct xfs_flock64 {
100 __s16 l_type;
101 __s16 l_whence;
102 __s64 l_start;
103 __s64 l_len;
104 __s32 l_sysid;
105 __u32 l_pid;
106 __s32 l_pad[4];
107} xfs_flock64_t;
108
109
110
111
112struct xfs_fsop_geom_v1 {
113 __u32 blocksize;
114 __u32 rtextsize;
115 __u32 agblocks;
116 __u32 agcount;
117 __u32 logblocks;
118 __u32 sectsize;
119 __u32 inodesize;
120 __u32 imaxpct;
121 __u64 datablocks;
122 __u64 rtblocks;
123 __u64 rtextents;
124 __u64 logstart;
125 unsigned char uuid[16];
126 __u32 sunit;
127 __u32 swidth;
128 __s32 version;
129 __u32 flags;
130 __u32 logsectsize;
131 __u32 rtsectsize;
132 __u32 dirblocksize;
133};
134
135
136
137
138struct xfs_fsop_geom_v4 {
139 __u32 blocksize;
140 __u32 rtextsize;
141 __u32 agblocks;
142 __u32 agcount;
143 __u32 logblocks;
144 __u32 sectsize;
145 __u32 inodesize;
146 __u32 imaxpct;
147 __u64 datablocks;
148 __u64 rtblocks;
149 __u64 rtextents;
150 __u64 logstart;
151 unsigned char uuid[16];
152 __u32 sunit;
153 __u32 swidth;
154 __s32 version;
155 __u32 flags;
156 __u32 logsectsize;
157 __u32 rtsectsize;
158 __u32 dirblocksize;
159 __u32 logsunit;
160};
161
162
163
164
165struct xfs_fsop_geom {
166 __u32 blocksize;
167 __u32 rtextsize;
168 __u32 agblocks;
169 __u32 agcount;
170 __u32 logblocks;
171 __u32 sectsize;
172 __u32 inodesize;
173 __u32 imaxpct;
174 __u64 datablocks;
175 __u64 rtblocks;
176 __u64 rtextents;
177 __u64 logstart;
178 unsigned char uuid[16];
179 __u32 sunit;
180 __u32 swidth;
181 __s32 version;
182 __u32 flags;
183 __u32 logsectsize;
184 __u32 rtsectsize;
185 __u32 dirblocksize;
186 __u32 logsunit;
187 uint32_t sick;
188 uint32_t checked;
189 __u64 reserved[17];
190};
191
192#define XFS_FSOP_GEOM_SICK_COUNTERS (1 << 0)
193#define XFS_FSOP_GEOM_SICK_UQUOTA (1 << 1)
194#define XFS_FSOP_GEOM_SICK_GQUOTA (1 << 2)
195#define XFS_FSOP_GEOM_SICK_PQUOTA (1 << 3)
196#define XFS_FSOP_GEOM_SICK_RT_BITMAP (1 << 4)
197#define XFS_FSOP_GEOM_SICK_RT_SUMMARY (1 << 5)
198
199
200typedef struct xfs_fsop_counts {
201 __u64 freedata;
202 __u64 freertx;
203 __u64 freeino;
204 __u64 allocino;
205} xfs_fsop_counts_t;
206
207
208typedef struct xfs_fsop_resblks {
209 __u64 resblks;
210 __u64 resblks_avail;
211} xfs_fsop_resblks_t;
212
213#define XFS_FSOP_GEOM_VERSION 0
214#define XFS_FSOP_GEOM_VERSION_V5 5
215
216#define XFS_FSOP_GEOM_FLAGS_ATTR (1 << 0)
217#define XFS_FSOP_GEOM_FLAGS_NLINK (1 << 1)
218#define XFS_FSOP_GEOM_FLAGS_QUOTA (1 << 2)
219#define XFS_FSOP_GEOM_FLAGS_IALIGN (1 << 3)
220#define XFS_FSOP_GEOM_FLAGS_DALIGN (1 << 4)
221#define XFS_FSOP_GEOM_FLAGS_SHARED (1 << 5)
222#define XFS_FSOP_GEOM_FLAGS_EXTFLG (1 << 6)
223#define XFS_FSOP_GEOM_FLAGS_DIRV2 (1 << 7)
224#define XFS_FSOP_GEOM_FLAGS_LOGV2 (1 << 8)
225#define XFS_FSOP_GEOM_FLAGS_SECTOR (1 << 9)
226#define XFS_FSOP_GEOM_FLAGS_ATTR2 (1 << 10)
227#define XFS_FSOP_GEOM_FLAGS_PROJID32 (1 << 11)
228#define XFS_FSOP_GEOM_FLAGS_DIRV2CI (1 << 12)
229
230#define XFS_FSOP_GEOM_FLAGS_LAZYSB (1 << 14)
231#define XFS_FSOP_GEOM_FLAGS_V5SB (1 << 15)
232#define XFS_FSOP_GEOM_FLAGS_FTYPE (1 << 16)
233#define XFS_FSOP_GEOM_FLAGS_FINOBT (1 << 17)
234#define XFS_FSOP_GEOM_FLAGS_SPINODES (1 << 18)
235#define XFS_FSOP_GEOM_FLAGS_RMAPBT (1 << 19)
236#define XFS_FSOP_GEOM_FLAGS_REFLINK (1 << 20)
237#define XFS_FSOP_GEOM_FLAGS_BIGTIME (1 << 21)
238#define XFS_FSOP_GEOM_FLAGS_INOBTCNT (1 << 22)
239#define XFS_FSOP_GEOM_FLAGS_NREXT64 (1 << 23)
240
241
242
243
244
245
246#define XFS_MIN_AG_BLOCKS 64
247#define XFS_MIN_LOG_BLOCKS 512ULL
248#define XFS_MAX_LOG_BLOCKS (1024 * 1024ULL)
249#define XFS_MIN_LOG_BYTES (10 * 1024 * 1024ULL)
250
251
252
253
254
255#define XFS_MIN_AG_BYTES (1ULL << 24)
256#define XFS_MAX_AG_BYTES (1ULL << 40)
257#define XFS_MAX_AG_BLOCKS (XFS_MAX_AG_BYTES / XFS_MIN_BLOCKSIZE)
258#define XFS_MAX_CRC_AG_BLOCKS (XFS_MAX_AG_BYTES / XFS_MIN_CRC_BLOCKSIZE)
259
260
261#define XFS_MAX_LOG_BYTES \
262 ((2 * 1024 * 1024 * 1024ULL) - XFS_MIN_LOG_BYTES)
263
264
265#define XFS_MAX_DBLOCKS(s) ((xfs_rfsblock_t)(s)->sb_agcount * (s)->sb_agblocks)
266#define XFS_MIN_DBLOCKS(s) ((xfs_rfsblock_t)((s)->sb_agcount - 1) * \
267 (s)->sb_agblocks + XFS_MIN_AG_BLOCKS)
268
269
270
271
272struct xfs_ag_geometry {
273 uint32_t ag_number;
274 uint32_t ag_length;
275 uint32_t ag_freeblks;
276 uint32_t ag_icount;
277 uint32_t ag_ifree;
278 uint32_t ag_sick;
279 uint32_t ag_checked;
280 uint32_t ag_flags;
281 uint64_t ag_reserved[12];
282};
283#define XFS_AG_GEOM_SICK_SB (1 << 0)
284#define XFS_AG_GEOM_SICK_AGF (1 << 1)
285#define XFS_AG_GEOM_SICK_AGFL (1 << 2)
286#define XFS_AG_GEOM_SICK_AGI (1 << 3)
287#define XFS_AG_GEOM_SICK_BNOBT (1 << 4)
288#define XFS_AG_GEOM_SICK_CNTBT (1 << 5)
289#define XFS_AG_GEOM_SICK_INOBT (1 << 6)
290#define XFS_AG_GEOM_SICK_FINOBT (1 << 7)
291#define XFS_AG_GEOM_SICK_RMAPBT (1 << 8)
292#define XFS_AG_GEOM_SICK_REFCNTBT (1 << 9)
293
294
295
296
297typedef struct xfs_growfs_data {
298 __u64 newblocks;
299 __u32 imaxpct;
300} xfs_growfs_data_t;
301
302typedef struct xfs_growfs_log {
303 __u32 newblocks;
304 __u32 isint;
305} xfs_growfs_log_t;
306
307typedef struct xfs_growfs_rt {
308 __u64 newblocks;
309 __u32 extsize;
310} xfs_growfs_rt_t;
311
312
313
314
315
316typedef struct xfs_bstime {
317 __kernel_long_t tv_sec;
318 __s32 tv_nsec;
319} xfs_bstime_t;
320
321struct xfs_bstat {
322 __u64 bs_ino;
323 __u16 bs_mode;
324 __u16 bs_nlink;
325 __u32 bs_uid;
326 __u32 bs_gid;
327 __u32 bs_rdev;
328 __s32 bs_blksize;
329 __s64 bs_size;
330 xfs_bstime_t bs_atime;
331 xfs_bstime_t bs_mtime;
332 xfs_bstime_t bs_ctime;
333 int64_t bs_blocks;
334 __u32 bs_xflags;
335 __s32 bs_extsize;
336 __s32 bs_extents;
337 __u32 bs_gen;
338 __u16 bs_projid_lo;
339#define bs_projid bs_projid_lo
340 __u16 bs_forkoff;
341 __u16 bs_projid_hi;
342 uint16_t bs_sick;
343 uint16_t bs_checked;
344 unsigned char bs_pad[2];
345 __u32 bs_cowextsize;
346 __u32 bs_dmevmask;
347 __u16 bs_dmstate;
348 __u16 bs_aextents;
349};
350
351
352struct xfs_bulkstat {
353 uint64_t bs_ino;
354 uint64_t bs_size;
355
356 uint64_t bs_blocks;
357 uint64_t bs_xflags;
358
359 int64_t bs_atime;
360 int64_t bs_mtime;
361
362 int64_t bs_ctime;
363 int64_t bs_btime;
364
365 uint32_t bs_gen;
366 uint32_t bs_uid;
367 uint32_t bs_gid;
368 uint32_t bs_projectid;
369
370 uint32_t bs_atime_nsec;
371 uint32_t bs_mtime_nsec;
372 uint32_t bs_ctime_nsec;
373 uint32_t bs_btime_nsec;
374
375 uint32_t bs_blksize;
376 uint32_t bs_rdev;
377 uint32_t bs_cowextsize_blks;
378 uint32_t bs_extsize_blks;
379
380 uint32_t bs_nlink;
381 uint32_t bs_extents;
382 uint32_t bs_aextents;
383 uint16_t bs_version;
384 uint16_t bs_forkoff;
385
386 uint16_t bs_sick;
387 uint16_t bs_checked;
388 uint16_t bs_mode;
389 uint16_t bs_pad2;
390 uint64_t bs_extents64;
391
392 uint64_t bs_pad[6];
393};
394
395#define XFS_BULKSTAT_VERSION_V1 (1)
396#define XFS_BULKSTAT_VERSION_V5 (5)
397
398
399#define XFS_BS_SICK_INODE (1 << 0)
400#define XFS_BS_SICK_BMBTD (1 << 1)
401#define XFS_BS_SICK_BMBTA (1 << 2)
402#define XFS_BS_SICK_BMBTC (1 << 3)
403#define XFS_BS_SICK_DIR (1 << 4)
404#define XFS_BS_SICK_XATTR (1 << 5)
405#define XFS_BS_SICK_SYMLINK (1 << 6)
406#define XFS_BS_SICK_PARENT (1 << 7)
407
408
409
410
411
412
413static inline uint32_t
414bstat_get_projid(const struct xfs_bstat *bs)
415{
416 return (uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
417}
418
419
420
421
422struct xfs_fsop_bulkreq {
423 __u64 __user *lastip;
424 __s32 icount;
425 void __user *ubuffer;
426 __s32 __user *ocount;
427};
428
429
430
431
432struct xfs_inogrp {
433 __u64 xi_startino;
434 __s32 xi_alloccount;
435 __u64 xi_allocmask;
436};
437
438
439struct xfs_inumbers {
440 uint64_t xi_startino;
441 uint64_t xi_allocmask;
442 uint8_t xi_alloccount;
443 uint8_t xi_version;
444 uint8_t xi_padding[6];
445};
446
447#define XFS_INUMBERS_VERSION_V1 (1)
448#define XFS_INUMBERS_VERSION_V5 (5)
449
450
451struct xfs_bulk_ireq {
452 uint64_t ino;
453 uint32_t flags;
454 uint32_t icount;
455 uint32_t ocount;
456 uint32_t agno;
457 uint64_t reserved[5];
458};
459
460
461
462
463
464#define XFS_BULK_IREQ_AGNO (1U << 0)
465
466
467
468
469
470
471#define XFS_BULK_IREQ_SPECIAL (1U << 1)
472
473
474
475
476
477
478
479
480
481#define XFS_BULK_IREQ_NREXT64 (1U << 2)
482
483#define XFS_BULK_IREQ_FLAGS_ALL (XFS_BULK_IREQ_AGNO | \
484 XFS_BULK_IREQ_SPECIAL | \
485 XFS_BULK_IREQ_NREXT64)
486
487
488#define XFS_BULK_IREQ_SPECIAL_ROOT (1)
489
490
491
492
493struct xfs_bulkstat_req {
494 struct xfs_bulk_ireq hdr;
495 struct xfs_bulkstat bulkstat[];
496};
497#define XFS_BULKSTAT_REQ_SIZE(nr) (sizeof(struct xfs_bulkstat_req) + \
498 (nr) * sizeof(struct xfs_bulkstat))
499
500struct xfs_inumbers_req {
501 struct xfs_bulk_ireq hdr;
502 struct xfs_inumbers inumbers[];
503};
504#define XFS_INUMBERS_REQ_SIZE(nr) (sizeof(struct xfs_inumbers_req) + \
505 (nr) * sizeof(struct xfs_inumbers))
506
507
508
509
510typedef struct xfs_error_injection {
511 __s32 fd;
512 __s32 errtag;
513} xfs_error_injection_t;
514
515
516
517
518
519#define XFS_EOFBLOCKS_VERSION 1
520struct xfs_fs_eofblocks {
521 __u32 eof_version;
522 __u32 eof_flags;
523 uid_t eof_uid;
524 gid_t eof_gid;
525 prid_t eof_prid;
526 __u32 pad32;
527 __u64 eof_min_file_size;
528 __u64 pad64[12];
529};
530
531
532#define XFS_EOF_FLAGS_SYNC (1 << 0)
533#define XFS_EOF_FLAGS_UID (1 << 1)
534#define XFS_EOF_FLAGS_GID (1 << 2)
535#define XFS_EOF_FLAGS_PRID (1 << 3)
536#define XFS_EOF_FLAGS_MINFILESIZE (1 << 4)
537#define XFS_EOF_FLAGS_UNION (1 << 5)
538
539
540#define XFS_EOF_FLAGS_VALID \
541 (XFS_EOF_FLAGS_SYNC | \
542 XFS_EOF_FLAGS_UID | \
543 XFS_EOF_FLAGS_GID | \
544 XFS_EOF_FLAGS_PRID | \
545 XFS_EOF_FLAGS_MINFILESIZE)
546
547
548
549
550
551typedef struct xfs_fsop_handlereq {
552 __u32 fd;
553 void __user *path;
554 __u32 oflags;
555 void __user *ihandle;
556 __u32 ihandlen;
557 void __user *ohandle;
558 __u32 __user *ohandlen;
559} xfs_fsop_handlereq_t;
560
561
562
563
564
565
566
567
568
569
570
571
572#define XFS_IOC_ATTR_ROOT 0x0002
573#define XFS_IOC_ATTR_SECURE 0x0008
574#define XFS_IOC_ATTR_CREATE 0x0010
575#define XFS_IOC_ATTR_REPLACE 0x0020
576
577typedef struct xfs_attrlist_cursor {
578 __u32 opaque[4];
579} xfs_attrlist_cursor_t;
580
581
582
583
584
585
586
587
588
589
590struct xfs_attrlist {
591 __s32 al_count;
592 __s32 al_more;
593 __s32 al_offset[1];
594};
595
596struct xfs_attrlist_ent {
597 __u32 a_valuelen;
598 char a_name[1];
599};
600
601typedef struct xfs_fsop_attrlist_handlereq {
602 struct xfs_fsop_handlereq hreq;
603 struct xfs_attrlist_cursor pos;
604 __u32 flags;
605 __u32 buflen;
606 void __user *buffer;
607} xfs_fsop_attrlist_handlereq_t;
608
609typedef struct xfs_attr_multiop {
610 __u32 am_opcode;
611#define ATTR_OP_GET 1
612#define ATTR_OP_SET 2
613#define ATTR_OP_REMOVE 3
614 __s32 am_error;
615 void __user *am_attrname;
616 void __user *am_attrvalue;
617 __u32 am_length;
618 __u32 am_flags;
619} xfs_attr_multiop_t;
620
621typedef struct xfs_fsop_attrmulti_handlereq {
622 struct xfs_fsop_handlereq hreq;
623 __u32 opcount;
624 struct xfs_attr_multiop __user *ops;
625} xfs_fsop_attrmulti_handlereq_t;
626
627
628
629
630typedef struct { __u32 val[2]; } xfs_fsid_t;
631
632typedef struct xfs_fid {
633 __u16 fid_len;
634 __u16 fid_pad;
635 __u32 fid_gen;
636 __u64 fid_ino;
637} xfs_fid_t;
638
639typedef struct xfs_handle {
640 union {
641 __s64 align;
642 xfs_fsid_t _ha_fsid;
643 } ha_u;
644 xfs_fid_t ha_fid;
645} xfs_handle_t;
646#define ha_fsid ha_u._ha_fsid
647
648
649
650
651typedef struct xfs_swapext
652{
653 int64_t sx_version;
654#define XFS_SX_VERSION 0
655 int64_t sx_fdtarget;
656 int64_t sx_fdtmp;
657 xfs_off_t sx_offset;
658 xfs_off_t sx_length;
659 char sx_pad[16];
660 struct xfs_bstat sx_stat;
661} xfs_swapext_t;
662
663
664
665
666#define XFS_FSOP_GOING_FLAGS_DEFAULT 0x0
667#define XFS_FSOP_GOING_FLAGS_LOGFLUSH 0x1
668#define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2
669
670
671struct xfs_scrub_metadata {
672 __u32 sm_type;
673 __u32 sm_flags;
674 __u64 sm_ino;
675 __u32 sm_gen;
676 __u32 sm_agno;
677 __u64 sm_reserved[5];
678};
679
680
681
682
683
684
685#define XFS_SCRUB_TYPE_PROBE 0
686#define XFS_SCRUB_TYPE_SB 1
687#define XFS_SCRUB_TYPE_AGF 2
688#define XFS_SCRUB_TYPE_AGFL 3
689#define XFS_SCRUB_TYPE_AGI 4
690#define XFS_SCRUB_TYPE_BNOBT 5
691#define XFS_SCRUB_TYPE_CNTBT 6
692#define XFS_SCRUB_TYPE_INOBT 7
693#define XFS_SCRUB_TYPE_FINOBT 8
694#define XFS_SCRUB_TYPE_RMAPBT 9
695#define XFS_SCRUB_TYPE_REFCNTBT 10
696#define XFS_SCRUB_TYPE_INODE 11
697#define XFS_SCRUB_TYPE_BMBTD 12
698#define XFS_SCRUB_TYPE_BMBTA 13
699#define XFS_SCRUB_TYPE_BMBTC 14
700#define XFS_SCRUB_TYPE_DIR 15
701#define XFS_SCRUB_TYPE_XATTR 16
702#define XFS_SCRUB_TYPE_SYMLINK 17
703#define XFS_SCRUB_TYPE_PARENT 18
704#define XFS_SCRUB_TYPE_RTBITMAP 19
705#define XFS_SCRUB_TYPE_RTSUM 20
706#define XFS_SCRUB_TYPE_UQUOTA 21
707#define XFS_SCRUB_TYPE_GQUOTA 22
708#define XFS_SCRUB_TYPE_PQUOTA 23
709#define XFS_SCRUB_TYPE_FSCOUNTERS 24
710
711
712#define XFS_SCRUB_TYPE_NR 25
713
714
715#define XFS_SCRUB_IFLAG_REPAIR (1u << 0)
716
717
718#define XFS_SCRUB_OFLAG_CORRUPT (1u << 1)
719
720
721
722
723
724#define XFS_SCRUB_OFLAG_PREEN (1u << 2)
725
726
727#define XFS_SCRUB_OFLAG_XFAIL (1u << 3)
728
729
730#define XFS_SCRUB_OFLAG_XCORRUPT (1u << 4)
731
732
733#define XFS_SCRUB_OFLAG_INCOMPLETE (1u << 5)
734
735
736#define XFS_SCRUB_OFLAG_WARNING (1u << 6)
737
738
739
740
741
742#define XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED (1u << 7)
743
744#define XFS_SCRUB_FLAGS_IN (XFS_SCRUB_IFLAG_REPAIR)
745#define XFS_SCRUB_FLAGS_OUT (XFS_SCRUB_OFLAG_CORRUPT | \
746 XFS_SCRUB_OFLAG_PREEN | \
747 XFS_SCRUB_OFLAG_XFAIL | \
748 XFS_SCRUB_OFLAG_XCORRUPT | \
749 XFS_SCRUB_OFLAG_INCOMPLETE | \
750 XFS_SCRUB_OFLAG_WARNING | \
751 XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED)
752#define XFS_SCRUB_FLAGS_ALL (XFS_SCRUB_FLAGS_IN | XFS_SCRUB_FLAGS_OUT)
753
754
755
756
757#ifdef XATTR_LIST_MAX
758# define XFS_XATTR_LIST_MAX XATTR_LIST_MAX
759#else
760# define XFS_XATTR_LIST_MAX 65536
761#endif
762
763
764
765
766
767#define XFS_IOC_GETXFLAGS FS_IOC_GETFLAGS
768#define XFS_IOC_SETXFLAGS FS_IOC_SETFLAGS
769#define XFS_IOC_GETVERSION FS_IOC_GETVERSION
770
771
772
773
774
775
776
777
778#define XFS_IOC_DIOINFO _IOR ('X', 30, struct dioattr)
779#define XFS_IOC_FSGETXATTR FS_IOC_FSGETXATTR
780#define XFS_IOC_FSSETXATTR FS_IOC_FSSETXATTR
781
782
783#define XFS_IOC_GETBMAP _IOWR('X', 38, struct getbmap)
784
785#define XFS_IOC_RESVSP _IOW ('X', 40, struct xfs_flock64)
786#define XFS_IOC_UNRESVSP _IOW ('X', 41, struct xfs_flock64)
787#define XFS_IOC_RESVSP64 _IOW ('X', 42, struct xfs_flock64)
788#define XFS_IOC_UNRESVSP64 _IOW ('X', 43, struct xfs_flock64)
789#define XFS_IOC_GETBMAPA _IOWR('X', 44, struct getbmap)
790#define XFS_IOC_FSGETXATTRA _IOR ('X', 45, struct fsxattr)
791
792
793#define XFS_IOC_GETBMAPX _IOWR('X', 56, struct getbmap)
794#define XFS_IOC_ZERO_RANGE _IOW ('X', 57, struct xfs_flock64)
795#define XFS_IOC_FREE_EOFBLOCKS _IOR ('X', 58, struct xfs_fs_eofblocks)
796
797#define XFS_IOC_SCRUB_METADATA _IOWR('X', 60, struct xfs_scrub_metadata)
798#define XFS_IOC_AG_GEOMETRY _IOWR('X', 61, struct xfs_ag_geometry)
799
800
801
802
803#define XFS_IOC_FSGEOMETRY_V1 _IOR ('X', 100, struct xfs_fsop_geom_v1)
804#define XFS_IOC_FSBULKSTAT _IOWR('X', 101, struct xfs_fsop_bulkreq)
805#define XFS_IOC_FSBULKSTAT_SINGLE _IOWR('X', 102, struct xfs_fsop_bulkreq)
806#define XFS_IOC_FSINUMBERS _IOWR('X', 103, struct xfs_fsop_bulkreq)
807#define XFS_IOC_PATH_TO_FSHANDLE _IOWR('X', 104, struct xfs_fsop_handlereq)
808#define XFS_IOC_PATH_TO_HANDLE _IOWR('X', 105, struct xfs_fsop_handlereq)
809#define XFS_IOC_FD_TO_HANDLE _IOWR('X', 106, struct xfs_fsop_handlereq)
810#define XFS_IOC_OPEN_BY_HANDLE _IOWR('X', 107, struct xfs_fsop_handlereq)
811#define XFS_IOC_READLINK_BY_HANDLE _IOWR('X', 108, struct xfs_fsop_handlereq)
812#define XFS_IOC_SWAPEXT _IOWR('X', 109, struct xfs_swapext)
813#define XFS_IOC_FSGROWFSDATA _IOW ('X', 110, struct xfs_growfs_data)
814#define XFS_IOC_FSGROWFSLOG _IOW ('X', 111, struct xfs_growfs_log)
815#define XFS_IOC_FSGROWFSRT _IOW ('X', 112, struct xfs_growfs_rt)
816#define XFS_IOC_FSCOUNTS _IOR ('X', 113, struct xfs_fsop_counts)
817#define XFS_IOC_SET_RESBLKS _IOWR('X', 114, struct xfs_fsop_resblks)
818#define XFS_IOC_GET_RESBLKS _IOR ('X', 115, struct xfs_fsop_resblks)
819#define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection)
820#define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection)
821
822
823#define XFS_IOC_FREEZE _IOWR('X', 119, int)
824#define XFS_IOC_THAW _IOWR('X', 120, int)
825
826
827#define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)
828#define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq)
829#define XFS_IOC_FSGEOMETRY_V4 _IOR ('X', 124, struct xfs_fsop_geom_v4)
830#define XFS_IOC_GOINGDOWN _IOR ('X', 125, uint32_t)
831#define XFS_IOC_FSGEOMETRY _IOR ('X', 126, struct xfs_fsop_geom)
832#define XFS_IOC_BULKSTAT _IOR ('X', 127, struct xfs_bulkstat_req)
833#define XFS_IOC_INUMBERS _IOR ('X', 128, struct xfs_inumbers_req)
834
835
836
837#ifndef HAVE_BBMACROS
838
839
840
841
842
843#define BBSHIFT 9
844#define BBSIZE (1<<BBSHIFT)
845#define BBMASK (BBSIZE-1)
846#define BTOBB(bytes) (((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)
847#define BTOBBT(bytes) ((__u64)(bytes) >> BBSHIFT)
848#define BBTOB(bbs) ((bbs) << BBSHIFT)
849#endif
850
851#endif
852