diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-12-15 10:03:37 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-12-15 10:03:37 -0800 |
commit | e744cef206055954517648070d2b3aaa3d2515ba (patch) | |
tree | 6ea1a878f752899809c5204d4999274f7789d40e /fs/xfs/libxfs/xfs_symlink_remote.c | |
parent | 2d295fe65776d15c06d53dbe3064f62e036e7c46 (diff) |
xfs: zap broken inode forks
Determine if inode fork damage is responsible for the inode being unable
to pass the ifork verifiers in xfs_iget and zap the fork contents if
this is true. Once this is done the fork will be empty but we'll be
able to construct an in-core inode, and a subsequent call to the inode
fork repair ioctl will search the rmapbt to rebuild the records that
were in the fork.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_symlink_remote.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_symlink_remote.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c index bdc777b9ec4a..3c96d1d617fb 100644 --- a/fs/xfs/libxfs/xfs_symlink_remote.c +++ b/fs/xfs/libxfs/xfs_symlink_remote.c @@ -202,15 +202,11 @@ xfs_symlink_local_to_remote( */ xfs_failaddr_t xfs_symlink_shortform_verify( - struct xfs_inode *ip) + void *sfp, + int64_t size) { - struct xfs_ifork *ifp = xfs_ifork_ptr(ip, XFS_DATA_FORK); - char *sfp = (char *)ifp->if_u1.if_data; - int size = ifp->if_bytes; char *endp = sfp + size; - ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL); - /* * Zero length symlinks should never occur in memory as they are * never allowed to exist on disk. |