blob: 9a745cc6bd00f39ebaac9fc7b8bb3e8e12c1c1ae [file] [log] [blame]
Christopher Ferris49f525c2016-12-12 14:55:36 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_NILFS2_API_H
20#define _LINUX_NILFS2_API_H
21#include <linux/types.h>
22#include <linux/ioctl.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct nilfs_cpinfo {
25 __u32 ci_flags;
26 __u32 ci_pad;
27 __u64 ci_cno;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 __u64 ci_create;
30 __u64 ci_nblk_inc;
31 __u64 ci_inodes_count;
32 __u64 ci_blocks_count;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 __u64 ci_next;
35};
36enum {
37 NILFS_CPINFO_SNAPSHOT,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 NILFS_CPINFO_INVALID,
40 NILFS_CPINFO_SKETCH,
41 NILFS_CPINFO_MINOR,
42};
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define NILFS_CPINFO_FNS(flag,name) static inline int nilfs_cpinfo_ ##name(const struct nilfs_cpinfo * cpinfo) \
45{ return ! ! (cpinfo->ci_flags & (1UL << NILFS_CPINFO_ ##flag)); \
46}
47#define NILFS_SUINFO_FNS(flag,name) static inline int nilfs_suinfo_ ##name(const struct nilfs_suinfo * si) \
48{ return si->sui_flags & (1UL << NILFS_SUINFO_ ##flag); \
49}
50struct nilfs_suinfo_update {
51 __u64 sup_segnum;
52/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
53 __u32 sup_flags;
54 __u32 sup_reserved;
55 struct nilfs_suinfo sup_sui;
56};
57/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
58enum {
59 NILFS_SUINFO_UPDATE_LASTMOD,
60 NILFS_SUINFO_UPDATE_NBLOCKS,
61 NILFS_SUINFO_UPDATE_FLAGS,
62/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
63 __NR_NILFS_SUINFO_UPDATE_FIELDS,
64};
65#define NILFS_SUINFO_UPDATE_FNS(flag,name) static inline void nilfs_suinfo_update_set_ ##name(struct nilfs_suinfo_update * sup) \
66{ sup->sup_flags |= 1UL << NILFS_SUINFO_UPDATE_ ##flag; \
67} static inline void nilfs_suinfo_update_clear_ ##name(struct nilfs_suinfo_update * sup) \
68{ sup->sup_flags &= ~(1UL << NILFS_SUINFO_UPDATE_ ##flag); \
69} static inline int nilfs_suinfo_update_ ##name(const struct nilfs_suinfo_update * sup) \
70{ return ! ! (sup->sup_flags & (1UL << NILFS_SUINFO_UPDATE_ ##flag)); \
71}
72struct nilfs_argv {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 __u64 v_base;
75 __u32 v_nmembs;
76 __u16 v_size;
77 __u16 v_flags;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 __u64 v_index;
80};
81struct nilfs_period {
82 __u64 p_start;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 __u64 p_end;
85};
86struct nilfs_cpstat {
87 __u64 cs_cno;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 __u64 cs_ncps;
90 __u64 cs_nsss;
91};
92struct nilfs_sustat {
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 __u64 ss_nsegs;
95 __u64 ss_ncleansegs;
96 __u64 ss_ndirtysegs;
97 __u64 ss_ctime;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 __u64 ss_nongc_ctime;
100 __u64 ss_prot_seq;
101};
102struct nilfs_vinfo {
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 __u64 vi_vblocknr;
105 __u64 vi_start;
106 __u64 vi_end;
107 __u64 vi_blocknr;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109};
110struct nilfs_vdesc {
111 __u64 vd_ino;
112 __u64 vd_cno;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 __u64 vd_vblocknr;
115 struct nilfs_period vd_period;
116 __u64 vd_blocknr;
117 __u64 vd_offset;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 __u32 vd_flags;
120 __u32 vd_pad;
121};
122struct nilfs_bdesc {
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 __u64 bd_ino;
125 __u64 bd_oblocknr;
126 __u64 bd_blocknr;
127 __u64 bd_offset;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 __u32 bd_level;
130 __u32 bd_pad;
131};
132#define NILFS_IOCTL_IDENT 'n'
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define NILFS_IOCTL_CHANGE_CPMODE _IOW(NILFS_IOCTL_IDENT, 0x80, struct nilfs_cpmode)
135#define NILFS_IOCTL_DELETE_CHECKPOINT _IOW(NILFS_IOCTL_IDENT, 0x81, __u64)
136#define NILFS_IOCTL_GET_CPINFO _IOR(NILFS_IOCTL_IDENT, 0x82, struct nilfs_argv)
137#define NILFS_IOCTL_GET_CPSTAT _IOR(NILFS_IOCTL_IDENT, 0x83, struct nilfs_cpstat)
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define NILFS_IOCTL_GET_SUINFO _IOR(NILFS_IOCTL_IDENT, 0x84, struct nilfs_argv)
140#define NILFS_IOCTL_GET_SUSTAT _IOR(NILFS_IOCTL_IDENT, 0x85, struct nilfs_sustat)
141#define NILFS_IOCTL_GET_VINFO _IOWR(NILFS_IOCTL_IDENT, 0x86, struct nilfs_argv)
142#define NILFS_IOCTL_GET_BDESCS _IOWR(NILFS_IOCTL_IDENT, 0x87, struct nilfs_argv)
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144#define NILFS_IOCTL_CLEAN_SEGMENTS _IOW(NILFS_IOCTL_IDENT, 0x88, struct nilfs_argv[5])
145#define NILFS_IOCTL_SYNC _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64)
146#define NILFS_IOCTL_RESIZE _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64)
147#define NILFS_IOCTL_SET_ALLOC_RANGE _IOW(NILFS_IOCTL_IDENT, 0x8C, __u64[2])
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149#define NILFS_IOCTL_SET_SUINFO _IOW(NILFS_IOCTL_IDENT, 0x8D, struct nilfs_argv)
150#endif