On 3/24/22 10:26 AM, Fariya F wrote: > Thank you for all the inputs. > > I have a question what is the meaning of overhead block (its different from > reserved block) and how the number of overhead blocks is calculated?
Not really a df/coreutils question. The command fetches info from the stat() and statvfs() system calls (man 2 stat, man 2 statvfs) and neither structure has an "overhead" field. I assume you're referring to: https://github.com/torvalds/linux/blob/master/fs/ext2/super.c#L1406 Which would be a kernel issue. Try asking on lkml or one of the more domain-specific kernel lists like: http://vger.kernel.org/vger-lists.html#linux-fsdevel Or more likely: http://vger.kernel.org/vger-lists.html#linux-ext4 (Since ext4 is theoretically backwards compatible with ext3 and ext2 they collapsed the dev community together and that's the surviving list. The ext2 driver survives for embedded users. The ext3 driver got deleted once ext4 was stable.) > The > problem is the num of overhead blocks are more than the total blocks for that > partition and that's why the total blocks - overhead blocks returns a huge > value. (Negative number). Yeah, that'd do it. > Anyone could help as to how overhead blocks are Calculated? What could go > wrong > in this calculation? Above link goes to the kernel code that's doing it. I'm not familiar with the driver logic in question. Rob