xref: /titanic_44/usr/src/uts/common/sys/fs/cachefs_ioctl.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 1996-1998,2001-2003 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_SYS_FS_CACHEFS_IOCTL_H
28*7c478bd9Sstevel@tonic-gate #define	_SYS_FS_CACHEFS_IOCTL_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
33*7c478bd9Sstevel@tonic-gate extern "C" {
34*7c478bd9Sstevel@tonic-gate #endif
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate /* set of subcommands to CACHEFSIO_DCMD */
37*7c478bd9Sstevel@tonic-gate enum cfsdcmd_cmds {
38*7c478bd9Sstevel@tonic-gate 	CFSDCMD_DAEMONID, CFSDCMD_STATEGET, CFSDCMD_STATESET,
39*7c478bd9Sstevel@tonic-gate 	CFSDCMD_XWAIT, CFSDCMD_EXISTS, CFSDCMD_LOSTFOUND, CFSDCMD_GETINFO,
40*7c478bd9Sstevel@tonic-gate 	CFSDCMD_CIDTOFID, CFSDCMD_GETATTRFID, CFSDCMD_GETATTRNAME,
41*7c478bd9Sstevel@tonic-gate 	CFSDCMD_GETSTATS, CFSDCMD_ROOTFID,
42*7c478bd9Sstevel@tonic-gate 	CFSDCMD_CREATE, CFSDCMD_REMOVE, CFSDCMD_LINK, CFSDCMD_RENAME,
43*7c478bd9Sstevel@tonic-gate 	CFSDCMD_MKDIR, CFSDCMD_RMDIR, CFSDCMD_SYMLINK, CFSDCMD_SETATTR,
44*7c478bd9Sstevel@tonic-gate 	CFSDCMD_SETSECATTR, CFSDCMD_PUSHBACK
45*7c478bd9Sstevel@tonic-gate };
46*7c478bd9Sstevel@tonic-gate typedef enum cfsdcmd_cmds cfsdcmd_cmds_t;
47*7c478bd9Sstevel@tonic-gate 
48*7c478bd9Sstevel@tonic-gate /* file system states passed to stateset, returned from stateget */
49*7c478bd9Sstevel@tonic-gate #define	CFS_FS_CONNECTED	0x00	/* fscache connected to backfs */
50*7c478bd9Sstevel@tonic-gate #define	CFS_FS_DISCONNECTED	0x01	/* fscache disconnected from backfs */
51*7c478bd9Sstevel@tonic-gate #define	CFS_FS_RECONNECTING	0x02	/* fscache is reconnecting to backfs */
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /* bits returned by packinfo */
54*7c478bd9Sstevel@tonic-gate #define	CACHEFS_PACKED_FILE	1	/* file is marked as packed */
55*7c478bd9Sstevel@tonic-gate #define	CACHEFS_PACKED_DATA	2	/* file data is in the cache */
56*7c478bd9Sstevel@tonic-gate #define	CACHEFS_PACKED_NOCACHE	4	/* file marked as not for caching */
57*7c478bd9Sstevel@tonic-gate 
58*7c478bd9Sstevel@tonic-gate struct cachefsio_pack {
59*7c478bd9Sstevel@tonic-gate 	char		p_name[MAXNAMELEN];	/* name of file */
60*7c478bd9Sstevel@tonic-gate 	int		p_status;		/* status of operation */
61*7c478bd9Sstevel@tonic-gate };
62*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_pack cachefsio_pack_t;
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate struct cachefsio_dcmd {
65*7c478bd9Sstevel@tonic-gate 	cfsdcmd_cmds_t	 d_cmd;			/* cmd to execute */
66*7c478bd9Sstevel@tonic-gate 	void		*d_sdata;		/* data for command */
67*7c478bd9Sstevel@tonic-gate 	int		 d_slen;		/* len of data */
68*7c478bd9Sstevel@tonic-gate 	void		*d_rdata;		/* data to return */
69*7c478bd9Sstevel@tonic-gate 	int		 d_rlen;		/* len of data */
70*7c478bd9Sstevel@tonic-gate };
71*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_dcmd cachefsio_dcmd_t;
72*7c478bd9Sstevel@tonic-gate 
73*7c478bd9Sstevel@tonic-gate struct cachefsio_getinfo {
74*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	gi_cid;			/* entry to lookup */
75*7c478bd9Sstevel@tonic-gate 	int		gi_modified;		/* returns if modified data */
76*7c478bd9Sstevel@tonic-gate 	cfs_vattr_t	gi_attr;		/* return file attributes */
77*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	gi_pcid;		/* returns the parent dir */
78*7c478bd9Sstevel@tonic-gate 	uint_t		gi_seq;			/* sequence number */
79*7c478bd9Sstevel@tonic-gate 	char		gi_name[MAXNAMELEN];	/* returns name of file */
80*7c478bd9Sstevel@tonic-gate };
81*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_getinfo cachefsio_getinfo_t;
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate struct cachefsio_lostfound_arg {
84*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	lf_cid;			/* file to move */
85*7c478bd9Sstevel@tonic-gate 	char		lf_name[MAXNAMELEN];	/* suggested name */
86*7c478bd9Sstevel@tonic-gate };
87*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_lostfound_arg cachefsio_lostfound_arg_t;
88*7c478bd9Sstevel@tonic-gate 
89*7c478bd9Sstevel@tonic-gate struct cachefsio_lostfound_return {
90*7c478bd9Sstevel@tonic-gate 	char		lf_name[MAXNAMELEN];	/* returns actual name */
91*7c478bd9Sstevel@tonic-gate };
92*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_lostfound_return cachefsio_lostfound_return_t;
93*7c478bd9Sstevel@tonic-gate 
94*7c478bd9Sstevel@tonic-gate struct cachefsio_getattrfid {
95*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	cg_backfid;	/* backfs fid of file */
96*7c478bd9Sstevel@tonic-gate 	dl_cred_t	cg_cred;	/* creds */
97*7c478bd9Sstevel@tonic-gate 	gid_t	cg_groups[NGROUPS_MAX_DEFAULT-1];
98*7c478bd9Sstevel@tonic-gate };
99*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_getattrfid cachefsio_getattrfid_t;
100*7c478bd9Sstevel@tonic-gate 
101*7c478bd9Sstevel@tonic-gate struct cachefsio_getattrname_arg {
102*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	cg_dir;			/* backfs fid of directory */
103*7c478bd9Sstevel@tonic-gate 	char	cg_name[MAXNAMELEN];	/* name of file in directory cg_dir */
104*7c478bd9Sstevel@tonic-gate 	dl_cred_t	cg_cred;	/* creds */
105*7c478bd9Sstevel@tonic-gate 	gid_t	cg_groups[NGROUPS_MAX_DEFAULT-1];
106*7c478bd9Sstevel@tonic-gate };
107*7c478bd9Sstevel@tonic-gate typedef	struct cachefsio_getattrname_arg cachefsio_getattrname_arg_t;
108*7c478bd9Sstevel@tonic-gate 
109*7c478bd9Sstevel@tonic-gate struct cachefsio_getattrname_return {
110*7c478bd9Sstevel@tonic-gate 	cfs_vattr_t	cg_attr;		/* returns attributes of file */
111*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	cg_fid;			/* returns fid of file */
112*7c478bd9Sstevel@tonic-gate };
113*7c478bd9Sstevel@tonic-gate typedef	struct cachefsio_getattrname_return cachefsio_getattrname_return_t;
114*7c478bd9Sstevel@tonic-gate 
115*7c478bd9Sstevel@tonic-gate struct cachefsio_getstats {
116*7c478bd9Sstevel@tonic-gate 	int		gs_total;		/* total blocks */
117*7c478bd9Sstevel@tonic-gate 	int		gs_gc;			/* number of gc blocks */
118*7c478bd9Sstevel@tonic-gate 	int		gs_active;		/* number of active blocks */
119*7c478bd9Sstevel@tonic-gate 	int		gs_packed;		/* number of packed blocks */
120*7c478bd9Sstevel@tonic-gate 	int		gs_free;		/* number of free blocks */
121*7c478bd9Sstevel@tonic-gate 	cfs_time_t	gs_gctime;		/* atime of front of gc list */
122*7c478bd9Sstevel@tonic-gate };
123*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_getstats cachefsio_getstats_t;
124*7c478bd9Sstevel@tonic-gate 
125*7c478bd9Sstevel@tonic-gate struct cachefsio_create_arg {
126*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	cr_backfid;		/* backfs fid of directory */
127*7c478bd9Sstevel@tonic-gate 	char		cr_name[MAXNAMELEN];	/* name of file to create */
128*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	cr_cid;			/* cid of file being created */
129*7c478bd9Sstevel@tonic-gate 	cfs_vattr_t	cr_va;			/* attributes for create */
130*7c478bd9Sstevel@tonic-gate 	int		cr_exclusive;		/* exclusive create or not */
131*7c478bd9Sstevel@tonic-gate 	int		cr_mode;		/* mode */
132*7c478bd9Sstevel@tonic-gate 	dl_cred_t	cr_cred;		/* creds */
133*7c478bd9Sstevel@tonic-gate 	gid_t		cr_groups[NGROUPS_MAX_DEFAULT-1];
134*7c478bd9Sstevel@tonic-gate };
135*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_create_arg cachefsio_create_arg_t;
136*7c478bd9Sstevel@tonic-gate 
137*7c478bd9Sstevel@tonic-gate struct cachefsio_create_return {
138*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	cr_newfid;		/* returns fid of new file */
139*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	cr_ctime;		/* returns new ctime */
140*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	cr_mtime;		/* returns new mtime */
141*7c478bd9Sstevel@tonic-gate };
142*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_create_return cachefsio_create_return_t;
143*7c478bd9Sstevel@tonic-gate 
144*7c478bd9Sstevel@tonic-gate struct cachefsio_pushback_arg {
145*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	pb_cid;			/* file to push back */
146*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	pb_fid;			/* back fs fid to push to */
147*7c478bd9Sstevel@tonic-gate 	dl_cred_t	pb_cred;		/* creds */
148*7c478bd9Sstevel@tonic-gate 	gid_t		pb_groups[NGROUPS_MAX_DEFAULT-1];
149*7c478bd9Sstevel@tonic-gate };
150*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_pushback_arg cachefsio_pushback_arg_t;
151*7c478bd9Sstevel@tonic-gate 
152*7c478bd9Sstevel@tonic-gate struct cachefsio_pushback_return {
153*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	pb_ctime;		/* returns new ctime */
154*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	pb_mtime;		/* returns new mtime */
155*7c478bd9Sstevel@tonic-gate };
156*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_pushback_return cachefsio_pushback_return_t;
157*7c478bd9Sstevel@tonic-gate 
158*7c478bd9Sstevel@tonic-gate struct cachefsio_remove {
159*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	rm_cid;			/* cid of deleted file */
160*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	rm_fid;			/* fid of parent directory */
161*7c478bd9Sstevel@tonic-gate 	char		rm_name[MAXNAMELEN];	/* name of file to remove */
162*7c478bd9Sstevel@tonic-gate 	int		rm_getctime;		/* 1 means return new ctime */
163*7c478bd9Sstevel@tonic-gate 	dl_cred_t	rm_cred;		/* creds */
164*7c478bd9Sstevel@tonic-gate 	gid_t		rm_groups[NGROUPS_MAX_DEFAULT-1];
165*7c478bd9Sstevel@tonic-gate };
166*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_remove cachefsio_remove_t;
167*7c478bd9Sstevel@tonic-gate 
168*7c478bd9Sstevel@tonic-gate struct cachefsio_link {
169*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	ln_dirfid;		/* backfid of parent dir */
170*7c478bd9Sstevel@tonic-gate 	char		ln_name[MAXNAMELEN];	/* name of new link */
171*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	ln_filefid;		/* backfid of file to link to */
172*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	ln_cid;			/* cid of link */
173*7c478bd9Sstevel@tonic-gate 	dl_cred_t	ln_cred;		/* creds */
174*7c478bd9Sstevel@tonic-gate 	gid_t		ln_groups[NGROUPS_MAX_DEFAULT-1];
175*7c478bd9Sstevel@tonic-gate };
176*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_link cachefsio_link_t;
177*7c478bd9Sstevel@tonic-gate 
178*7c478bd9Sstevel@tonic-gate struct cachefsio_rename_arg {
179*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	rn_olddir;		/* backfs fid of old dir */
180*7c478bd9Sstevel@tonic-gate 	char		rn_oldname[MAXNAMELEN];	/* old name of file */
181*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	rn_newdir;		/* backfs fid of new dir */
182*7c478bd9Sstevel@tonic-gate 	char		rn_newname[MAXNAMELEN];	/* new name of file */
183*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	rn_cid;			/* cid of renamed file */
184*7c478bd9Sstevel@tonic-gate 	int		rn_del_getctime;	/* 1 means fill in del_ctime */
185*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	rn_del_cid;		/* cid of deleted file */
186*7c478bd9Sstevel@tonic-gate 	dl_cred_t	rn_cred;		/* creds */
187*7c478bd9Sstevel@tonic-gate 	gid_t		rn_groups[NGROUPS_MAX_DEFAULT-1];
188*7c478bd9Sstevel@tonic-gate };
189*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_rename_arg cachefsio_rename_arg_t;
190*7c478bd9Sstevel@tonic-gate 
191*7c478bd9Sstevel@tonic-gate struct cachefsio_rename_return {
192*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	rn_ctime;		/* returns new file ctime */
193*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	rn_del_ctime;		/* returns new del file ctime */
194*7c478bd9Sstevel@tonic-gate };
195*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_rename_return cachefsio_rename_return_t;
196*7c478bd9Sstevel@tonic-gate 
197*7c478bd9Sstevel@tonic-gate struct cachefsio_mkdir {
198*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	md_dirfid;		/* backfs fid of dir */
199*7c478bd9Sstevel@tonic-gate 	char		md_name[MAXNAMELEN];	/* name of the new dir */
200*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	md_cid;			/* cid of dir being created */
201*7c478bd9Sstevel@tonic-gate 	cfs_vattr_t	md_vattr;		/* attributes */
202*7c478bd9Sstevel@tonic-gate 	dl_cred_t	md_cred;		/* creds */
203*7c478bd9Sstevel@tonic-gate 	gid_t		md_groups[NGROUPS_MAX_DEFAULT-1];
204*7c478bd9Sstevel@tonic-gate };
205*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_mkdir cachefsio_mkdir_t;
206*7c478bd9Sstevel@tonic-gate 
207*7c478bd9Sstevel@tonic-gate struct cachefsio_rmdir {
208*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	rd_dirfid;		/* backfs fid of dir */
209*7c478bd9Sstevel@tonic-gate 	char		rd_name[MAXNAMELEN];	/* name of the dir to delete */
210*7c478bd9Sstevel@tonic-gate 	dl_cred_t	rd_cred;		/* creds */
211*7c478bd9Sstevel@tonic-gate 	gid_t		rd_groups[NGROUPS_MAX_DEFAULT-1];
212*7c478bd9Sstevel@tonic-gate };
213*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_rmdir cachefsio_rmdir_t;
214*7c478bd9Sstevel@tonic-gate 
215*7c478bd9Sstevel@tonic-gate struct cachefsio_symlink_arg {
216*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	sy_dirfid;		/* backfs fid of dir */
217*7c478bd9Sstevel@tonic-gate 	char		sy_name[MAXNAMELEN];	/* name of symlink to create */
218*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	sy_cid;			/* cid of symlink */
219*7c478bd9Sstevel@tonic-gate 	char		sy_link[MAXPATHLEN];	/* contents of the symlink */
220*7c478bd9Sstevel@tonic-gate 	cfs_vattr_t	sy_vattr;		/* attributes */
221*7c478bd9Sstevel@tonic-gate 	dl_cred_t	sy_cred;		/* creds */
222*7c478bd9Sstevel@tonic-gate 	gid_t		sy_groups[NGROUPS_MAX_DEFAULT-1];
223*7c478bd9Sstevel@tonic-gate };
224*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_symlink_arg cachefsio_symlink_arg_t;
225*7c478bd9Sstevel@tonic-gate 
226*7c478bd9Sstevel@tonic-gate struct cachefsio_symlink_return {
227*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	sy_newfid;		/* returns fid of symlink */
228*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	sy_ctime;		/* returns new ctime */
229*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	sy_mtime;		/* returns new mtime */
230*7c478bd9Sstevel@tonic-gate };
231*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_symlink_return cachefsio_symlink_return_t;
232*7c478bd9Sstevel@tonic-gate 
233*7c478bd9Sstevel@tonic-gate struct cachefsio_setattr_arg {
234*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	sa_backfid;		/* backfs fid of file */
235*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	sa_cid;			/* cid of file */
236*7c478bd9Sstevel@tonic-gate 	cfs_vattr_t	sa_vattr;		/* attributes */
237*7c478bd9Sstevel@tonic-gate 	int		sa_flags;		/* flags */
238*7c478bd9Sstevel@tonic-gate 	dl_cred_t	sa_cred;		/* creds */
239*7c478bd9Sstevel@tonic-gate 	gid_t		sa_groups[NGROUPS_MAX_DEFAULT-1];
240*7c478bd9Sstevel@tonic-gate };
241*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_setattr_arg cachefsio_setattr_arg_t;
242*7c478bd9Sstevel@tonic-gate 
243*7c478bd9Sstevel@tonic-gate struct cachefsio_setattr_return {
244*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	sa_ctime;		/* returns new ctime */
245*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	sa_mtime;		/* returns new mtime */
246*7c478bd9Sstevel@tonic-gate };
247*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_setattr_return cachefsio_setattr_return_t;
248*7c478bd9Sstevel@tonic-gate 
249*7c478bd9Sstevel@tonic-gate struct cachefsio_setsecattr_arg {
250*7c478bd9Sstevel@tonic-gate 	cfs_fid_t	sc_backfid;		/* backfs fid of file */
251*7c478bd9Sstevel@tonic-gate 	cfs_cid_t	sc_cid;			/* cid of file */
252*7c478bd9Sstevel@tonic-gate 	uint_t		sc_mask;		/* mask for setsec */
253*7c478bd9Sstevel@tonic-gate 	int		sc_aclcnt;		/* count of ACLs */
254*7c478bd9Sstevel@tonic-gate 	int		sc_dfaclcnt;		/* count of default ACLs */
255*7c478bd9Sstevel@tonic-gate 	aclent_t	sc_acl[MAX_ACL_ENTRIES]; /* ACLs */
256*7c478bd9Sstevel@tonic-gate 	dl_cred_t	sc_cred;		/* creds */
257*7c478bd9Sstevel@tonic-gate 	gid_t		sc_groups[NGROUPS_MAX_DEFAULT-1];
258*7c478bd9Sstevel@tonic-gate };
259*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_setsecattr_arg cachefsio_setsecattr_arg_t;
260*7c478bd9Sstevel@tonic-gate 
261*7c478bd9Sstevel@tonic-gate struct cachefsio_setsecattr_return {
262*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	sc_ctime;		/* returns new ctime */
263*7c478bd9Sstevel@tonic-gate 	cfs_timestruc_t	sc_mtime;		/* returns new mtime */
264*7c478bd9Sstevel@tonic-gate };
265*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_setsecattr_return cachefsio_setsecattr_return_t;
266*7c478bd9Sstevel@tonic-gate 
267*7c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32
268*7c478bd9Sstevel@tonic-gate 
269*7c478bd9Sstevel@tonic-gate /*
270*7c478bd9Sstevel@tonic-gate  * Solaris 64 - the following structs are used for user/kernel communication.
271*7c478bd9Sstevel@tonic-gate  */
272*7c478bd9Sstevel@tonic-gate 
273*7c478bd9Sstevel@tonic-gate struct cachefsio_dcmd32 {
274*7c478bd9Sstevel@tonic-gate 	cfsdcmd_cmds_t	 d_cmd;			/* cmd to execute */
275*7c478bd9Sstevel@tonic-gate 	caddr32_t	 d_sdata;		/* data for command */
276*7c478bd9Sstevel@tonic-gate 	int32_t		 d_slen;		/* len of data */
277*7c478bd9Sstevel@tonic-gate 	caddr32_t	 d_rdata;		/* data to return */
278*7c478bd9Sstevel@tonic-gate 	int32_t		 d_rlen;		/* len of data */
279*7c478bd9Sstevel@tonic-gate };
280*7c478bd9Sstevel@tonic-gate typedef struct cachefsio_dcmd32 cachefsio_dcmd32_t;
281*7c478bd9Sstevel@tonic-gate 
282*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */
283*7c478bd9Sstevel@tonic-gate 
284*7c478bd9Sstevel@tonic-gate int cachefs_pack(vnode_t *, char *, cred_t *);
285*7c478bd9Sstevel@tonic-gate int cachefs_unpack(vnode_t *, char *, cred_t *);
286*7c478bd9Sstevel@tonic-gate int cachefs_packinfo(vnode_t *dvp, char *name, int *statusp, cred_t *cr);
287*7c478bd9Sstevel@tonic-gate int cachefs_unpackall(vnode_t *);
288*7c478bd9Sstevel@tonic-gate 
289*7c478bd9Sstevel@tonic-gate int cachefs_io_daemonid(vnode_t *vp, void *dinp, void *doutp);
290*7c478bd9Sstevel@tonic-gate int cachefs_io_stateget(vnode_t *vp, void *dinp, void *doutp);
291*7c478bd9Sstevel@tonic-gate int cachefs_io_stateset(vnode_t *vp, void *dinp, void *doutp);
292*7c478bd9Sstevel@tonic-gate int cachefs_io_xwait(vnode_t *vp, void *dinp, void *doutp);
293*7c478bd9Sstevel@tonic-gate int cachefs_io_exists(vnode_t *vp, void *dinp, void *doutp);
294*7c478bd9Sstevel@tonic-gate int cachefs_io_lostfound(vnode_t *vp, void *dinp, void *doutp);
295*7c478bd9Sstevel@tonic-gate int cachefs_io_getinfo(vnode_t *vp, void *dinp, void *doutp);
296*7c478bd9Sstevel@tonic-gate int cachefs_io_cidtofid(vnode_t *vp, void *dinp, void *doutp);
297*7c478bd9Sstevel@tonic-gate int cachefs_io_getattrfid(vnode_t *vp, void *dinp, void *doutp);
298*7c478bd9Sstevel@tonic-gate int cachefs_io_getattrname(vnode_t *vp, void *dinp, void *doutp);
299*7c478bd9Sstevel@tonic-gate int cachefs_io_getstats(vnode_t *vp, void *dinp, void *doutp);
300*7c478bd9Sstevel@tonic-gate int cachefs_io_rootfid(vnode_t *vp, void *dinp, void *doutp);
301*7c478bd9Sstevel@tonic-gate int cachefs_io_create(vnode_t *vp, void *dinp, void *doutp);
302*7c478bd9Sstevel@tonic-gate int cachefs_io_remove(vnode_t *vp, void *dinp, void *doutp);
303*7c478bd9Sstevel@tonic-gate int cachefs_io_link(vnode_t *vp, void *dinp, void *doutp);
304*7c478bd9Sstevel@tonic-gate int cachefs_io_rename(vnode_t *vp, void *dinp, void *doutp);
305*7c478bd9Sstevel@tonic-gate int cachefs_io_mkdir(vnode_t *vp, void *dinp, void *doutp);
306*7c478bd9Sstevel@tonic-gate int cachefs_io_rmdir(vnode_t *vp, void *dinp, void *doutp);
307*7c478bd9Sstevel@tonic-gate int cachefs_io_symlink(vnode_t *vp, void *dinp, void *doutp);
308*7c478bd9Sstevel@tonic-gate int cachefs_io_setattr(vnode_t *vp, void *dinp, void *doutp);
309*7c478bd9Sstevel@tonic-gate int cachefs_io_setsecattr(vnode_t *vp, void *dinp, void *doutp);
310*7c478bd9Sstevel@tonic-gate int cachefs_io_pushback(vnode_t *vp, void *dinp, void *doutp);
311*7c478bd9Sstevel@tonic-gate 
312*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
313*7c478bd9Sstevel@tonic-gate }
314*7c478bd9Sstevel@tonic-gate #endif
315*7c478bd9Sstevel@tonic-gate 
316*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_FS_CACHEFS_IOCTL_H */
317