]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: detect invalid zero-sized symlink inodes
authorBrian Foster <bfoster@redhat.com>
Mon, 10 Apr 2017 22:32:04 +0000 (17:32 -0500)
committerEric Sandeen <sandeen@redhat.com>
Mon, 10 Apr 2017 22:32:04 +0000 (17:32 -0500)
commit948ade7529f43d7b96aeebdd15a1a7ad1ad0f224
treee4a97a5662061a120c2f00def74ddf55728f4504
parent75dc6781255fecd42e6861f0328bc4e161b6f82a
xfs_repair: detect invalid zero-sized symlink inodes

Mathias Troiden reproduced a filesystem corruption that resulted in
a zero-sized local format symlink inode. This is invalid state and
results in an inode that cannot be accessed or modified.

The kernel detects this problem on inode access, fails and warns the
user to umount and run xfs_repair. Unfortunately, xfs_repair doesn't
even detect the problem. Thus the user has no path to recovery.

Update xfs_repair to check for invalid zero-sized symlinks and flag
them as corrupted. This results in tossing the inode, but returns
the fs to a valid state.

Reported-by: Mathias Troiden <mathias.troiden@gmail.com>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/dinode.c