Coda Distributed File System
recov.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 none currently
16
17#*/
18
19/*
20 * Routines for accessing volume abstractions in recoverable storage
21 */
22
23#ifndef _RECOV_H_
24#define _RECOV_H_ 1
25
26#include <volume.h>
27#include <coda_tsa.h>
28
29#define HASHTABLESIZE 512 /* Number of buckets in volume hash table */
30
32
33int NewVolHeader(struct VolumeHeader *header, Error *err) REQUIRES_TRANSACTION;
36int ExtractVolHeader(VolumeId volid, struct VolumeHeader *header);
37int VolHeaderByIndex(int index, struct VolumeHeader *header);
38void CheckVolData(Error *ec, int volindex);
39void CheckSmallVnodeHeader(Error *ec, int volindex);
40void CheckLargeVnodeHeader(Error *ec, int volindex);
41int ExtractVnode(int, int, VnodeId, Unique_t, VnodeDiskObject *);
42int ReplaceVnode(int, int, VnodeId, Unique_t,
44void GrowVnodes(VolumeId volid, int vclass,
45 unsigned short newsize) REQUIRES_TRANSACTION;
46void NewVolDiskInfo(Error *ec, int volindex,
48int VolDiskInfoById(Error *ec, VolumeId volid, VolumeDiskData *vol);
49void ExtractVolDiskInfo(Error *ec, int volindex, VolumeDiskData *vol);
50void ReplaceVolDiskInfo(Error *ec, int volindex,
53int ActiveVnodes(int volindex, int vclass);
54int AllocatedVnodes(int volindex, int vclass);
55int AvailVnode(int volindex, int vclass, VnodeId vnodeindex, Unique_t = 0);
56int GetVolType(Error *ec, VolumeId volid);
57void GetVolPartition(Error *, VolumeId, int, char partition[V_MAXPARTNAMELEN]);
60VolumeId VGetMaxVolumeId();
61void VSetMaxVolumeId(VolumeId newid) REQUIRES_TRANSACTION;
62
63#endif /* _RECOV_H_ */
Definition: rec_smolist.h:65
#define REQUIRES_TRANSACTION
Definition: coda_tsa.h:107
#define EXCLUDES_TRANSACTION
Definition: coda_tsa.h:108
partition
Definition: volusage.py:25
int DeleteRvmVolume(unsigned int, Device) EXCLUDES_TRANSACTION
Definition: recova.cc:247
int VolDiskInfoById(Error *ec, VolumeId volid, VolumeDiskData *vol)
Definition: recovb.cc:398
VnodeDiskObject * FindVnode(rec_smolist *, Unique_t)
Definition: recovb.cc:452
int AllocatedVnodes(int volindex, int vclass)
Definition: recovc.cc:250
int coda_init() EXCLUDES_TRANSACTION
Definition: recovc.cc:139
void GrowVnodes(VolumeId volid, int vclass, unsigned short newsize) REQUIRES_TRANSACTION
Definition: recovc.cc:343
void CheckLargeVnodeHeader(Error *ec, int volindex)
int ExtractVolHeader(VolumeId volid, struct VolumeHeader *header)
Definition: recova.cc:168
int ReplaceVnode(int, int, VnodeId, Unique_t, VnodeDiskObject *) REQUIRES_TRANSACTION
Definition: recovb.cc:246
void ReplaceVolDiskInfo(Error *ec, int volindex, VolumeDiskData *vol) REQUIRES_TRANSACTION
Definition: recovb.cc:419
void GetVolPartition(Error *, VolumeId, int, char partition[V_MAXPARTNAMELEN])
Definition: recovc.cc:276
void CheckVolData(Error *ec, int volindex)
Definition: recovc.cc:197
void VSetMaxVolumeId(VolumeId newid) REQUIRES_TRANSACTION
Definition: recovc.cc:332
void NewVolDiskInfo(Error *ec, int volindex, VolumeDiskData *vol) REQUIRES_TRANSACTION
Definition: recovb.cc:385
VolumeId VGetMaxVolumeId()
Definition: recovc.cc:323
int ActiveVnodes(int volindex, int vclass)
Definition: recovc.cc:225
void SetupVolCache()
int NewVolHeader(struct VolumeHeader *header, Error *err) REQUIRES_TRANSACTION
Definition: recova.cc:77
void ExtractVolDiskInfo(Error *ec, int volindex, VolumeDiskData *vol)
Definition: recovc.cc:425
int DeleteVolume(Volume *vp) EXCLUDES_TRANSACTION
Definition: recova.cc:211
int VolHeaderByIndex(int index, struct VolumeHeader *header)
Definition: recova.cc:180
void CheckSmallVnodeHeader(Error *ec, int volindex)
int GetVolType(Error *ec, VolumeId volid)
VolumeId VAllocateVolumeId(Error *ec) REQUIRES_TRANSACTION
Definition: recovc.cc:301
int AvailVnode(int volindex, int vclass, VnodeId vnodeindex, Unique_t=0)
Definition: recovc.cc:457
int ExtractVnode(int, int, VnodeId, Unique_t, VnodeDiskObject *)
Definition: recovb.cc:72
Definition: cvnode.h:98
Definition: volume.h:108
Definition: volume.h:92
Definition: volume.h:234
bit32 Device
Definition: voltypes.h:60
bit32 Error
Definition: voltypes.h:62