c - xv6 operating system - Implementation of triple indirection -


the xv6 mkfs.c file declare variables:

int nblocks = 985; int nlog = logsize; int ninodes = 200; int size = 1024; 

that declaration should work inode have 12 direct blocks , 1 indirect block, don't understand why nblocks defined 985? number of blocks in 1 inode 140 (128 indirect + 12 direct), don't understand 985 came , size of 1024.

if understand part think able change variables support triple indirection.

thanks!

an inode takes 32 bytes on disk (sizeof(struct inode)). when writing inode starts take more space (blocks) on disk.

notice block of code:

bitblocks = size/(512*8) + 1; usedblocks = ninodes / ipb + 3 + bitblocks; ... assert(nblocks + usedblocks + nlog == size); 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -