| // On-disk file system format. | |
| // Both the kernel and user programs use this header file. | |
| // Disk layout: | |
| // [ boot block | super block | log | inode blocks | | |
| // free bit map | data blocks] | |
| // | |
| // mkfs computes the super block and builds an initial file system. The | |
| // super block describes the disk layout: | |
| struct superblock { | |
| uint size; // Size of file system image (blocks) | |
| uint nblocks; // Number of data blocks | |
| uint ninodes; // Number of inodes. | |
| uint nlog; // Number of log blocks | |
| uint logstart; // Block number of first log block | |
| uint inodestart; // Block number of first inode block | |
| uint bmapstart; // Block number of first free map block | |
| }; | |
| // On-disk inode structure | |
| struct dinode { | |
| short type; // File type | |
| short major; // Major device number (T_DEV only) | |
| short minor; // Minor device number (T_DEV only) | |
| short nlink; // Number of links to inode in file system | |
| uint size; // Size of file (bytes) | |
| uint addrs[NDIRECT+1]; // Data block addresses | |
| }; | |
| // Inodes per block. | |
| // Block containing inode i | |
| // Bitmap bits per block | |
| // Block of free map containing bit for block b | |
| // Directory is a file containing a sequence of dirent structures. | |
| struct dirent { | |
| ushort inum; | |
| char name[DIRSIZ]; | |
| }; | |
Xet Storage Details
- Size:
- 1.73 kB
- Xet hash:
- f7f841618759251a4c8110a5041abc683690ccb0b15ced30fcc01ba618b4a12a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.