sofs19  0.1
FUSE based file system
dal.h
Go to the documentation of this file.
1 
6 #ifndef __SOFS19_DAL__
7 #define __SOFS19_DAL__
8 
9 #include <inttypes.h>
10 
11 #include "superblock.h"
12 #include "inode.h"
13 
14 namespace sofs19
15 {
16 
25  /* ***************************************** */
26 
37  void soOpenDisk(const char *devname);
38 
39  /* ***************************************** */
40 
47  void soCloseDisk();
48 
49  /* ***************************************** */
50  /* ***************************************** */
51 
57  void soOpenSuperBlock();
58 
59  /* ***************************************** */
60 
67  void soCloseSuperBlock();
68 
69  /* ***************************************** */
70 
76  void soSaveSuperBlock();
77 
78  /* ***************************************** */
79 
87  SOSuperBlock *soGetSuperBlockPointer();
88 
89  /* ***************************************** */
90  /* ***************************************** */
91 
97  void soOpenInodeTable();
98 
99  /* ***************************************** */
100 
106  void soCloseInodeTable();
107 
108  /* ***************************************** */
109 
120  int soOpenInode(uint32_t in);
121 
122  /* ***************************************** */
123 
129  void soCheckInodeHandler(int ih, const char *funcname = __FUNCTION__);
130 
131  /* ***************************************** */
132 
142  SOInode *soGetInodePointer(int ih);
143 
144  /* ***************************************** */
145 
153  void soSaveInode(int ih);
154 
155  /* ***************************************** */
156 
165  void soCloseInode(int ih);
166 
167  /* ***************************************** */
168 
174  uint32_t soGetInodeNumber(int ih);
175 
176  /* ***************************************** */
177  /* ***************************************** */
178 
187  bool soCheckInodeAccess(int ih, int access);
188 
189  /* ***************************************** */
190  /* ***************************************** */
191 
198  void soReadDataBlock(uint32_t bn, void *buf);
199 
200  /* ***************************************** */
201 
208  void soWriteDataBlock(uint32_t bn, void *buf);
209 
210  /* ***************************************** */
211 
213  /* ***************************************** */
214 
215 };
216 
217 
218 #endif /* __SOFS19_DAL__ */
sofs19::soGetInodePointer
SOInode * soGetInodePointer(int ih)
get pointer to an open inode
sofs19::soReadDataBlock
void soReadDataBlock(uint32_t bn, void *buf)
Read a block of the data zone.
sofs19::soOpenInodeTable
void soOpenInodeTable()
Open inode table dealer.
sofs19::soGetInodeNumber
uint32_t soGetInodeNumber(int ih)
Return the number of the inode associated to the given handler.
sofs19::soSaveInode
void soSaveInode(int ih)
Save an open inode to disk.
sofs19::soCloseDisk
void soCloseDisk()
Close disk at sofs19 abstraction level.
sofs19::soCloseSuperBlock
void soCloseSuperBlock()
Close the superblock dealer.
sofs19::soGetSuperBlockPointer
SOSuperBlock * soGetSuperBlockPointer()
Get a pointer to the superblock.
sofs19::soOpenDisk
void soOpenDisk(const char *devname)
Open disk at sofs19 abstraction level.
sofs19::soCheckInodeAccess
bool soCheckInodeAccess(int ih, int access)
check an open inode against a requested access
sofs19::soCloseInode
void soCloseInode(int ih)
Close an open inode.
sofs19::soOpenSuperBlock
void soOpenSuperBlock()
Open the superblock dealer.
sofs19::soSaveSuperBlock
void soSaveSuperBlock()
Save superblock to disk.
superblock.h
Definition of the superblock data type.
sofs19::soCheckInodeHandler
void soCheckInodeHandler(int ih, const char *funcname=__FUNCTION__)
Check given handler, throwing an exception in case of error.
sofs19::soWriteDataBlock
void soWriteDataBlock(uint32_t bn, void *buf)
Write a block of the data zone.
sofs19::soCloseInodeTable
void soCloseInodeTable()
Close the inode table dealer.
sofs19::soOpenInode
int soOpenInode(uint32_t in)
open inode
inode.h
Definition of the inode data type.