mirror of
https://github.com/psankar/simplefs.git
synced 2025-07-23 22:15:03 +02:00
Code comments
This commit is contained in:
parent
e0e7618c8e
commit
f2ae6c1536
18
simple.h
18
simple.h
@ -2,9 +2,21 @@
|
||||
#define SIMPLEFS_DEFAULT_BLOCK_SIZE 4096
|
||||
#define SIMPLEFS_FILENAME_MAXLEN 255
|
||||
|
||||
/* Hard-coded inode number for the root directory */
|
||||
const int SIMPLEFS_ROOT_INODE_NUMBER = 1;
|
||||
|
||||
/* The disk block where super block is stored */
|
||||
const int SIMPLEFS_SUPERBLOCK_BLOCK_NUMBER = 0;
|
||||
|
||||
/* The disk block where the inodes are stored */
|
||||
const int SIMPLEFS_INODESTORE_BLOCK_NUMBER = 1;
|
||||
|
||||
/* The disk block where the name+inode_number pairs of the
|
||||
* contents of the root directory are stored */
|
||||
const int SIMPLEFS_ROOTDIR_DATABLOCK_NUMBER = 2;
|
||||
|
||||
/* The name+inode_number pair for each file in a directory.
|
||||
* This gets stored as the data for a directory */
|
||||
struct simplefs_dir_record {
|
||||
char filename[SIMPLEFS_FILENAME_MAXLEN];
|
||||
uint32_t inode_no;
|
||||
@ -31,9 +43,3 @@ struct simplefs_super_block {
|
||||
|
||||
char padding[SIMPLEFS_DEFAULT_BLOCK_SIZE - (4 * sizeof(uint32_t)) - sizeof(struct simplefs_inode)];
|
||||
};
|
||||
|
||||
/*
|
||||
struct simplefs_dir_contents {
|
||||
uint32_t children_count;
|
||||
struct simplefs_dir_record records[];
|
||||
}; */
|
||||
|
Loading…
x
Reference in New Issue
Block a user