coda.h (38759) | coda.h (39085) |
---|---|
1/* 2 * 3 * Coda: an Experimental Distributed File System 4 * Release 3.1 5 * 6 * Copyright (c) 1987-1998 Carnegie Mellon University 7 * All Rights Reserved 8 * --- 13 unchanged lines hidden (view full) --- 22 * RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF 23 * ANY DERIVATIVE WORK. 24 * 25 * Carnegie Mellon encourages users of this software to return any 26 * improvements or extensions that they make, and to grant Carnegie 27 * Mellon the rights to redistribute these changes without encumbrance. 28 * 29 * @(#) src/sys/cfs/coda.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ | 1/* 2 * 3 * Coda: an Experimental Distributed File System 4 * Release 3.1 5 * 6 * Copyright (c) 1987-1998 Carnegie Mellon University 7 * All Rights Reserved 8 * --- 13 unchanged lines hidden (view full) --- 22 * RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF 23 * ANY DERIVATIVE WORK. 24 * 25 * Carnegie Mellon encourages users of this software to return any 26 * improvements or extensions that they make, and to grant Carnegie 27 * Mellon the rights to redistribute these changes without encumbrance. 28 * 29 * @(#) src/sys/cfs/coda.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ |
30 * $Id: $ | 30 * $Id: coda.h,v 1.2 1998/09/02 19:09:53 rvb Exp $ |
31 * 32 */ 33 34/* 35 * 36 * Based on cfs.h from Mach, but revamped for increased simplicity. 37 * Linux modifications by Peter Braam, Aug 1996 38 */ 39 | 31 * 32 */ 33 34/* 35 * 36 * Based on cfs.h from Mach, but revamped for increased simplicity. 37 * Linux modifications by Peter Braam, Aug 1996 38 */ 39 |
40#ifndef _CFS_HEADER_ 41#define _CFS_HEADER_ | 40#ifndef _CODA_HEADER_ 41#define _CODA_HEADER_ |
42 43/* Catch new _KERNEL defn for NetBSD */ 44#ifdef __NetBSD__ 45#include <sys/types.h> 46#endif 47 48#if defined(__linux__) || defined(__CYGWIN32__) 49#define cdev_t u_quad_t --- 10 unchanged lines hidden (view full) --- 60struct timespec { 61 time_t tv_sec; /* seconds */ 62 long tv_nsec; /* nanoseconds */ 63}; 64#endif 65 66 67/* | 42 43/* Catch new _KERNEL defn for NetBSD */ 44#ifdef __NetBSD__ 45#include <sys/types.h> 46#endif 47 48#if defined(__linux__) || defined(__CYGWIN32__) 49#define cdev_t u_quad_t --- 10 unchanged lines hidden (view full) --- 60struct timespec { 61 time_t tv_sec; /* seconds */ 62 long tv_nsec; /* nanoseconds */ 63}; 64#endif 65 66 67/* |
68 * Cfs constants | 68 * Coda constants |
69 */ | 69 */ |
70#define CFS_MAXNAMLEN 255 71#define CFS_MAXPATHLEN 1024 72#define CFS_MAXSYMLINK 10 | 70#define CODA_MAXNAMLEN 255 71#define CODA_MAXPATHLEN 1024 72#define CODA_MAXSYMLINK 10 |
73 74/* these are Coda's version of O_RDONLY etc combinations 75 * to deal with VFS open modes 76 */ 77#define C_O_READ 0x001 78#define C_O_WRITE 0x002 79#define C_O_TRUNC 0x010 80#define C_O_EXCL 0x100 --- 12 unchanged lines hidden (view full) --- 93 94#ifndef _VENUS_DIRENT_T_ 95#define _VENUS_DIRENT_T_ 1 96struct venus_dirent { 97 unsigned long d_fileno; /* file number of entry */ 98 unsigned short d_reclen; /* length of this record */ 99 char d_type; /* file type, see below */ 100 char d_namlen; /* length of string in d_name */ | 73 74/* these are Coda's version of O_RDONLY etc combinations 75 * to deal with VFS open modes 76 */ 77#define C_O_READ 0x001 78#define C_O_WRITE 0x002 79#define C_O_TRUNC 0x010 80#define C_O_EXCL 0x100 --- 12 unchanged lines hidden (view full) --- 93 94#ifndef _VENUS_DIRENT_T_ 95#define _VENUS_DIRENT_T_ 1 96struct venus_dirent { 97 unsigned long d_fileno; /* file number of entry */ 98 unsigned short d_reclen; /* length of this record */ 99 char d_type; /* file type, see below */ 100 char d_namlen; /* length of string in d_name */ |
101 char d_name[CFS_MAXNAMLEN + 1];/* name must be no longer than this */ | 101 char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */ |
102}; 103#undef DIRSIZ | 102}; 103#undef DIRSIZ |
104#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CFS_MAXNAMLEN+1)) + \ | 104#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + \ |
105 (((dp)->d_namlen+1 + 3) &~ 3)) 106 107/* 108 * File types 109 */ 110#define CDT_UNKNOWN 0 111#define CDT_FIFO 1 112#define CDT_CHR 2 --- 85 unchanged lines hidden (view full) --- 198}; 199 200#endif 201 202/* 203 * Kernel <--> Venus communications. 204 */ 205 | 105 (((dp)->d_namlen+1 + 3) &~ 3)) 106 107/* 108 * File types 109 */ 110#define CDT_UNKNOWN 0 111#define CDT_FIFO 1 112#define CDT_CHR 2 --- 85 unchanged lines hidden (view full) --- 198}; 199 200#endif 201 202/* 203 * Kernel <--> Venus communications. 204 */ 205 |
206#define CFS_ROOT ((u_long) 2) 207#define CFS_SYNC ((u_long) 3) 208#define CFS_OPEN ((u_long) 4) 209#define CFS_CLOSE ((u_long) 5) 210#define CFS_IOCTL ((u_long) 6) 211#define CFS_GETATTR ((u_long) 7) 212#define CFS_SETATTR ((u_long) 8) 213#define CFS_ACCESS ((u_long) 9) 214#define CFS_LOOKUP ((u_long) 10) 215#define CFS_CREATE ((u_long) 11) 216#define CFS_REMOVE ((u_long) 12) 217#define CFS_LINK ((u_long) 13) 218#define CFS_RENAME ((u_long) 14) 219#define CFS_MKDIR ((u_long) 15) 220#define CFS_RMDIR ((u_long) 16) 221#define CFS_READDIR ((u_long) 17) 222#define CFS_SYMLINK ((u_long) 18) 223#define CFS_READLINK ((u_long) 19) 224#define CFS_FSYNC ((u_long) 20) 225#define CFS_INACTIVE ((u_long) 21) 226#define CFS_VGET ((u_long) 22) 227#define CFS_SIGNAL ((u_long) 23) 228#define CFS_REPLACE ((u_long) 24) 229#define CFS_FLUSH ((u_long) 25) 230#define CFS_PURGEUSER ((u_long) 26) 231#define CFS_ZAPFILE ((u_long) 27) 232#define CFS_ZAPDIR ((u_long) 28) 233#define CFS_ZAPVNODE ((u_long) 29) 234#define CFS_PURGEFID ((u_long) 30) 235#define CFS_NCALLS 31 | 206#define CODA_ROOT ((u_long) 2) 207#define CODA_SYNC ((u_long) 3) 208#define CODA_OPEN ((u_long) 4) 209#define CODA_CLOSE ((u_long) 5) 210#define CODA_IOCTL ((u_long) 6) 211#define CODA_GETATTR ((u_long) 7) 212#define CODA_SETATTR ((u_long) 8) 213#define CODA_ACCESS ((u_long) 9) 214#define CODA_LOOKUP ((u_long) 10) 215#define CODA_CREATE ((u_long) 11) 216#define CODA_REMOVE ((u_long) 12) 217#define CODA_LINK ((u_long) 13) 218#define CODA_RENAME ((u_long) 14) 219#define CODA_MKDIR ((u_long) 15) 220#define CODA_RMDIR ((u_long) 16) 221#define CODA_READDIR ((u_long) 17) 222#define CODA_SYMLINK ((u_long) 18) 223#define CODA_READLINK ((u_long) 19) 224#define CODA_FSYNC ((u_long) 20) 225#define CODA_INACTIVE ((u_long) 21) 226#define CODA_VGET ((u_long) 22) 227#define CODA_SIGNAL ((u_long) 23) 228#define CODA_REPLACE ((u_long) 24) 229#define CODA_FLUSH ((u_long) 25) 230#define CODA_PURGEUSER ((u_long) 26) 231#define CODA_ZAPFILE ((u_long) 27) 232#define CODA_ZAPDIR ((u_long) 28) 233#define CODA_ZAPVNODE ((u_long) 29) 234#define CODA_PURGEFID ((u_long) 30) 235#define CODA_NCALLS 31 |
236 | 236 |
237#define DOWNCALL(opcode) (opcode >= CFS_REPLACE && opcode <= CFS_PURGEFID) | 237#define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID) |
238 239#define VC_MAXDATASIZE 8192 240#define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\ 241 VC_MAXDATASIZE 242 243 244 245/* 246 * Venus <-> Coda RPC arguments 247 */ | 238 239#define VC_MAXDATASIZE 8192 240#define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\ 241 VC_MAXDATASIZE 242 243 244 245/* 246 * Venus <-> Coda RPC arguments 247 */ |
248struct cfs_in_hdr { | 248struct coda_in_hdr { |
249 unsigned long opcode; 250 unsigned long unique; /* Keep multiple outstanding msgs distinct */ 251 u_short pid; /* Common to all */ 252 u_short pgid; /* Common to all */ 253 u_short sid; /* Common to all */ 254 struct coda_cred cred; /* Common to all */ 255}; 256 257/* Really important that opcode and unique are 1st two fields! */ | 249 unsigned long opcode; 250 unsigned long unique; /* Keep multiple outstanding msgs distinct */ 251 u_short pid; /* Common to all */ 252 u_short pgid; /* Common to all */ 253 u_short sid; /* Common to all */ 254 struct coda_cred cred; /* Common to all */ 255}; 256 257/* Really important that opcode and unique are 1st two fields! */ |
258struct cfs_out_hdr { | 258struct coda_out_hdr { |
259 unsigned long opcode; 260 unsigned long unique; 261 unsigned long result; 262}; 263 | 259 unsigned long opcode; 260 unsigned long unique; 261 unsigned long result; 262}; 263 |
264/* cfs_root: NO_IN */ 265struct cfs_root_out { 266 struct cfs_out_hdr oh; | 264/* coda_root: NO_IN */ 265struct coda_root_out { 266 struct coda_out_hdr oh; |
267 ViceFid VFid; 268}; 269 | 267 ViceFid VFid; 268}; 269 |
270struct cfs_root_in { 271 struct cfs_in_hdr in; | 270struct coda_root_in { 271 struct coda_in_hdr in; |
272}; 273 | 272}; 273 |
274/* cfs_sync: */ 275/* Nothing needed for cfs_sync */ | 274/* coda_sync: */ 275/* Nothing needed for coda_sync */ |
276 | 276 |
277/* cfs_open: */ 278struct cfs_open_in { 279 struct cfs_in_hdr ih; | 277/* coda_open: */ 278struct coda_open_in { 279 struct coda_in_hdr ih; |
280 ViceFid VFid; 281 int flags; 282}; 283 | 280 ViceFid VFid; 281 int flags; 282}; 283 |
284struct cfs_open_out { 285 struct cfs_out_hdr oh; | 284struct coda_open_out { 285 struct coda_out_hdr oh; |
286 cdev_t dev; 287 ino_t inode; 288}; 289 290 | 286 cdev_t dev; 287 ino_t inode; 288}; 289 290 |
291/* cfs_close: */ 292struct cfs_close_in { 293 struct cfs_in_hdr ih; | 291/* coda_close: */ 292struct coda_close_in { 293 struct coda_in_hdr ih; |
294 ViceFid VFid; 295 int flags; 296}; 297 | 294 ViceFid VFid; 295 int flags; 296}; 297 |
298struct cfs_close_out { 299 struct cfs_out_hdr out; | 298struct coda_close_out { 299 struct coda_out_hdr out; |
300}; 301 | 300}; 301 |
302/* cfs_ioctl: */ 303struct cfs_ioctl_in { 304 struct cfs_in_hdr ih; | 302/* coda_ioctl: */ 303struct coda_ioctl_in { 304 struct coda_in_hdr ih; |
305 ViceFid VFid; 306 int cmd; 307 int len; 308 int rwflag; 309 char *data; /* Place holder for data. */ 310}; 311 | 305 ViceFid VFid; 306 int cmd; 307 int len; 308 int rwflag; 309 char *data; /* Place holder for data. */ 310}; 311 |
312struct cfs_ioctl_out { 313 struct cfs_out_hdr oh; | 312struct coda_ioctl_out { 313 struct coda_out_hdr oh; |
314 int len; 315 caddr_t data; /* Place holder for data. */ 316}; 317 318 | 314 int len; 315 caddr_t data; /* Place holder for data. */ 316}; 317 318 |
319/* cfs_getattr: */ 320struct cfs_getattr_in { 321 struct cfs_in_hdr ih; | 319/* coda_getattr: */ 320struct coda_getattr_in { 321 struct coda_in_hdr ih; |
322 ViceFid VFid; 323}; 324 | 322 ViceFid VFid; 323}; 324 |
325struct cfs_getattr_out { 326 struct cfs_out_hdr oh; | 325struct coda_getattr_out { 326 struct coda_out_hdr oh; |
327 struct coda_vattr attr; 328}; 329 330 | 327 struct coda_vattr attr; 328}; 329 330 |
331/* cfs_setattr: NO_OUT */ 332struct cfs_setattr_in { 333 struct cfs_in_hdr ih; | 331/* coda_setattr: NO_OUT */ 332struct coda_setattr_in { 333 struct coda_in_hdr ih; |
334 ViceFid VFid; 335 struct coda_vattr attr; 336}; 337 | 334 ViceFid VFid; 335 struct coda_vattr attr; 336}; 337 |
338struct cfs_setattr_out { 339 struct cfs_out_hdr out; | 338struct coda_setattr_out { 339 struct coda_out_hdr out; |
340}; 341 | 340}; 341 |
342/* cfs_access: NO_OUT */ 343struct cfs_access_in { 344 struct cfs_in_hdr ih; | 342/* coda_access: NO_OUT */ 343struct coda_access_in { 344 struct coda_in_hdr ih; |
345 ViceFid VFid; 346 int flags; 347}; 348 | 345 ViceFid VFid; 346 int flags; 347}; 348 |
349struct cfs_access_out { 350 struct cfs_out_hdr out; | 349struct coda_access_out { 350 struct coda_out_hdr out; |
351}; 352 | 351}; 352 |
353/* cfs_lookup: */ 354struct cfs_lookup_in { 355 struct cfs_in_hdr ih; | 353/* coda_lookup: */ 354struct coda_lookup_in { 355 struct coda_in_hdr ih; |
356 ViceFid VFid; 357 int name; /* Place holder for data. */ 358}; 359 | 356 ViceFid VFid; 357 int name; /* Place holder for data. */ 358}; 359 |
360struct cfs_lookup_out { 361 struct cfs_out_hdr oh; | 360struct coda_lookup_out { 361 struct coda_out_hdr oh; |
362 ViceFid VFid; 363 int vtype; 364}; 365 366 | 362 ViceFid VFid; 363 int vtype; 364}; 365 366 |
367/* cfs_create: */ 368struct cfs_create_in { 369 struct cfs_in_hdr ih; | 367/* coda_create: */ 368struct coda_create_in { 369 struct coda_in_hdr ih; |
370 ViceFid VFid; 371 struct coda_vattr attr; 372 int excl; 373 int mode; 374 int name; /* Place holder for data. */ 375}; 376 | 370 ViceFid VFid; 371 struct coda_vattr attr; 372 int excl; 373 int mode; 374 int name; /* Place holder for data. */ 375}; 376 |
377struct cfs_create_out { 378 struct cfs_out_hdr oh; | 377struct coda_create_out { 378 struct coda_out_hdr oh; |
379 ViceFid VFid; 380 struct coda_vattr attr; 381}; 382 383 | 379 ViceFid VFid; 380 struct coda_vattr attr; 381}; 382 383 |
384/* cfs_remove: NO_OUT */ 385struct cfs_remove_in { 386 struct cfs_in_hdr ih; | 384/* coda_remove: NO_OUT */ 385struct coda_remove_in { 386 struct coda_in_hdr ih; |
387 ViceFid VFid; 388 int name; /* Place holder for data. */ 389}; 390 | 387 ViceFid VFid; 388 int name; /* Place holder for data. */ 389}; 390 |
391struct cfs_remove_out { 392 struct cfs_out_hdr out; | 391struct coda_remove_out { 392 struct coda_out_hdr out; |
393}; 394 | 393}; 394 |
395/* cfs_link: NO_OUT */ 396struct cfs_link_in { 397 struct cfs_in_hdr ih; | 395/* coda_link: NO_OUT */ 396struct coda_link_in { 397 struct coda_in_hdr ih; |
398 ViceFid sourceFid; /* cnode to link *to* */ 399 ViceFid destFid; /* Directory in which to place link */ 400 int tname; /* Place holder for data. */ 401}; 402 | 398 ViceFid sourceFid; /* cnode to link *to* */ 399 ViceFid destFid; /* Directory in which to place link */ 400 int tname; /* Place holder for data. */ 401}; 402 |
403struct cfs_link_out { 404 struct cfs_out_hdr out; | 403struct coda_link_out { 404 struct coda_out_hdr out; |
405}; 406 407 | 405}; 406 407 |
408/* cfs_rename: NO_OUT */ 409struct cfs_rename_in { 410 struct cfs_in_hdr ih; | 408/* coda_rename: NO_OUT */ 409struct coda_rename_in { 410 struct coda_in_hdr ih; |
411 ViceFid sourceFid; 412 int srcname; 413 ViceFid destFid; 414 int destname; 415}; 416 | 411 ViceFid sourceFid; 412 int srcname; 413 ViceFid destFid; 414 int destname; 415}; 416 |
417struct cfs_rename_out { 418 struct cfs_out_hdr out; | 417struct coda_rename_out { 418 struct coda_out_hdr out; |
419}; 420 | 419}; 420 |
421/* cfs_mkdir: */ 422struct cfs_mkdir_in { 423 struct cfs_in_hdr ih; | 421/* coda_mkdir: */ 422struct coda_mkdir_in { 423 struct coda_in_hdr ih; |
424 ViceFid VFid; 425 struct coda_vattr attr; 426 int name; /* Place holder for data. */ 427}; 428 | 424 ViceFid VFid; 425 struct coda_vattr attr; 426 int name; /* Place holder for data. */ 427}; 428 |
429struct cfs_mkdir_out { 430 struct cfs_out_hdr oh; | 429struct coda_mkdir_out { 430 struct coda_out_hdr oh; |
431 ViceFid VFid; 432 struct coda_vattr attr; 433}; 434 435 | 431 ViceFid VFid; 432 struct coda_vattr attr; 433}; 434 435 |
436/* cfs_rmdir: NO_OUT */ 437struct cfs_rmdir_in { 438 struct cfs_in_hdr ih; | 436/* coda_rmdir: NO_OUT */ 437struct coda_rmdir_in { 438 struct coda_in_hdr ih; |
439 ViceFid VFid; 440 int name; /* Place holder for data. */ 441}; 442 | 439 ViceFid VFid; 440 int name; /* Place holder for data. */ 441}; 442 |
443struct cfs_rmdir_out { 444 struct cfs_out_hdr out; | 443struct coda_rmdir_out { 444 struct coda_out_hdr out; |
445}; 446 | 445}; 446 |
447/* cfs_readdir: */ 448struct cfs_readdir_in { 449 struct cfs_in_hdr ih; | 447/* coda_readdir: */ 448struct coda_readdir_in { 449 struct coda_in_hdr ih; |
450 ViceFid VFid; 451 int count; 452 int offset; 453}; 454 | 450 ViceFid VFid; 451 int count; 452 int offset; 453}; 454 |
455struct cfs_readdir_out { 456 struct cfs_out_hdr oh; | 455struct coda_readdir_out { 456 struct coda_out_hdr oh; |
457 int size; 458 caddr_t data; /* Place holder for data. */ 459}; 460 | 457 int size; 458 caddr_t data; /* Place holder for data. */ 459}; 460 |
461/* cfs_symlink: NO_OUT */ 462struct cfs_symlink_in { 463 struct cfs_in_hdr ih; | 461/* coda_symlink: NO_OUT */ 462struct coda_symlink_in { 463 struct coda_in_hdr ih; |
464 ViceFid VFid; /* Directory to put symlink in */ 465 int srcname; 466 struct coda_vattr attr; 467 int tname; 468}; 469 | 464 ViceFid VFid; /* Directory to put symlink in */ 465 int srcname; 466 struct coda_vattr attr; 467 int tname; 468}; 469 |
470struct cfs_symlink_out { 471 struct cfs_out_hdr out; | 470struct coda_symlink_out { 471 struct coda_out_hdr out; |
472}; 473 | 472}; 473 |
474/* cfs_readlink: */ 475struct cfs_readlink_in { 476 struct cfs_in_hdr ih; | 474/* coda_readlink: */ 475struct coda_readlink_in { 476 struct coda_in_hdr ih; |
477 ViceFid VFid; 478}; 479 | 477 ViceFid VFid; 478}; 479 |
480struct cfs_readlink_out { 481 struct cfs_out_hdr oh; | 480struct coda_readlink_out { 481 struct coda_out_hdr oh; |
482 int count; 483 caddr_t data; /* Place holder for data. */ 484}; 485 486 | 482 int count; 483 caddr_t data; /* Place holder for data. */ 484}; 485 486 |
487/* cfs_fsync: NO_OUT */ 488struct cfs_fsync_in { 489 struct cfs_in_hdr ih; | 487/* coda_fsync: NO_OUT */ 488struct coda_fsync_in { 489 struct coda_in_hdr ih; |
490 ViceFid VFid; 491}; 492 | 490 ViceFid VFid; 491}; 492 |
493struct cfs_fsync_out { 494 struct cfs_out_hdr out; | 493struct coda_fsync_out { 494 struct coda_out_hdr out; |
495}; 496 | 495}; 496 |
497/* cfs_inactive: NO_OUT */ 498struct cfs_inactive_in { 499 struct cfs_in_hdr ih; | 497/* coda_inactive: NO_OUT */ 498struct coda_inactive_in { 499 struct coda_in_hdr ih; |
500 ViceFid VFid; 501}; 502 | 500 ViceFid VFid; 501}; 502 |
503/* cfs_vget: */ 504struct cfs_vget_in { 505 struct cfs_in_hdr ih; | 503/* coda_vget: */ 504struct coda_vget_in { 505 struct coda_in_hdr ih; |
506 ViceFid VFid; 507}; 508 | 506 ViceFid VFid; 507}; 508 |
509struct cfs_vget_out { 510 struct cfs_out_hdr oh; | 509struct coda_vget_out { 510 struct coda_out_hdr oh; |
511 ViceFid VFid; 512 int vtype; 513}; 514 515 | 511 ViceFid VFid; 512 int vtype; 513}; 514 515 |
516/* CFS_SIGNAL is out-of-band, doesn't need data. */ 517/* CFS_INVALIDATE is a venus->kernel call */ 518/* CFS_FLUSH is a venus->kernel call */ | 516/* CODA_SIGNAL is out-of-band, doesn't need data. */ 517/* CODA_INVALIDATE is a venus->kernel call */ 518/* CODA_FLUSH is a venus->kernel call */ |
519 | 519 |
520/* cfs_purgeuser: */ 521/* CFS_PURGEUSER is a venus->kernel call */ 522struct cfs_purgeuser_out { 523 struct cfs_out_hdr oh; | 520/* coda_purgeuser: */ 521/* CODA_PURGEUSER is a venus->kernel call */ 522struct coda_purgeuser_out { 523 struct coda_out_hdr oh; |
524 struct coda_cred cred; 525}; 526 | 524 struct coda_cred cred; 525}; 526 |
527/* cfs_zapfile: */ 528/* CFS_ZAPFILE is a venus->kernel call */ 529struct cfs_zapfile_out { 530 struct cfs_out_hdr oh; | 527/* coda_zapfile: */ 528/* CODA_ZAPFILE is a venus->kernel call */ 529struct coda_zapfile_out { 530 struct coda_out_hdr oh; |
531 ViceFid CodaFid; 532}; 533 | 531 ViceFid CodaFid; 532}; 533 |
534/* cfs_zapdir: */ 535/* CFS_ZAPDIR is a venus->kernel call */ 536struct cfs_zapdir_out { 537 struct cfs_out_hdr oh; | 534/* coda_zapdir: */ 535/* CODA_ZAPDIR is a venus->kernel call */ 536struct coda_zapdir_out { 537 struct coda_out_hdr oh; |
538 ViceFid CodaFid; 539}; 540 | 538 ViceFid CodaFid; 539}; 540 |
541/* cfs_zapnode: */ 542/* CFS_ZAPVNODE is a venus->kernel call */ 543struct cfs_zapvnode_out { 544 struct cfs_out_hdr oh; | 541/* coda_zapnode: */ 542/* CODA_ZAPVNODE is a venus->kernel call */ 543struct coda_zapvnode_out { 544 struct coda_out_hdr oh; |
545 struct coda_cred cred; 546 ViceFid VFid; 547}; 548 | 545 struct coda_cred cred; 546 ViceFid VFid; 547}; 548 |
549/* cfs_purgefid: */ 550/* CFS_PURGEFID is a venus->kernel call */ 551struct cfs_purgefid_out { 552 struct cfs_out_hdr oh; | 549/* coda_purgefid: */ 550/* CODA_PURGEFID is a venus->kernel call */ 551struct coda_purgefid_out { 552 struct coda_out_hdr oh; |
553 ViceFid CodaFid; 554}; 555 | 553 ViceFid CodaFid; 554}; 555 |
556/* cfs_rdwr: */ 557struct cfs_rdwr_in { 558 struct cfs_in_hdr ih; | 556/* coda_rdwr: */ 557struct coda_rdwr_in { 558 struct coda_in_hdr ih; |
559 ViceFid VFid; 560 int rwflag; 561 int count; 562 int offset; 563 int ioflag; 564 caddr_t data; /* Place holder for data. */ 565}; 566 | 559 ViceFid VFid; 560 int rwflag; 561 int count; 562 int offset; 563 int ioflag; 564 caddr_t data; /* Place holder for data. */ 565}; 566 |
567struct cfs_rdwr_out { 568 struct cfs_out_hdr oh; | 567struct coda_rdwr_out { 568 struct coda_out_hdr oh; |
569 int rwflag; 570 int count; 571 caddr_t data; /* Place holder for data. */ 572}; 573 574 | 569 int rwflag; 570 int count; 571 caddr_t data; /* Place holder for data. */ 572}; 573 574 |
575/* cfs_replace: */ 576/* CFS_REPLACE is a venus->kernel call */ 577struct cfs_replace_out { /* cfs_replace is a venus->kernel call */ 578 struct cfs_out_hdr oh; | 575/* coda_replace: */ 576/* CODA_REPLACE is a venus->kernel call */ 577struct coda_replace_out { /* coda_replace is a venus->kernel call */ 578 struct coda_out_hdr oh; |
579 ViceFid NewFid; 580 ViceFid OldFid; 581}; 582 583/* | 579 ViceFid NewFid; 580 ViceFid OldFid; 581}; 582 583/* |
584 * Occasionally, don't cache the fid returned by CFS_LOOKUP. For instance, if | 584 * Occasionally, don't cache the fid returned by CODA_LOOKUP. For instance, if |
585 * the fid is inconsistent. This case is handled by setting the top bit of the 586 * return result parameter. 587 */ | 585 * the fid is inconsistent. This case is handled by setting the top bit of the 586 * return result parameter. 587 */ |
588#define CFS_NOCACHE 0x80000000 | 588#define CODA_NOCACHE 0x80000000 |
589 590union inputArgs { | 589 590union inputArgs { |
591 struct cfs_in_hdr ih; /* NB: every struct below begins with an ih */ 592 struct cfs_open_in cfs_open; 593 struct cfs_close_in cfs_close; 594 struct cfs_ioctl_in cfs_ioctl; 595 struct cfs_getattr_in cfs_getattr; 596 struct cfs_setattr_in cfs_setattr; 597 struct cfs_access_in cfs_access; 598 struct cfs_lookup_in cfs_lookup; 599 struct cfs_create_in cfs_create; 600 struct cfs_remove_in cfs_remove; 601 struct cfs_link_in cfs_link; 602 struct cfs_rename_in cfs_rename; 603 struct cfs_mkdir_in cfs_mkdir; 604 struct cfs_rmdir_in cfs_rmdir; 605 struct cfs_readdir_in cfs_readdir; 606 struct cfs_symlink_in cfs_symlink; 607 struct cfs_readlink_in cfs_readlink; 608 struct cfs_fsync_in cfs_fsync; 609 struct cfs_inactive_in cfs_inactive; 610 struct cfs_vget_in cfs_vget; 611 struct cfs_rdwr_in cfs_rdwr; | 591 struct coda_in_hdr ih; /* NB: every struct below begins with an ih */ 592 struct coda_open_in coda_open; 593 struct coda_close_in coda_close; 594 struct coda_ioctl_in coda_ioctl; 595 struct coda_getattr_in coda_getattr; 596 struct coda_setattr_in coda_setattr; 597 struct coda_access_in coda_access; 598 struct coda_lookup_in coda_lookup; 599 struct coda_create_in coda_create; 600 struct coda_remove_in coda_remove; 601 struct coda_link_in coda_link; 602 struct coda_rename_in coda_rename; 603 struct coda_mkdir_in coda_mkdir; 604 struct coda_rmdir_in coda_rmdir; 605 struct coda_readdir_in coda_readdir; 606 struct coda_symlink_in coda_symlink; 607 struct coda_readlink_in coda_readlink; 608 struct coda_fsync_in coda_fsync; 609 struct coda_inactive_in coda_inactive; 610 struct coda_vget_in coda_vget; 611 struct coda_rdwr_in coda_rdwr; |
612}; 613 614union outputArgs { | 612}; 613 614union outputArgs { |
615 struct cfs_out_hdr oh; /* NB: every struct below begins with an oh */ 616 struct cfs_root_out cfs_root; 617 struct cfs_open_out cfs_open; 618 struct cfs_ioctl_out cfs_ioctl; 619 struct cfs_getattr_out cfs_getattr; 620 struct cfs_lookup_out cfs_lookup; 621 struct cfs_create_out cfs_create; 622 struct cfs_mkdir_out cfs_mkdir; 623 struct cfs_readdir_out cfs_readdir; 624 struct cfs_readlink_out cfs_readlink; 625 struct cfs_vget_out cfs_vget; 626 struct cfs_purgeuser_out cfs_purgeuser; 627 struct cfs_zapfile_out cfs_zapfile; 628 struct cfs_zapdir_out cfs_zapdir; 629 struct cfs_zapvnode_out cfs_zapvnode; 630 struct cfs_purgefid_out cfs_purgefid; 631 struct cfs_rdwr_out cfs_rdwr; 632 struct cfs_replace_out cfs_replace; | 615 struct coda_out_hdr oh; /* NB: every struct below begins with an oh */ 616 struct coda_root_out coda_root; 617 struct coda_open_out coda_open; 618 struct coda_ioctl_out coda_ioctl; 619 struct coda_getattr_out coda_getattr; 620 struct coda_lookup_out coda_lookup; 621 struct coda_create_out coda_create; 622 struct coda_mkdir_out coda_mkdir; 623 struct coda_readdir_out coda_readdir; 624 struct coda_readlink_out coda_readlink; 625 struct coda_vget_out coda_vget; 626 struct coda_purgeuser_out coda_purgeuser; 627 struct coda_zapfile_out coda_zapfile; 628 struct coda_zapdir_out coda_zapdir; 629 struct coda_zapvnode_out coda_zapvnode; 630 struct coda_purgefid_out coda_purgefid; 631 struct coda_rdwr_out coda_rdwr; 632 struct coda_replace_out coda_replace; |
633}; 634 | 633}; 634 |
635union cfs_downcalls { 636 /* CFS_INVALIDATE is a venus->kernel call */ 637 /* CFS_FLUSH is a venus->kernel call */ 638 struct cfs_purgeuser_out purgeuser; 639 struct cfs_zapfile_out zapfile; 640 struct cfs_zapdir_out zapdir; 641 struct cfs_zapvnode_out zapvnode; 642 struct cfs_purgefid_out purgefid; 643 struct cfs_replace_out replace; | 635union coda_downcalls { 636 /* CODA_INVALIDATE is a venus->kernel call */ 637 /* CODA_FLUSH is a venus->kernel call */ 638 struct coda_purgeuser_out purgeuser; 639 struct coda_zapfile_out zapfile; 640 struct coda_zapdir_out zapdir; 641 struct coda_zapvnode_out zapvnode; 642 struct coda_purgefid_out purgefid; 643 struct coda_replace_out replace; |
644}; 645 646 647/* 648 * Used for identifying usage of "Control" and pioctls 649 */ 650 651#define PIOCPARM_MASK 0x0000ffff --- 4 unchanged lines hidden (view full) --- 656}; 657 658struct PioctlData { 659 const char *path; 660 int follow; 661 struct ViceIoctl vi; 662}; 663 | 644}; 645 646 647/* 648 * Used for identifying usage of "Control" and pioctls 649 */ 650 651#define PIOCPARM_MASK 0x0000ffff --- 4 unchanged lines hidden (view full) --- 656}; 657 658struct PioctlData { 659 const char *path; 660 int follow; 661 struct ViceIoctl vi; 662}; 663 |
664#define CFS_CONTROL ".CONTROL" 665#define CFS_CONTROLLEN 8 | 664#define CODA_CONTROL ".CONTROL" 665#define CODA_CONTROLLEN 8 |
666#define CTL_VOL -1 667#define CTL_VNO -1 668#define CTL_UNI -1 669#define CTL_INO -1 670#define CTL_FILE "/coda/.CONTROL" 671 672 673#define IS_CTL_FID(fidp) ((fidp)->Volume == CTL_VOL &&\ 674 (fidp)->Vnode == CTL_VNO &&\ 675 (fidp)->Unique == CTL_UNI) 676#endif 677 | 666#define CTL_VOL -1 667#define CTL_VNO -1 668#define CTL_UNI -1 669#define CTL_INO -1 670#define CTL_FILE "/coda/.CONTROL" 671 672 673#define IS_CTL_FID(fidp) ((fidp)->Volume == CTL_VOL &&\ 674 (fidp)->Vnode == CTL_VNO &&\ 675 (fidp)->Unique == CTL_UNI) 676#endif 677 |