I was wondering if someone could double check my answers to the following question. I'm uncertain if I'm understanding single indirect blocks and double indirect blocks correctly.
A disk block is 2KB and indexed allocation is used. An inode for a file is 128 bytes long, 32 bytes are used for status info. The remaining 96 bytes are used for index entries - 4 bytes per entry.
What is the maximum amount of data that can be stored in a file if the following schemes are used?
a. each index entry is a pointer to a direct block
24 pointers x 2 KB = 48 KB
b. each index entry is a pointer to a single indirect block
2 KB / 4 pointers = 512 pointers = 2 MB x 24 = 48 MB
c. the first 22 entries are points to direct blocks, the 23rd entry is a pointer to a single indirect block, and the 24th entry is a pointer to a double indirect block
22 pointers x 2 KB = 44 KB + 2 MB + 2 GB