coda.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. /*
  2. You may distribute this file under either of the two licenses that
  3. follow at your discretion.
  4. */
  5. /* BLURB lgpl
  6. Coda File System
  7. Release 5
  8. Copyright (c) 1987-1999 Carnegie Mellon University
  9. Additional copyrights listed below
  10. This code is distributed "AS IS" without warranty of any kind under
  11. the terms of the GNU Library General Public Licence Version 2, as
  12. shown in the file LICENSE, or under the license shown below. The
  13. technical and financial contributors to Coda are listed in the file
  14. CREDITS.
  15. Additional copyrights
  16. */
  17. /*
  18. Coda: an Experimental Distributed File System
  19. Release 4.0
  20. Copyright (c) 1987-1999 Carnegie Mellon University
  21. All Rights Reserved
  22. Permission to use, copy, modify and distribute this software and its
  23. documentation is hereby granted, provided that both the copyright
  24. notice and this permission notice appear in all copies of the
  25. software, derivative works or modified versions, and any portions
  26. thereof, and that both notices appear in supporting documentation, and
  27. that credit is given to Carnegie Mellon University in all documents
  28. and publicity pertaining to direct or indirect use of this code or its
  29. derivatives.
  30. CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS KNOWN TO HAVE BUGS,
  31. SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON ALLOWS
  32. FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON
  33. DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
  34. RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF
  35. ANY DERIVATIVE WORK.
  36. Carnegie Mellon encourages users of this software to return any
  37. improvements or extensions that they make, and to grant Carnegie
  38. Mellon the rights to redistribute these changes without encumbrance.
  39. */
  40. /*
  41. *
  42. * Based on cfs.h from Mach, but revamped for increased simplicity.
  43. * Linux modifications by
  44. * Peter Braam, Aug 1996
  45. */
  46. #ifndef _UAPI_CODA_HEADER_
  47. #define _UAPI_CODA_HEADER_
  48. /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */
  49. #if defined(__NetBSD__) || \
  50. ((defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL))
  51. #include <sys/types.h>
  52. #endif
  53. #ifndef CODA_MAXSYMLINKS
  54. #define CODA_MAXSYMLINKS 10
  55. #endif
  56. #if defined(DJGPP) || defined(__CYGWIN32__)
  57. #ifdef KERNEL
  58. typedef unsigned long u_long;
  59. typedef unsigned int u_int;
  60. typedef unsigned short u_short;
  61. typedef u_long ino_t;
  62. typedef u_long dev_t;
  63. typedef void * caddr_t;
  64. #ifdef DOS
  65. typedef unsigned __int64 u_quad_t;
  66. #else
  67. typedef unsigned long long u_quad_t;
  68. #endif
  69. #define inline
  70. struct timespec {
  71. long ts_sec;
  72. long ts_nsec;
  73. };
  74. #else /* DJGPP but not KERNEL */
  75. #include <sys/time.h>
  76. typedef unsigned long long u_quad_t;
  77. #endif /* !KERNEL */
  78. #endif /* !DJGPP */
  79. #if defined(__linux__)
  80. #include <linux/time.h>
  81. #define cdev_t u_quad_t
  82. #ifndef __KERNEL__
  83. #if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
  84. #define _UQUAD_T_ 1
  85. typedef unsigned long long u_quad_t;
  86. #endif
  87. #endif /* __KERNEL__ */
  88. #else
  89. #define cdev_t dev_t
  90. #endif
  91. #ifdef __CYGWIN32__
  92. struct timespec {
  93. time_t tv_sec; /* seconds */
  94. long tv_nsec; /* nanoseconds */
  95. };
  96. #endif
  97. #ifndef __BIT_TYPES_DEFINED__
  98. #define __BIT_TYPES_DEFINED__
  99. typedef signed char int8_t;
  100. typedef unsigned char u_int8_t;
  101. typedef short int16_t;
  102. typedef unsigned short u_int16_t;
  103. typedef int int32_t;
  104. typedef unsigned int u_int32_t;
  105. #endif
  106. /*
  107. * Cfs constants
  108. */
  109. #define CODA_MAXNAMLEN 255
  110. #define CODA_MAXPATHLEN 1024
  111. #define CODA_MAXSYMLINK 10
  112. /* these are Coda's version of O_RDONLY etc combinations
  113. * to deal with VFS open modes
  114. */
  115. #define C_O_READ 0x001
  116. #define C_O_WRITE 0x002
  117. #define C_O_TRUNC 0x010
  118. #define C_O_EXCL 0x100
  119. #define C_O_CREAT 0x200
  120. /* these are to find mode bits in Venus */
  121. #define C_M_READ 00400
  122. #define C_M_WRITE 00200
  123. /* for access Venus will use */
  124. #define C_A_C_OK 8 /* Test for writing upon create. */
  125. #define C_A_R_OK 4 /* Test for read permission. */
  126. #define C_A_W_OK 2 /* Test for write permission. */
  127. #define C_A_X_OK 1 /* Test for execute permission. */
  128. #define C_A_F_OK 0 /* Test for existence. */
  129. #ifndef _VENUS_DIRENT_T_
  130. #define _VENUS_DIRENT_T_ 1
  131. struct venus_dirent {
  132. u_int32_t d_fileno; /* file number of entry */
  133. u_int16_t d_reclen; /* length of this record */
  134. u_int8_t d_type; /* file type, see below */
  135. u_int8_t d_namlen; /* length of string in d_name */
  136. char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */
  137. };
  138. #undef DIRSIZ
  139. #define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + \
  140. (((dp)->d_namlen+1 + 3) &~ 3))
  141. /*
  142. * File types
  143. */
  144. #define CDT_UNKNOWN 0
  145. #define CDT_FIFO 1
  146. #define CDT_CHR 2
  147. #define CDT_DIR 4
  148. #define CDT_BLK 6
  149. #define CDT_REG 8
  150. #define CDT_LNK 10
  151. #define CDT_SOCK 12
  152. #define CDT_WHT 14
  153. /*
  154. * Convert between stat structure types and directory types.
  155. */
  156. #define IFTOCDT(mode) (((mode) & 0170000) >> 12)
  157. #define CDTTOIF(dirtype) ((dirtype) << 12)
  158. #endif
  159. #ifndef _VUID_T_
  160. #define _VUID_T_
  161. typedef u_int32_t vuid_t;
  162. typedef u_int32_t vgid_t;
  163. #endif /*_VUID_T_ */
  164. struct CodaFid {
  165. u_int32_t opaque[4];
  166. };
  167. #define coda_f2i(fid)\
  168. (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
  169. #ifndef _VENUS_VATTR_T_
  170. #define _VENUS_VATTR_T_
  171. /*
  172. * Vnode types. VNON means no type.
  173. */
  174. enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
  175. struct coda_vattr {
  176. long va_type; /* vnode type (for create) */
  177. u_short va_mode; /* files access mode and type */
  178. short va_nlink; /* number of references to file */
  179. vuid_t va_uid; /* owner user id */
  180. vgid_t va_gid; /* owner group id */
  181. long va_fileid; /* file id */
  182. u_quad_t va_size; /* file size in bytes */
  183. long va_blocksize; /* blocksize preferred for i/o */
  184. struct timespec va_atime; /* time of last access */
  185. struct timespec va_mtime; /* time of last modification */
  186. struct timespec va_ctime; /* time file changed */
  187. u_long va_gen; /* generation number of file */
  188. u_long va_flags; /* flags defined for file */
  189. cdev_t va_rdev; /* device special file represents */
  190. u_quad_t va_bytes; /* bytes of disk space held by file */
  191. u_quad_t va_filerev; /* file modification number */
  192. };
  193. #endif
  194. /* structure used by CODA_STATFS for getting cache information from venus */
  195. struct coda_statfs {
  196. int32_t f_blocks;
  197. int32_t f_bfree;
  198. int32_t f_bavail;
  199. int32_t f_files;
  200. int32_t f_ffree;
  201. };
  202. /*
  203. * Kernel <--> Venus communications.
  204. */
  205. #define CODA_ROOT 2
  206. #define CODA_OPEN_BY_FD 3
  207. #define CODA_OPEN 4
  208. #define CODA_CLOSE 5
  209. #define CODA_IOCTL 6
  210. #define CODA_GETATTR 7
  211. #define CODA_SETATTR 8
  212. #define CODA_ACCESS 9
  213. #define CODA_LOOKUP 10
  214. #define CODA_CREATE 11
  215. #define CODA_REMOVE 12
  216. #define CODA_LINK 13
  217. #define CODA_RENAME 14
  218. #define CODA_MKDIR 15
  219. #define CODA_RMDIR 16
  220. #define CODA_SYMLINK 18
  221. #define CODA_READLINK 19
  222. #define CODA_FSYNC 20
  223. #define CODA_VGET 22
  224. #define CODA_SIGNAL 23
  225. #define CODA_REPLACE 24 /* DOWNCALL */
  226. #define CODA_FLUSH 25 /* DOWNCALL */
  227. #define CODA_PURGEUSER 26 /* DOWNCALL */
  228. #define CODA_ZAPFILE 27 /* DOWNCALL */
  229. #define CODA_ZAPDIR 28 /* DOWNCALL */
  230. #define CODA_PURGEFID 30 /* DOWNCALL */
  231. #define CODA_OPEN_BY_PATH 31
  232. #define CODA_RESOLVE 32
  233. #define CODA_REINTEGRATE 33
  234. #define CODA_STATFS 34
  235. #define CODA_STORE 35
  236. #define CODA_RELEASE 36
  237. #define CODA_NCALLS 37
  238. #define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
  239. #define VC_MAXDATASIZE 8192
  240. #define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\
  241. VC_MAXDATASIZE
  242. #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
  243. #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */
  244. /*
  245. * Venus <-> Coda RPC arguments
  246. */
  247. struct coda_in_hdr {
  248. u_int32_t opcode;
  249. u_int32_t unique; /* Keep multiple outstanding msgs distinct */
  250. pid_t pid;
  251. pid_t pgid;
  252. vuid_t uid;
  253. };
  254. /* Really important that opcode and unique are 1st two fields! */
  255. struct coda_out_hdr {
  256. u_int32_t opcode;
  257. u_int32_t unique;
  258. u_int32_t result;
  259. };
  260. /* coda_root: NO_IN */
  261. struct coda_root_out {
  262. struct coda_out_hdr oh;
  263. struct CodaFid VFid;
  264. };
  265. struct coda_root_in {
  266. struct coda_in_hdr in;
  267. };
  268. /* coda_open: */
  269. struct coda_open_in {
  270. struct coda_in_hdr ih;
  271. struct CodaFid VFid;
  272. int flags;
  273. };
  274. struct coda_open_out {
  275. struct coda_out_hdr oh;
  276. cdev_t dev;
  277. ino_t inode;
  278. };
  279. /* coda_store: */
  280. struct coda_store_in {
  281. struct coda_in_hdr ih;
  282. struct CodaFid VFid;
  283. int flags;
  284. };
  285. struct coda_store_out {
  286. struct coda_out_hdr out;
  287. };
  288. /* coda_release: */
  289. struct coda_release_in {
  290. struct coda_in_hdr ih;
  291. struct CodaFid VFid;
  292. int flags;
  293. };
  294. struct coda_release_out {
  295. struct coda_out_hdr out;
  296. };
  297. /* coda_close: */
  298. struct coda_close_in {
  299. struct coda_in_hdr ih;
  300. struct CodaFid VFid;
  301. int flags;
  302. };
  303. struct coda_close_out {
  304. struct coda_out_hdr out;
  305. };
  306. /* coda_ioctl: */
  307. struct coda_ioctl_in {
  308. struct coda_in_hdr ih;
  309. struct CodaFid VFid;
  310. int cmd;
  311. int len;
  312. int rwflag;
  313. char *data; /* Place holder for data. */
  314. };
  315. struct coda_ioctl_out {
  316. struct coda_out_hdr oh;
  317. int len;
  318. caddr_t data; /* Place holder for data. */
  319. };
  320. /* coda_getattr: */
  321. struct coda_getattr_in {
  322. struct coda_in_hdr ih;
  323. struct CodaFid VFid;
  324. };
  325. struct coda_getattr_out {
  326. struct coda_out_hdr oh;
  327. struct coda_vattr attr;
  328. };
  329. /* coda_setattr: NO_OUT */
  330. struct coda_setattr_in {
  331. struct coda_in_hdr ih;
  332. struct CodaFid VFid;
  333. struct coda_vattr attr;
  334. };
  335. struct coda_setattr_out {
  336. struct coda_out_hdr out;
  337. };
  338. /* coda_access: NO_OUT */
  339. struct coda_access_in {
  340. struct coda_in_hdr ih;
  341. struct CodaFid VFid;
  342. int flags;
  343. };
  344. struct coda_access_out {
  345. struct coda_out_hdr out;
  346. };
  347. /* lookup flags */
  348. #define CLU_CASE_SENSITIVE 0x01
  349. #define CLU_CASE_INSENSITIVE 0x02
  350. /* coda_lookup: */
  351. struct coda_lookup_in {
  352. struct coda_in_hdr ih;
  353. struct CodaFid VFid;
  354. int name; /* Place holder for data. */
  355. int flags;
  356. };
  357. struct coda_lookup_out {
  358. struct coda_out_hdr oh;
  359. struct CodaFid VFid;
  360. int vtype;
  361. };
  362. /* coda_create: */
  363. struct coda_create_in {
  364. struct coda_in_hdr ih;
  365. struct CodaFid VFid;
  366. struct coda_vattr attr;
  367. int excl;
  368. int mode;
  369. int name; /* Place holder for data. */
  370. };
  371. struct coda_create_out {
  372. struct coda_out_hdr oh;
  373. struct CodaFid VFid;
  374. struct coda_vattr attr;
  375. };
  376. /* coda_remove: NO_OUT */
  377. struct coda_remove_in {
  378. struct coda_in_hdr ih;
  379. struct CodaFid VFid;
  380. int name; /* Place holder for data. */
  381. };
  382. struct coda_remove_out {
  383. struct coda_out_hdr out;
  384. };
  385. /* coda_link: NO_OUT */
  386. struct coda_link_in {
  387. struct coda_in_hdr ih;
  388. struct CodaFid sourceFid; /* cnode to link *to* */
  389. struct CodaFid destFid; /* Directory in which to place link */
  390. int tname; /* Place holder for data. */
  391. };
  392. struct coda_link_out {
  393. struct coda_out_hdr out;
  394. };
  395. /* coda_rename: NO_OUT */
  396. struct coda_rename_in {
  397. struct coda_in_hdr ih;
  398. struct CodaFid sourceFid;
  399. int srcname;
  400. struct CodaFid destFid;
  401. int destname;
  402. };
  403. struct coda_rename_out {
  404. struct coda_out_hdr out;
  405. };
  406. /* coda_mkdir: */
  407. struct coda_mkdir_in {
  408. struct coda_in_hdr ih;
  409. struct CodaFid VFid;
  410. struct coda_vattr attr;
  411. int name; /* Place holder for data. */
  412. };
  413. struct coda_mkdir_out {
  414. struct coda_out_hdr oh;
  415. struct CodaFid VFid;
  416. struct coda_vattr attr;
  417. };
  418. /* coda_rmdir: NO_OUT */
  419. struct coda_rmdir_in {
  420. struct coda_in_hdr ih;
  421. struct CodaFid VFid;
  422. int name; /* Place holder for data. */
  423. };
  424. struct coda_rmdir_out {
  425. struct coda_out_hdr out;
  426. };
  427. /* coda_symlink: NO_OUT */
  428. struct coda_symlink_in {
  429. struct coda_in_hdr ih;
  430. struct CodaFid VFid; /* Directory to put symlink in */
  431. int srcname;
  432. struct coda_vattr attr;
  433. int tname;
  434. };
  435. struct coda_symlink_out {
  436. struct coda_out_hdr out;
  437. };
  438. /* coda_readlink: */
  439. struct coda_readlink_in {
  440. struct coda_in_hdr ih;
  441. struct CodaFid VFid;
  442. };
  443. struct coda_readlink_out {
  444. struct coda_out_hdr oh;
  445. int count;
  446. caddr_t data; /* Place holder for data. */
  447. };
  448. /* coda_fsync: NO_OUT */
  449. struct coda_fsync_in {
  450. struct coda_in_hdr ih;
  451. struct CodaFid VFid;
  452. };
  453. struct coda_fsync_out {
  454. struct coda_out_hdr out;
  455. };
  456. /* coda_vget: */
  457. struct coda_vget_in {
  458. struct coda_in_hdr ih;
  459. struct CodaFid VFid;
  460. };
  461. struct coda_vget_out {
  462. struct coda_out_hdr oh;
  463. struct CodaFid VFid;
  464. int vtype;
  465. };
  466. /* CODA_SIGNAL is out-of-band, doesn't need data. */
  467. /* CODA_INVALIDATE is a venus->kernel call */
  468. /* CODA_FLUSH is a venus->kernel call */
  469. /* coda_purgeuser: */
  470. /* CODA_PURGEUSER is a venus->kernel call */
  471. struct coda_purgeuser_out {
  472. struct coda_out_hdr oh;
  473. vuid_t uid;
  474. };
  475. /* coda_zapfile: */
  476. /* CODA_ZAPFILE is a venus->kernel call */
  477. struct coda_zapfile_out {
  478. struct coda_out_hdr oh;
  479. struct CodaFid CodaFid;
  480. };
  481. /* coda_zapdir: */
  482. /* CODA_ZAPDIR is a venus->kernel call */
  483. struct coda_zapdir_out {
  484. struct coda_out_hdr oh;
  485. struct CodaFid CodaFid;
  486. };
  487. /* coda_purgefid: */
  488. /* CODA_PURGEFID is a venus->kernel call */
  489. struct coda_purgefid_out {
  490. struct coda_out_hdr oh;
  491. struct CodaFid CodaFid;
  492. };
  493. /* coda_replace: */
  494. /* CODA_REPLACE is a venus->kernel call */
  495. struct coda_replace_out { /* coda_replace is a venus->kernel call */
  496. struct coda_out_hdr oh;
  497. struct CodaFid NewFid;
  498. struct CodaFid OldFid;
  499. };
  500. /* coda_open_by_fd: */
  501. struct coda_open_by_fd_in {
  502. struct coda_in_hdr ih;
  503. struct CodaFid VFid;
  504. int flags;
  505. };
  506. struct coda_open_by_fd_out {
  507. struct coda_out_hdr oh;
  508. int fd;
  509. #ifdef __KERNEL__
  510. struct file *fh; /* not passed from userspace but used in-kernel only */
  511. #endif
  512. };
  513. /* coda_open_by_path: */
  514. struct coda_open_by_path_in {
  515. struct coda_in_hdr ih;
  516. struct CodaFid VFid;
  517. int flags;
  518. };
  519. struct coda_open_by_path_out {
  520. struct coda_out_hdr oh;
  521. int path;
  522. };
  523. /* coda_statfs: NO_IN */
  524. struct coda_statfs_in {
  525. struct coda_in_hdr in;
  526. };
  527. struct coda_statfs_out {
  528. struct coda_out_hdr oh;
  529. struct coda_statfs stat;
  530. };
  531. /*
  532. * Occasionally, we don't cache the fid returned by CODA_LOOKUP.
  533. * For instance, if the fid is inconsistent.
  534. * This case is handled by setting the top bit of the type result parameter.
  535. */
  536. #define CODA_NOCACHE 0x80000000
  537. union inputArgs {
  538. struct coda_in_hdr ih; /* NB: every struct below begins with an ih */
  539. struct coda_open_in coda_open;
  540. struct coda_store_in coda_store;
  541. struct coda_release_in coda_release;
  542. struct coda_close_in coda_close;
  543. struct coda_ioctl_in coda_ioctl;
  544. struct coda_getattr_in coda_getattr;
  545. struct coda_setattr_in coda_setattr;
  546. struct coda_access_in coda_access;
  547. struct coda_lookup_in coda_lookup;
  548. struct coda_create_in coda_create;
  549. struct coda_remove_in coda_remove;
  550. struct coda_link_in coda_link;
  551. struct coda_rename_in coda_rename;
  552. struct coda_mkdir_in coda_mkdir;
  553. struct coda_rmdir_in coda_rmdir;
  554. struct coda_symlink_in coda_symlink;
  555. struct coda_readlink_in coda_readlink;
  556. struct coda_fsync_in coda_fsync;
  557. struct coda_vget_in coda_vget;
  558. struct coda_open_by_fd_in coda_open_by_fd;
  559. struct coda_open_by_path_in coda_open_by_path;
  560. struct coda_statfs_in coda_statfs;
  561. };
  562. union outputArgs {
  563. struct coda_out_hdr oh; /* NB: every struct below begins with an oh */
  564. struct coda_root_out coda_root;
  565. struct coda_open_out coda_open;
  566. struct coda_ioctl_out coda_ioctl;
  567. struct coda_getattr_out coda_getattr;
  568. struct coda_lookup_out coda_lookup;
  569. struct coda_create_out coda_create;
  570. struct coda_mkdir_out coda_mkdir;
  571. struct coda_readlink_out coda_readlink;
  572. struct coda_vget_out coda_vget;
  573. struct coda_purgeuser_out coda_purgeuser;
  574. struct coda_zapfile_out coda_zapfile;
  575. struct coda_zapdir_out coda_zapdir;
  576. struct coda_purgefid_out coda_purgefid;
  577. struct coda_replace_out coda_replace;
  578. struct coda_open_by_fd_out coda_open_by_fd;
  579. struct coda_open_by_path_out coda_open_by_path;
  580. struct coda_statfs_out coda_statfs;
  581. };
  582. union coda_downcalls {
  583. /* CODA_INVALIDATE is a venus->kernel call */
  584. /* CODA_FLUSH is a venus->kernel call */
  585. struct coda_purgeuser_out purgeuser;
  586. struct coda_zapfile_out zapfile;
  587. struct coda_zapdir_out zapdir;
  588. struct coda_purgefid_out purgefid;
  589. struct coda_replace_out replace;
  590. };
  591. /*
  592. * Used for identifying usage of "Control" and pioctls
  593. */
  594. #define PIOCPARM_MASK 0x0000ffff
  595. struct ViceIoctl {
  596. void __user *in; /* Data to be transferred in */
  597. void __user *out; /* Data to be transferred out */
  598. u_short in_size; /* Size of input buffer <= 2K */
  599. u_short out_size; /* Maximum size of output buffer, <= 2K */
  600. };
  601. struct PioctlData {
  602. const char __user *path;
  603. int follow;
  604. struct ViceIoctl vi;
  605. };
  606. #define CODA_CONTROL ".CONTROL"
  607. #define CODA_CONTROLLEN 8
  608. #define CTL_INO -1
  609. /* Data passed to mount */
  610. #define CODA_MOUNT_VERSION 1
  611. struct coda_mount_data {
  612. int version;
  613. int fd; /* Opened device */
  614. };
  615. #endif /* _UAPI_CODA_HEADER_ */