#40 resize2fs sets inode count larger than block count

open
nobody
None
5
2012-11-28
2010-10-29
Anonymous
No

I've found the problem -- I assume it's a problem -- working on an embedded device, but it's reproducible on my desktop. I'm using 1.4.12 built from source.

Here is a transcript of what I'm doing. Which is: create a 64M
filesystem in two ways, first by creating a 256M system and resizing
it; and second, creating a 64M FS from the getgo. In the second case
'Inode count' and 'Block count' are both 16384. But in the first case
'Inode count' winds up at 32768 while 'Block count' is 16384.

==> dd if=/dev/zero of=var.bin count=256 bs=$((1024*1024))
[...]

[emac 01:00:19 PM]~/src/e2fsprogs\:
==> ./misc/mke2fs -j -b4096 -m0 var.bin
mke2fs 1.41.12 (17-May-2010)
var.bin is not a block special device.
Proceed anyway? (y,n) y
[...]

[emac 01:00:30 PM]~/src/e2fsprogs\:
==> dumpe2fs var.bin | grep 'count:'
dumpe2fs 1.41.4 (27-Jan-2009)
Inode count: 65536
Block count: 65536
[...]

[emac 01:00:50 PM]~/src/e2fsprogs\:
==> ./resize/resize2fs var.bin 64M
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on var.bin to 16384 (4k) blocks.
The filesystem on var.bin is now 16384 blocks long.

[emac 01:01:02 PM]~/src/e2fsprogs\:
==> dumpe2fs var.bin | grep 'count:'
dumpe2fs 1.41.4 (27-Jan-2009)
Inode count: 32768
Block count: 16384
[...]

[emac 01:01:05 PM]~/src/e2fsprogs\:
==> dd if=/dev/zero of=var.bin count=64 bs=$((1024*1024))
[...]

[emac 01:01:47 PM]~/src/e2fsprogs\:
==> ./misc/mke2fs -j -b4096 -m0 var.bin
mke2fs 1.41.12 (17-May-2010)
var.bin is not a block special device.
Proceed anyway? (y,n) y
[...]

[emac 01:01:54 PM]~/src/e2fsprogs\:
==> dumpe2fs var.bin | grep 'count:'
dumpe2fs 1.41.4 (27-Jan-2009)
Inode count: 16384
Block count: 16384
[...]

Discussion

  • lXB2v4 <a href="http://wovhahyccnwm.com/">wovhahyccnwm</a>, [url=http://nserwdtpvplo.com/]nserwdtpvplo[/url], [link=http://jhkrdmqixrbm.com/]jhkrdmqixrbm[/link], http://isqxtloxjaek.com/

     
  • reXDxN <a href="http://hcpvhspucohz.com/">hcpvhspucohz</a>, [url=http://olcwbjnxgzxb.com/]olcwbjnxgzxb[/url], [link=http://ctrrkowrxmsd.com/]ctrrkowrxmsd[/link], http://fxtshacnftnv.com/