]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: refuse to unset lazycount on V5 filesystems
authorEric Sandeen <sandeen@redhat.com>
Tue, 23 Jun 2015 01:36:50 +0000 (11:36 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 23 Jun 2015 01:36:50 +0000 (11:36 +1000)
commit66de82b8c149b312c1c38dd2bcb5310096ce76e9
tree6e45cc168b87a629bf00eb6ee08fbd2ace5d6564
parentb0cda2f64c3c8082df111a14332fec9140f43cbb
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>
man/man8/xfs_admin.8
repair/phase1.c