xfs_repair: refuse to unset lazycount on V5 filesystems
Running "xfs_admin -c 0" on a V5 fs has unfortunate results.
Before:
versionnum [0xbca5+0x18a] = ... LAZYSBCOUNT,PROJID32BIT,CRC, ...
After:
versionnum [0xbca5+0x188] = ... LAZYSBCOUNT,PROJID32BIT,CRC, ...
The on-disk feature bit is in fact changed, but xfs_db reports that the
feature is still present. This is because xfs_sb_version_haslazysbcount()
ignores the feature bit, and always reports that the lazy-count feature is
present on a V5 fs.
i.e. the intent is that this feature is not optional on a V5 fs, yet we
still flip the bit on disk when asked. Not good.
So, document this, and error out if the user tries to disable lazy-count
on a version 5 filesystem.
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2 files changed