Coda Distributed File System
volume.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 8
5
6 Copyright (c) 1987-2021 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
16#*/
17
18/*
19 IBM COPYRIGHT NOTICE
20
21 Copyright (C) 1986
22 International Business Machines Corporation
23 All Rights Reserved
24
25This file contains some code identical to or derived from the 1986
26version of the Andrew File System ("AFS"), which is owned by the IBM
27Corporation. This code is provided "AS IS" and IBM does not warrant
28that it is free of infringement of any intellectual rights of any
29third party. IBM disclaims liability of any kind for any damages
30whatsoever resulting directly or indirectly from use of this software
31or of any derivative work. Carnegie Mellon University has obtained
32permission to modify, distribute and sublicense this code, which is
33based on Version 2 of AFS and does not contain the features and
34enhancements that are part of Version 3 of AFS. Version 3 of AFS is
35commercially available and supported by Transarc Corporation,
36Pittsburgh, PA.
37
38*/
39
40#ifndef VOLUME_INCLUDED
41#define VOLUME_INCLUDED 1
42
43#include <recov_vollog.h>
44#include <vice.h>
45#include <dllist.h>
46#include <partition.h>
47#include "voldefs.h"
48
49#define VolumeWriteable(vp) \
50 (V_type(vp) == readwriteVolume || V_type(vp) == nonReplicatedVolume)
51
52#define FSTAG 84597 /* Unique tag for fileserver lwp rocks */
53
54/* volume flags indicating which type of resolution is turned on */
55//#define VMRES 1
56#define RVMRES 4
57
58typedef bit32 FileOffset; /* Offset in this file */
59typedef enum
60{
66
67struct versionStamp { /* Version stamp for critical volume files */
68 bit32 magic; /* Magic number */
69 bit32 version; /* Version number of this file, or software that created
70 this file */
71};
72
73/* Magic numbers and version stamps for each type of file */
74#define VOLUMEHEADERMAGIC 0x88a1bb3c
75#define VOLUMEINFOMAGIC 0x78a1b2c5
76/*#define SMALLINDEXMAGIC 0x99776655 */
77/*#define LARGEINDEXMAGIC 0x88664433 */
78#define MOUNTMAGIC 0x9a8b7c6d
79#define ACLMAGIC 0x88877712
80
81#define VOLUMEHEADERVERSION 1
82#define VOLUMEINFOVERSION 1
83#define SMALLINDEXVERSION 1
84#define LARGEINDEXVERSION 1
85#define MOUNTVERSION 1
86#define ACLVERSION 1
87
88#define MAXVOLS_PER_PARTITION 1000 /* Max number of volumes per partition */
89
90/* Volume header. This used to be the contents of the named file representing
91 the volume; now stored in recoverable storage. Read-only by the file server! */
93 struct versionStamp stamp; /* Must be first field */
94 VolumeId id; /* Volume number */
95 VolumeId parent; /* Read-write volume number (or this volume if readwrite) */
96 int type; /* volume type: RWVOL, ROVOL, BACKVOL */
97};
98
99/* A vnode index file header */
102};
103
104/*
105VolumeDiskData:Volume administrative data stored in RVM.
106*/
107
108typedef struct VolumeDiskData {
109 struct versionStamp stamp; /* Must be first field */
110 VolumeId id; /* Volume id--unique over all systems */
111 /* filesystem partition on which volume data resides, and unofficial name
112 * for the volume */
113 char partition[V_MAXPARTNAMELEN];
114 char name[V_MAXVOLNAMELEN];
115 byte inUse; /* Volume is being used (perhaps it is online), or the system
116 crashed while it was used */
117 byte inService; /* Volume in service, not necessarily on line This bit is
118 set by an operator/system programmer. Manually taking a
119 volume offline always clears the inService bit. Taking
120 it out of service also takes it offline */
121 byte blessed; /* Volume is administratively blessed with the ability to go
122 on line. Set by a system administrator. Clearing this bit
123 will take the volume offline */
124 byte needsSalvaged; /* Volume needs salvaged--an unrecoverable error
125 occurred to the volume. Note: a volume may still
126 require salvage even if this flag isn't set--e.g. if
127 a system crash occurred while the volume was on
128 line. */
129 bit32 uniquifier; /* Next vnode uniquifier for this volume */
130 int type; /* RWVOL, ROVOL, BACKVOL */
131 VolumeId parentId; /* Id of parent, if type==readonly */
132 VolumeId groupId; /* Id of replication group, or 0 if not replicated */
133 VolumeId cloneId; /* Latest read-only clone, if type==readwrite, 0 if the
134 volume has never been cloned. Note: the indicated
135 volume does not necessarily exist (it may have been
136 deleted since cloning). */
137 VolumeId backupId; /* Latest backup copy of this read write volume */
138 VolumeId restoredFromId; /* The id in the dump this volume was restored
139 from--used simply to make sure that an
140 incremental dump is not restored on top of
141 something inappropriate: Note: this field
142 itself is NEVER dumped!!! */
143 byte needsCallback; /* Set by the salvager if anything was changed about
144 the volume. Note: this is not set by
145 clone/makebackups when setting the copy-on-write
146 flag in directories; this flag is not seen by the
147 clients. */
148#define DESTROY_ME 0xD3
149 byte destroyMe; /* If this is set to DESTROY_ME, then the salvager should
150 destroy this volume; it is bogus (left over from
151 an aborted volume move, for example). Note: if this
152 flag is on, then inService should be OFF--only the
153 salvager checks this flag */
154#define DONT_SALVAGE 0xE5
155 byte dontSalvage; /* If this is on, then don't bother salvaging this
156 volume */
158
159 ViceVersionVector versionvector; /* Coda version vector for this volume */
160 int ResOn; /* Flag to turn on resolution */
162
163 /* Administrative stuff */
164 int maxquota; /* Quota maximum, 1K blocks */
165 int minquota; /* Quota minimum, 1K blocks */
166 int maxfiles; /* Maximum number of files (i.e. inodes) */
167 bit32 accountNumber; /* Uninterpreted account number */
168 bit32 owner; /* The person administratively responsible
169 for this volume */
170 int reserved2[8]; /* Other administrative constraints */
171
172 /* Resource usage & statistics */
173 int filecount; /* Actual number of files */
174 bit16 linkcount; /* number of links */
175 int diskused; /* Actual disk space used, 1K blocks */
176 int dayUse; /* Metric for today's usage of this volume so far */
177 int weekUse[7]; /* Usage of the volume for the last week. weekUse[0] is
178 for most recent complete 24 hour period of measurement;
179 week[6] is 7 days ago */
180 Date_t dayUseDate; /* Date the dayUse statistics refer to; the week use
181 stats are the preceding 7 days */
182 int reserved3[11]; /* Other stats here */
183
184 /* Server supplied dates */
185 Date_t creationDate; /* Creation date for a read/write volume; cloning date
186 for original copy of a readonly volume (readonly
187 replicas volumes have the same creation date) */
188 Date_t accessDate; /* Last access time by a user, large granularity */
189 Date_t updateDate; /* Last modification by user */
190 Date_t expirationDate; /* 0 if it never expires */
191 Date_t backupDate; /* last time a backup clone was taken */
192
193 /* Time that this copy of this volume was made. NEVER backed up.
194 This field is only set when the copy is created */
195 Date_t copyDate;
196 recov_vol_log *log; /* Recoverable resolution log for this volume */
198
199 /* messages */
200#define VMSGSIZE 128
201 char offlineMessage[VMSGSIZE]; /* Why the volume is offline */
202 char motd[VMSGSIZE]; /* Volume "message of the day" */
203
204 char pad[4]; /* make size multiple of 4 */
205
207
208/* Debugging routine (Satya, May 2004) (vol-debug.c) */
209void PrintVolumeDiskData(FILE *, VolumeDiskData *);
210
211/**************************************/
212/* Memory resident volume information */
213/**************************************/
214
215/*
216VM bitmap that shows which vnodes are allocated
217 */
219 byte *bitmap; /* Index bitmap */
220 unsigned short bitmapSize; /* length of bitmap, in bytes */
221 unsigned short bitmapOffset; /* Which byte address of the
222 first long to start search
223 from in bitmap */
224};
225
226/*
227 */
228struct VolLock {
229 struct Lock VolumeLock; /* Prevent mutations during backup/clone */
230 unsigned IPAddress;
231};
232
233/* VM structure maintained per volume */
234struct Volume {
235 struct Volume *hashNext; /* Next in hash resolution table */
236 VolumeId hashid; /* Volume number -- for hash table lookup */
237 struct volHeader *header; /* Cached disk data */
238 struct DiskPartition *partition; /* Information about the Unix partition */
239 int vol_index; /* index of this volume in recoverable volume array */
241 Unique_t nextVnodeUnique; /* Derived originally from volume uniquifier.
242 This is the actual next version number to
243 assign; the uniquifier is bumped by 50 and
244 and written to disk every 50 file creates
245 If the volume is shutdown gracefully, the
246 uniquifier should be rewritten with the
247 value nextVnodeVersion*/
248 bit16 vnodeHashOffset; /* Computed by HashOffset function in cvnode.h.
249 Assigned to the volume when initialized.
250 Added to vnode number for hash table index */
251 byte shuttingDown; /* This volume is going to be detached */
252 byte goingOffline; /* This volume is going offline */
253 bit16 cacheCheck; /* Online sequence number to be used
254 to invalidate vnode cache entries
255 that stayed around while a volume
256 was offline */
257 short nUsers; /* Number of users of this volume header */
258 int32_t specialStatus; /* An error code to return on VGetVolume: the
259 volume is unavailable for the reason quoted,
260 currently VBUSY or VMOVED */
261 int32_t updateTime; /* Time that this volume was put on the updated
262 volume list--the list of volumes that will be
263 salvaged should the file server crash */
264 struct Lock lock; /* internal lock */
265 PROCESS writer; /* process id having write lock */
266 struct VolLock VolLock; /* Volume level lock for backup/clone */
267#define VNREINTEGRATORS 8 /* List size increment */
268 int nReintegrators; /* Number of clients that have successfully
269 reintegrated with this volume. */
270 ViceStoreId *reintegrators; /* List of identifiers representing the last
271 record reintegrated for each client. Could
272 be moved to recoverable store if necessary.
273 */
274};
275typedef struct Volume Volume;
276
277/*
278 Cached version of the volume's administrative data
279*/
280struct volHeader {
281 struct volHeader *prev, *next; /* LRU pointers */
282 VolumeDiskData diskstuff; /* General volume info read from disk */
283 Volume *back; /* back pointer to current volume structure */
284};
285
286/* These macros are used to export fields within the volume header.
287 This was added to facilitate changing the actual representation */
288
289#define V_partition(vp) ((vp)->partition)
290#define V_device(vp) (V_partition(vp)->device)
291#define V_inode(vp) ((vp)->inode)
292/*#define V_diskDataInode(vp) ((vp)->diskDataInode) */
293#define V_vnodeIndex(vp) ((vp)->vnIndex)
294#define V_nextVnodeUnique(vp) ((vp)->nextVnodeUnique)
295#define V_volumeindex(vp) ((vp)->vol_index)
296#define V_lock(vp) ((vp)->lock)
297#define V_writer(vp) ((vp)->writer)
298#define V_VolLock(vp) (((vp)->VolLock))
299
300/* N.B. V_id must be this, rather than vp->id, or some programs will
301 break, probably */
302#define V_stamp(vp) ((vp)->header->diskstuff.stamp)
303#define V_partname(vp) ((vp)->header->diskstuff.partition)
304#define V_id(vp) ((vp)->header->diskstuff.id)
305#define V_name(vp) ((vp)->header->diskstuff.name)
306#define V_inUse(vp) ((vp)->header->diskstuff.inUse)
307#define V_inService(vp) ((vp)->header->diskstuff.inService)
308#define V_blessed(vp) ((vp)->header->diskstuff.blessed)
309#define V_needsSalvaged(vp) ((vp)->header->diskstuff.needsSalvaged)
310#define V_uniquifier(vp) ((vp)->header->diskstuff.uniquifier)
311#define V_type(vp) ((vp)->header->diskstuff.type)
312#define V_parentId(vp) ((vp)->header->diskstuff.parentId)
313#define V_groupId(vp) ((vp)->header->diskstuff.groupId)
314#define V_cloneId(vp) ((vp)->header->diskstuff.cloneId)
315#define V_backupId(vp) ((vp)->header->diskstuff.backupId)
316#define V_restoredFromId(vp) ((vp)->header->diskstuff.restoredFromId)
317#define V_needsCallback(vp) ((vp)->header->diskstuff.needsCallback)
318#define V_destroyMe(vp) ((vp)->header->diskstuff.destroyMe)
319#define V_versionvector(vp) ((vp)->header->diskstuff.versionvector)
320#define V_dontSalvage(vp) ((vp)->header->diskstuff.dontSalvage)
321#define V_maxquota(vp) ((vp)->header->diskstuff.maxquota)
322#define V_minquota(vp) ((vp)->header->diskstuff.minquota)
323#define V_maxfiles(vp) ((vp)->header->diskstuff.maxfiles)
324#define V_accountNumber(vp) ((vp)->header->diskstuff.accountNumber)
325#define V_owner(vp) ((vp)->header->diskstuff.owner)
326#define V_filecount(vp) ((vp)->header->diskstuff.filecount)
327#define V_linkcount(vp) ((vp)->header->diskstuff.linkcount)
328#define V_diskused(vp) ((vp)->header->diskstuff.diskused)
329#define V_dayUse(vp) ((vp)->header->diskstuff.dayUse)
330#define V_weekUse(vp) ((vp)->header->diskstuff.weekUse)
331#define V_dayUseDate(vp) ((vp)->header->diskstuff.dayUseDate)
332#define V_creationDate(vp) ((vp)->header->diskstuff.creationDate)
333#define V_accessDate(vp) ((vp)->header->diskstuff.accessDate)
334#define V_updateDate(vp) ((vp)->header->diskstuff.updateDate)
335#define V_expirationDate(vp) ((vp)->header->diskstuff.expirationDate)
336#define V_backupDate(vp) ((vp)->header->diskstuff.backupDate)
337#define V_copyDate(vp) ((vp)->header->diskstuff.copyDate)
338#define V_offlineMessage(vp) ((vp)->header->diskstuff.offlineMessage)
339#define V_motd(vp) ((vp)->header->diskstuff.motd)
340#define V_disk(vp) ((vp)->header->diskstuff)
341#define V_RVMResOn(vp) ((vp)->header->diskstuff.ResOn & RVMRES)
342#define V_VolLog(vp) ((vp)->header->diskstuff.log)
343
344extern char *ThisHost; /* This machine's hostname */
345extern uint8_t ThisServerId; /* this server id, as found in
346 /vice/db/servers */
347extern bit32 HostAddress[]; /* Assume host addresses are 32 bits */
348extern int VInit; /* Set to 1 when the volume package is
349 initialized */
350extern int HInit; /* Set to 1 when the volid hash table
351 is initialized */
352extern const char *VSalvageMessage; /* Common message used when the volume goes
353 off line */
354extern int VolDebugLevel; /* Controls level of debugging information */
355extern int AllowResolution; /* global flag to turn on dir. resolution */
356void VInitVolumePackage(int nLargeVnodes, int nSmallVnodes,
357 int DoSalvage) EXCLUDES_TRANSACTION;
359void VInitServerList(const char *host);
360int VConnectFS();
361void VDisconnectFS();
363void VListVolumes(char **buf, unsigned int *buflen) EXCLUDES_TRANSACTION;
364void VGetVolumeInfo(Error *ec, char *key, VolumeInfo *info);
365const char *VGetVolumeLocation(VolumeId vid);
366Volume *VGetVolume(Error *ec, VolumeId volumeId);
367void VPutVolume(Volume *vp);
368Volume *VAttachVolume(Error *ec, VolumeId volumeId,
369 int mode) REQUIRES_TRANSACTION;
372int VAllocBitmapEntry(Error *ec, Volume *vp, struct vnodeIndex *index,
373 int stride, int ix, int count);
374int VAllocBitmapEntry(Error *ec, Volume *vp, struct vnodeIndex *index,
375 VnodeId vnode);
376void VFreeBitMapEntry(Error *ec, struct vnodeIndex *index, int bitNumber);
377int VolumeNumber(char *name);
378char *VolumeExternalName(VolumeId volumeId);
379Volume *VAttachVolumeById(Error *ec, char *partition, VolumeId volid,
380 int mode) REQUIRES_TRANSACTION;
381void VOffline(Volume *vp, const char *message) REQUIRES_TRANSACTION;
383void VPurgeVolume(Volume *vp);
386void SetVolDebugLevel(int);
387void FreeVolume(Volume *vp);
390void InitLRU(int howmany);
391
392/* Naive formula relating number of file size to number of 1K blocks in file */
393/* Note: we charge 1 block for 0 length files so the user can't store
394 an inifite number of them; for most files, we give him the inode, vnode,
395 and indirect block overhead, for FREE! */
396#define nBlocks(bytes) ((bytes) == 0 ? 1 : ((bytes) + 1023) / 1024)
397
398/* Modes of attachment, for VAttachVolume[ByName] to convey to the
399 file server */
400/* Absolutely no updates will be done to the volume */
401#define V_READONLY 1
402
403/* Cloning the volume: if it is read/write, then directory version numbers will
404 * change. Header will be updated. If the volume is read-only, the file
405 * server may continue to server it; it may also continue to server it in
406 * read/write mode if the writes are deferred */
407#define V_CLONE 2
408
409/* General update or volume purge is possible. Volume must go offline */
410#define V_UPDATE 3
411
412/* A dump of the volume is requested; the volume can be served read-only during
413 * this time */
414#define V_DUMP 4
415
416/* Secret attach of the volume. This is used to attach a volume which the file
417 * server doesn't know about--and which it shouldn't know about yet, since the
418 * volume has just been created and is somewhat bogus. Required to make sure
419 * that a file server never knows about more than one copy of the same
420 * volume--when a volume is moved from one partition to another on a single
421 * server */
422#define V_SECRETLY 5
423
424/* partition disk usage related routines */
425
426/* exported routines */
427Error VAdjustDiskUsage(Volume *vp, int blocks);
428Error VCheckDiskUsage(Volume *vp, int blocks);
429void PutVolObj(Volume **volptr, int LockLevel, int Dequeue);
430int GetVolObj(VolumeId Vid, Volume **volptr, int LockLevel, int Enque,
431 unsigned LockerAddress) EXCLUDES_TRANSACTION;
432
433#endif /* VOLUME_INCLUDED */
Definition: recov_vollog.h:47
int int32_t
Definition: coda.h:104
unsigned char uint8_t
Definition: coda.h:101
#define REQUIRES_TRANSACTION
Definition: coda_tsa.h:107
#define EXCLUDES_TRANSACTION
Definition: coda_tsa.h:108
#define nVNODECLASSES
Definition: cvnode.h:70
name
Definition: pwdtopdbtool.py:40
partition
Definition: volusage.py:25
Definition: partition.h:40
Definition: volume.h:100
struct versionStamp stamp
Definition: volume.h:101
Definition: lock.h:68
Definition: volume.h:228
unsigned IPAddress
Definition: volume.h:230
struct Lock VolumeLock
Definition: volume.h:229
Definition: volume.h:108
int weekUse[7]
Definition: volume.h:177
Date_t backupDate
Definition: volume.h:191
VolumeId id
Definition: volume.h:110
byte inUse
Definition: volume.h:115
char partition[V_MAXPARTNAMELEN]
Definition: volume.h:113
int reserved3[11]
Definition: volume.h:182
byte inService
Definition: volume.h:117
char offlineMessage[VMSGSIZE]
Definition: volume.h:201
byte reserveb3
Definition: volume.h:157
Date_t copyDate
Definition: volume.h:195
VolumeId cloneId
Definition: volume.h:133
Date_t dayUseDate
Definition: volume.h:180
VolumeId parentId
Definition: volume.h:131
int maxfiles
Definition: volume.h:166
int reserved2[8]
Definition: volume.h:170
bit32 reserved1[5]
Definition: volume.h:161
bit32 uniquifier
Definition: volume.h:129
bit32 accountNumber
Definition: volume.h:167
bit32 owner
Definition: volume.h:168
char motd[VMSGSIZE]
Definition: volume.h:202
byte needsSalvaged
Definition: volume.h:124
byte dontSalvage
Definition: volume.h:155
char name[V_MAXVOLNAMELEN]
Definition: volume.h:114
byte blessed
Definition: volume.h:121
ViceVersionVector versionvector
Definition: volume.h:159
Date_t updateDate
Definition: volume.h:189
byte needsCallback
Definition: volume.h:143
Date_t accessDate
Definition: volume.h:188
VolumeId restoredFromId
Definition: volume.h:138
Date_t creationDate
Definition: volume.h:185
struct versionStamp stamp
Definition: volume.h:109
bit16 linkcount
Definition: volume.h:174
char pad[4]
Definition: volume.h:204
int maxquota
Definition: volume.h:164
int ResOn
Definition: volume.h:160
Date_t expirationDate
Definition: volume.h:190
int diskused
Definition: volume.h:175
int minquota
Definition: volume.h:165
VolumeId backupId
Definition: volume.h:137
VolumeId groupId
Definition: volume.h:132
recov_vol_log * log
Definition: volume.h:196
int filecount
Definition: volume.h:173
bit32 reserved4[7]
Definition: volume.h:197
int type
Definition: volume.h:130
byte destroyMe
Definition: volume.h:149
int dayUse
Definition: volume.h:176
Definition: volume.h:92
int type
Definition: volume.h:96
struct versionStamp stamp
Definition: volume.h:93
VolumeId id
Definition: volume.h:94
VolumeId parent
Definition: volume.h:95
Definition: volume.h:234
ViceStoreId * reintegrators
Definition: volume.h:270
int32_t specialStatus
Definition: volume.h:258
struct vnodeIndex vnIndex[nVNODECLASSES]
Definition: volume.h:240
bit16 cacheCheck
Definition: volume.h:253
byte shuttingDown
Definition: volume.h:251
short nUsers
Definition: volume.h:257
PROCESS writer
Definition: volume.h:265
struct Lock lock
Definition: volume.h:264
struct Volume * hashNext
Definition: volume.h:235
int32_t updateTime
Definition: volume.h:261
Unique_t nextVnodeUnique
Definition: volume.h:241
int nReintegrators
Definition: volume.h:268
int vol_index
Definition: volume.h:239
struct DiskPartition * partition
Definition: volume.h:238
VolumeId hashid
Definition: volume.h:236
byte goingOffline
Definition: volume.h:252
struct volHeader * header
Definition: volume.h:237
bit16 vnodeHashOffset
Definition: volume.h:248
Definition: lwp.private_pt.h:33
Definition: volume.h:67
bit32 magic
Definition: volume.h:68
bit32 version
Definition: volume.h:69
Definition: volume.h:218
unsigned short bitmapSize
Definition: volume.h:220
unsigned short bitmapOffset
Definition: volume.h:221
byte * bitmap
Definition: volume.h:219
Definition: volume.h:280
struct volHeader * next
Definition: volume.h:281
Volume * back
Definition: volume.h:283
struct volHeader * prev
Definition: volume.h:281
VolumeDiskData diskstuff
Definition: volume.h:282
LockLevel
Definition: venus.private.h:170
uint16_t bit16
Definition: voltypes.h:57
uint32_t bit32
Definition: voltypes.h:56
bit32 Error
Definition: voltypes.h:62
int AllowResolution
Definition: dummy.cc:35
void VOffline(Volume *vp, const char *message) REQUIRES_TRANSACTION
Definition: volume.cc:1213
void FreeVolume(Volume *vp)
Definition: volume.cc:1483
void VForceOffline(Volume *vp) REQUIRES_TRANSACTION
Definition: volume.cc:1188
Volume * VAttachVolume(Error *ec, VolumeId volumeId, int mode) REQUIRES_TRANSACTION
Definition: volume.cc:1033
void VListVolumes(char **buf, unsigned int *buflen) EXCLUDES_TRANSACTION
Definition: volume.cc:638
void PutVolObj(Volume **volptr, int LockLevel, int Dequeue)
Definition: volume.cc:1991
const char * VSalvageMessage
Definition: volume.cc:106
int VConnectFS()
Definition: volume.cc:346
void VGetVolumeInfo(Error *ec, char *key, VolumeInfo *info)
Definition: volume.cc:500
int HInit
Definition: volume.cc:105
void PrintVolumeDiskData(FILE *, VolumeDiskData *)
Definition: vol-debug.cc:41
void VDetachVolume(Error *ec, Volume *vp) REQUIRES_TRANSACTION
Definition: volume.cc:1257
int VolDebugLevel
Definition: util.c:71
void SetVolDebugLevel(int)
Definition: volume.cc:1897
char * ThisHost
Definition: volume.cc:101
int VInitVolUtil(ProgramType pt)
Definition: volume.cc:165
int GetVolObj(VolumeId Vid, Volume **volptr, int LockLevel, int Enque, unsigned LockerAddress) EXCLUDES_TRANSACTION
Definition: volume.cc:1933
void VFreeBitMapEntry(Error *ec, struct vnodeIndex *index, int bitNumber)
Definition: volume.cc:1435
int VolumeNumber(char *name)
Definition: volume.cc:1568
Volume * VAttachVolumeById(Error *ec, char *partition, VolumeId volid, int mode) REQUIRES_TRANSACTION
Definition: volume.cc:817
struct VolumeDiskData VolumeDiskData
int VAllocBitmapEntry(Error *ec, Volume *vp, struct vnodeIndex *index, int stride, int ix, int count)
Definition: volume.cc:1292
char * VolumeExternalName(VolumeId volumeId)
Definition: volume.cc:1576
Error VCheckDiskUsage(Volume *vp, int blocks)
Definition: volume.cc:1908
void InitLRU(int howmany)
Definition: volume.cc:1731
void VUpdateVolume(Error *ec, Volume *vp) REQUIRES_TRANSACTION
Definition: volume.cc:1452
void PrintVolumesInHashTable()
Definition: volume.cc:1468
void VUCloneVolume(Error *, Volume *, Volume *) EXCLUDES_TRANSACTION
Definition: vol-clone.cc:298
void VDisconnectFS()
Definition: volume.cc:360
void VPutVolume(Volume *vp)
Definition: volume.cc:1148
void DeleteVolumeFromHashTable(Volume *vp)
Definition: volume.cc:1851
void VInitVolumePackage(int nLargeVnodes, int nSmallVnodes, int DoSalvage) EXCLUDES_TRANSACTION
Definition: volume.cc:224
uint8_t ThisServerId
Definition: volume.cc:102
void VPurgeVolume(Volume *vp)
Definition: purge.cc:85
ProgramType
Definition: volume.h:60
@ volumeUtility
Definition: volume.h:62
@ salvager
Definition: volume.h:63
@ fsUtility
Definition: volume.h:64
@ fileServer
Definition: volume.h:61
int VInit
Definition: volume.cc:104
#define VMSGSIZE
Definition: volume.h:200
const char * VGetVolumeLocation(VolumeId vid)
Definition: volume.cc:557
void VSetDiskUsage() EXCLUDES_TRANSACTION
Definition: volume.cc:1624
Error VAdjustDiskUsage(Volume *vp, int blocks)
Definition: volume.cc:1923
Volume * VGetVolume(Error *ec, VolumeId volumeId)
Definition: volume.cc:1062
void VShutdown() EXCLUDES_TRANSACTION
Definition: volume.cc:718
bit32 HostAddress[]
Definition: volume.cc:103
void VInitServerList(const char *host)
Definition: volume.cc:390
bit32 FileOffset
Definition: volume.h:58