Red Hat Bugzilla – Bug 210856
gfs2_fsck needs to take into account endian bug in lf_dirent_format
Last modified: 2010-01-11 22:36:29 EST
Description of problem:
As reported by Al Viro, early versions of GFS2 have had an problem in with the
lf_dirent_format field in that its 32 bits long, but only a cpu_to_be16()
conversion was being used. gfs2_fsck should accept either version of the
constant and rewrite it to the correct one.
This field isn't currently used by anything, but we might as well fix it up in
case of future need.
Added code to check_leaf (metawalk.c) to detect lf_dirent_format fields that
have incorrect value. If found, we simply update the in-core leaf with
GFS2_FORMAT_DE and call gfs2_leaf_out(..), then mark the buffer as updated.
Note both the gfs2_leaf_in(..) and gfs2_leaf_out(..) convert the
lf_dirent_format as a 32-bit value.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.