On Wed, Jun 13, 2018 at 02:11:05PM +0200, Jan Kara wrote: > > Actually currently e2fsck never succeeded in even opening the filesystem > with corrupted s_inodes_count so it could not fix anything. So my change is > at least an improvement that it reports what's wrong and fixes the "easily > fixable" corruptions. > > Reducing number of block groups is doable (although libext2fs code is not > quite prepared for that so it may need some fixups). I was just a bit > worried that if the s_inodes_count corruption is not due to resize2fs bug, > reducing the group count may actually be a wrong thing to do and could > cause serious damage to the filesystem. What do people think? The primary principle should be "first, do no harm". It's probably going to be easier to get e2undo with resize2fs working well and by default than trying to figure out how to fix the s_inodes_count corruption case. And it will have a better bang for the buck, since future bugs may not involve s_inodes_count at all. So that's probably a better investment of developer time, in my view. - Ted