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. http://rhn.redhat.com/errata/RHBA-2007-0579.html