Coda Distributed File System
objlist.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef _VICE_OBJLIST_H_
20#define _VICE_OBJLIST_H_ 1
21
22#ifdef __cplusplus
23extern "C" {
24#endif __cplusplus
25
26#include <unistd.h>
27#include <stdlib.h>
28#include <util.h>
29#include <codadir.h>
30#include <srv.h>
31#include <vice.h>
32
33#ifdef __cplusplus
34}
35#endif __cplusplus
36#include "cvnode.h"
37
38#define f_sid u.file.sid
39#define f_sinode u.file.sinode
40#define f_finode u.file.finode
41#define f_tinode u.file.tinode
42#define f_tlength u.file.tlength
43#define d_inodemod u.dir.inodemod
44#define d_cinode u.dir.cinode
45#define d_needsres u.dir.needsres
46#define d_needslogpurge u.dir.purgelog
47#define d_needslogtrunc u.dir.trunclog
48#define d_reintupdate u.dir.rupdate
49#define d_reintstale u.dir.rstale
50
51struct objlist {
53}
54
55/* The data structure we want here is a binary search tree,
56 * but we use a list instead. -JJK */
57struct obj {
59 ViceFid obj_fid;
61 olist obj_sl; /* list of spooled vmres log records */
62 olist obj_rsl; /* list of spooled rvm log records */
63 union {
64 struct {
65 ViceStoreId sid; /* sid of LAST data store (used to avoid multiple
66 bulk transfers) */
67 Inode sinode; /* inode to dec on success */
68 Inode finode; /* inode to dec on failure */
69 Inode tinode; /* inode to trunc on success */
70 unsigned tlength; /* length to trunc t_inode to (on success) */
72 struct {
73 PDirInode cinode; /* cloned inode (in RVM) */
74 int inodemod; /* inode or pages modified */
75 int needsres; /* does directory need to be resolved at end of
76 reintegration? */
77 int purgelog; /* should directory log be purged */
78 int trunclog; /* should log be truncated */
79 unsigned rupdate : 1; /* was directory updated during
80 reintegration */
81 unsigned rstale : 1; /* reintegration: is client's directory
82 version info stale? */
83 } dir;
85};
86
87#endif /* !_VICE_VLIST_H_ */
Definition: olist.h:47
unsigned tlength
Definition: objlist.h:70
int inodemod
Definition: objlist.h:74
int purgelog
Definition: objlist.h:77
olist obj_sl
Definition: objlist.h:61
int needsres
Definition: objlist.h:75
olist obj_rsl
Definition: objlist.h:62
struct objlist obj_chain
Inode tinode
Definition: objlist.h:69
ViceFid obj_fid
Definition: objlist.h:59
struct @31::@32 file
struct @31::@33 dir
ViceStoreId sid
Definition: objlist.h:65
union @31 obj_u
int trunclog
Definition: objlist.h:78
Inode finode
Definition: objlist.h:68
PDirInode cinode
Definition: objlist.h:73
Vnode * obj_vptr
Definition: objlist.h:60
unsigned rstale
Definition: objlist.h:81
Inode sinode
Definition: objlist.h:67
unsigned rupdate
Definition: objlist.h:79
Definition: codadir.h:173
Definition: cvnode.h:155
Definition: dllist.h:30
Definition: objlist.h:51
struct dllist_head objl_lh
Definition: objlist.h:52
bit32 Inode
Definition: voltypes.h:61