summaryrefslogtreecommitdiff
path: root/sys/src/cmd/vac/dat.h
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
commite5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch)
treed8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/cmd/vac/dat.h
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/cmd/vac/dat.h')
-rwxr-xr-xsys/src/cmd/vac/dat.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/sys/src/cmd/vac/dat.h b/sys/src/cmd/vac/dat.h
new file mode 100755
index 000000000..000a762a8
--- /dev/null
+++ b/sys/src/cmd/vac/dat.h
@@ -0,0 +1,38 @@
+typedef struct MetaBlock MetaBlock;
+typedef struct MetaEntry MetaEntry;
+
+#define MaxBlock (1UL<<31)
+
+enum {
+ BytesPerEntry = 100, /* estimate of bytes per dir entries - determines number of index entries in the block */
+ FullPercentage = 80, /* don't allocate in block if more than this percentage full */
+ FlushSize = 200, /* number of blocks to flush */
+ DirtyPercentage = 50 /* maximum percentage of dirty blocks */
+};
+
+
+struct MetaEntry
+{
+ uchar *p;
+ ushort size;
+};
+
+struct MetaBlock
+{
+ int maxsize; /* size of block */
+ int size; /* size used */
+ int free; /* free space within used size */
+ int maxindex; /* entries allocated for table */
+ int nindex; /* amount of table used */
+ int unbotch;
+ uchar *buf;
+};
+
+struct VacDirEnum
+{
+ VacFile *file;
+ u32int boff;
+ int i, n;
+ VacDir *buf;
+};
+