Skip to content

Commit 901219b

Browse files
committed
xfs: remove XFS_LI_RECOVERED
The ->iop_recover method of a log intent item removes the recovered intent item from the AIL by logging an intent done item and committing the transaction, so it's superfluous to have this flag check. Nothing else uses it, so get rid of the flag entirely. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent b80b29d commit 901219b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

fs/xfs/xfs_log_recover.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,11 +2539,9 @@ xlog_recover_process_intents(
25392539
* this routine or else those subsequent intents will get
25402540
* replayed in the wrong order!
25412541
*/
2542-
if (!test_and_set_bit(XFS_LI_RECOVERED, &lip->li_flags)) {
2543-
spin_unlock(&ailp->ail_lock);
2544-
error = lip->li_ops->iop_recover(lip, parent_tp);
2545-
spin_lock(&ailp->ail_lock);
2546-
}
2542+
spin_unlock(&ailp->ail_lock);
2543+
error = lip->li_ops->iop_recover(lip, parent_tp);
2544+
spin_lock(&ailp->ail_lock);
25472545
if (error)
25482546
goto out;
25492547
lip = xfs_trans_ail_cursor_next(ailp, &cur);

fs/xfs/xfs_trans.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ struct xfs_log_item {
5555
#define XFS_LI_ABORTED 1
5656
#define XFS_LI_FAILED 2
5757
#define XFS_LI_DIRTY 3 /* log item dirty in transaction */
58-
#define XFS_LI_RECOVERED 4 /* log intent item has been recovered */
5958

6059
#define XFS_LI_FLAGS \
6160
{ (1 << XFS_LI_IN_AIL), "IN_AIL" }, \
6261
{ (1 << XFS_LI_ABORTED), "ABORTED" }, \
6362
{ (1 << XFS_LI_FAILED), "FAILED" }, \
64-
{ (1 << XFS_LI_DIRTY), "DIRTY" }, \
65-
{ (1 << XFS_LI_RECOVERED), "RECOVERED" }
63+
{ (1 << XFS_LI_DIRTY), "DIRTY" }
6664

6765
struct xfs_item_ops {
6866
unsigned flags;

0 commit comments

Comments
 (0)