From 5c1dfe87cb4021c905529451e5ff7718c6c94b2f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 17 Feb 2011 09:50:30 +0000 Subject: Made some great progress on the MyriadFs spec...it's interesting, a few more decisions to make and we're set. --- src/myriadfs.cpp | 14 +++++++------- src/myriadfs.h | 31 ++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/myriadfs.cpp b/src/myriadfs.cpp index 9f68253..c8d23b6 100644 --- a/src/myriadfs.cpp +++ b/src/myriadfs.cpp @@ -61,15 +61,15 @@ Bu::MyriadFs::MyriadFs( Bu::Stream &rStore, int iBlockSize ) : #endif int32_t iTmp32 = 0; int16_t iTmp16 = 0; - ms.write( &iUser, 4 ); - ms.write( &iGroup, 4 ); - ms.write( &iTmp16, 2 ); - ms.write( &iTmp16, 2 ); + ms.write( &iUser, 4 ); // User + ms.write( &iGroup, 4 ); // Group + ms.write( &iTmp16, 2 ); // Meta? I...don't remember this + ms.write( &iTmp16, 2 ); // Permissions/types iTmp32 = 3; - ms.write( &iTmp32, 4 ); + ms.write( &iTmp32, 4 ); // Stream index iTmp32 = 0; - ms.write( &iTmp32, 4 ); - ms.write( &iTmp16, 2 ); + ms.write( &iTmp32, 4 ); // Parent inode + ms.write( &iTmp16, 2 ); // Name size } // Create inode 0's storage stream. diff --git a/src/myriadfs.h b/src/myriadfs.h index edbdaf5..856137c 100644 --- a/src/myriadfs.h +++ b/src/myriadfs.h @@ -19,6 +19,8 @@ namespace Bu /** * A POSIX compliant, node based filesystem built on top of Myriad. * + * Think about putting this all in one stream, on block boundaries. + * * A header is placed into stream 1. * Header format: * int32_t iMagicHeader (A7188B39) @@ -39,10 +41,13 @@ namespace Bu * Basic node header format: * int32_t iUser * int32_t iGroup - * int16_t iMeta * int16_t iPerms + * int16_t iLinks * int32_t iStreamIndex * int32_t iParentNode + * int64_t iATime + * int64_t iMTime + * int64_t iCTime * int16_t iNameSize * char[iNameSize] sName */ @@ -52,6 +57,30 @@ namespace Bu MyriadFs( Bu::Stream &rStore, int iBlockSize=512 ); virtual ~MyriadFs(); + enum + { + permOthX = 0000001, + permOthW = 0000002, + permOthR = 0000004, + permGrpX = 0000010, + permGrpW = 0000020, + permGrpR = 0000040, + permUsrX = 0000100, + permUsrW = 0000200, + permUsrR = 0000400, + permSticky = 0001000, + permSetGid = 0002000, + permSetUid = 0004000, + typeFifo = 0010000, + typeChrDev = 0020000, + typeDir = 0040000, + typeBlkDev = 0060000, + typeRegFile = 0100000, + typeSymLink = 0120000, + typeSocket = 0140000, + typeMask = 0170000 + } + private: Bu::Stream &rStore; Bu::Myriad mStore; -- cgit v1.2.3