Terminology
ext4 divides a storage device into an array of logical blocks both to reduce bookkeeping overhead and to increase throughput by forcing larger transfer sizes. Generally, the block size will be 4KiB (the same size as pages on x86 and the block layer's default block size), though the actual size is calculated as 2 ^ (10 +
sb.s_log_block_size
) bytes. Throughout this document, disk locations are given in terms of these logical blocks, not raw LBAs, and not 1024-byte blocks. For the sake of convenience, the logical block size will be referred to as$block_size
throughout the rest of the document.When referenced in
preformatted text
blocks,sb
refers to fields in the super block, andinode
refers to fields in an inode table entry.