]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: do not log/recover swapext extent owner changes for deleted inodes
authorEric Sandeen <sandeen@sandeen.net>
Thu, 29 Mar 2018 00:48:08 +0000 (17:48 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 29 Mar 2018 17:19:15 +0000 (10:19 -0700)
commit7eecb75305eb6088301da80ab7c9f2dcfbc0da56
treeb36dbcf78a250483195788279ae23f5c6a5a8bb7
parent13134f0497cd377a0d48a541e6492ccbb6691a8d
xfs: do not log/recover swapext extent owner changes for deleted inodes

Today if we run xfs_fsr and crash[1], log replay can fail because
the recovery code tries to instantiate the donor inode from
disk to replay the swapext, but it's been deleted and we get
verifier failures when we try to read the inode off disk with
i_mode == 0.

This fixes both sides: We don't log the swapext change if the
inode has been deleted, and we don't try to recover it either.

[1] or if systemd doesn't cleanly unmount root, as it is wont
    to do ...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_inode.c
fs/xfs/xfs_log_recover.c