]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: reinitialize the root directory nlink correctly
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 20:39:17 +0000 (15:39 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 26 Apr 2019 20:39:17 +0000 (15:39 -0500)
commit1da4e1f0e61c076bb11ad166f10b1fb338852bdb
treec7a20460017eeafa54a169ea0890058fe7c6c196
parent9cfe71bae43451bf5cc6b6688b94c88336e1ea00
xfs_repair: reinitialize the root directory nlink correctly

In mk_root_dir, we reinitialize the root directory inode with a link
count of 1.  This differs from mkfs parseproto, which initializes the
root to have a link count of 2.  The nlink discrepancy in repair is
caught and corrected during phase 7, but this is unnecessary since we
should set it properly in the first place.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase6.c