Fix UserFS, support more blocks.
This commit is contained in:
@@ -18,12 +18,13 @@
|
||||
|
||||
// Block size
|
||||
#define BLOCK_SIZE 512
|
||||
#define NR_BIT_BLOCKS 2
|
||||
|
||||
// bits size
|
||||
#define BITS 8
|
||||
|
||||
// Bitmap size of one block
|
||||
#define BITMAP_SIZE (BLOCK_SIZE * BITS)
|
||||
#define BITMAP_SIZE (BLOCK_SIZE * BITS * NR_BIT_BLOCKS)
|
||||
|
||||
// Inode size of one block
|
||||
#define INODE_SIZE (BLOCK_SIZE / sizeof(struct Inode))
|
||||
|
||||
@@ -77,6 +77,7 @@ struct SuperBlock {
|
||||
uint32_t size; // Number of total blocks of file system image
|
||||
uint32_t nblocks; // Number of data blocks
|
||||
uint32_t ninodes; // Number of inodes.
|
||||
uint32_t nbitblocks;
|
||||
};
|
||||
|
||||
// Inode structure
|
||||
|
||||
Reference in New Issue
Block a user