summaryrefslogtreecommitdiff
path: root/src/myriadfs.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/myriadfs.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/myriadfs.h b/src/myriadfs.h
index 687584b..42a3493 100644
--- a/src/myriadfs.h
+++ b/src/myriadfs.h
@@ -1,13 +1,20 @@
1#ifndef MYRIAD_FS_H 1#ifndef MYRIAD_FS_H
2#define MYRIAD_FS_H 2#define MYRIAD_FS_H
3 3
4#include "bu/myriad.h"
5
4namespace Bu 6namespace Bu
5{ 7{
8 class Stream;
9
10 subExceptionDecl( MyriadFsException );
11
6 /** 12 /**
7 * A POSIX compliant, node based filesystem built on top of Myriad. 13 * A POSIX compliant, node based filesystem built on top of Myriad.
8 * 14 *
15 * A header is placed into stream 1.
9 * Header format: 16 * Header format:
10 * int32_t iMagicHeader 17 * int32_t iMagicHeader (A7188B39)
11 * int8_t iVersion (1) 18 * int8_t iVersion (1)
12 * int32_t iNodeSize 19 * int32_t iNodeSize
13 * int32_t iNumNodes 20 * int32_t iNumNodes
@@ -17,6 +24,11 @@ namespace Bu
17 * int32_t iInode 24 * int32_t iInode
18 * int32_t iPosition 25 * int32_t iPosition
19 * 26 *
27 * The node headers or inode structures have a base size of 22 bytes.
28 * Everything else in the block is used for the name. I.e. if you have
29 * a blocksize of 512 bytes then you wind up with a max name size of
30 * 512-22=490 characters, or a blocksize of 256 gives you 234 chraacters
31 * as a max. The node headers are all stored in stream 2.
20 * Basic node header format: 32 * Basic node header format:
21 * int32_t iUser 33 * int32_t iUser
22 * int32_t iGroup 34 * int32_t iGroup
@@ -30,8 +42,12 @@ namespace Bu
30 class MyriadFs 42 class MyriadFs
31 { 43 {
32 public: 44 public:
33 MyriadFs(); 45 MyriadFs( Bu::Stream &rStore, int iBlockSize=512 );
34 virtual ~MyriadFs(); 46 virtual ~MyriadFs();
47
48 private:
49 Bu::Stream &rStore;
50 Bu::Myriad mStore;
35 }; 51 };
36}; 52};
37 53