xfs
[Top] [All Lists]

[PATCH 5/5] xfs: fix cil push sequence after log recovery

To: xfs@xxxxxxxxxxx
Subject: [PATCH 5/5] xfs: fix cil push sequence after log recovery
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Wed, 02 Jul 2014 09:32:11 -0500
Delivered-to: xfs@xxxxxxxxxxx
References: <20140702143206.438456679@xxxxxxx>
User-agent: quilt/0.51-1
The CIL pushes are marked complete with transaction
tickets and should be in the the correct sequence order.
The back end of the cil push code uses the ctx->commit_lsn
to make sure all previous pushes are complete before adding
the commit ticket for the current cil push. Because
xlog_cil_init_post_recovery sets the ctx->commit_lsn,
the later pushes can incorrectly think that the first
sequence push is complete and allow out of order cil
completion records to be written to the log. If the
system crashes, the log will be replayed in the
wrong order.

Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
---
 fs/xfs/xfs_log_cil.c |    2 --
 1 file changed, 2 deletions(-)

Index: b/fs/xfs/xfs_log_cil.c
===================================================================
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -78,8 +78,6 @@ xlog_cil_init_post_recovery(
 {
        log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log);
        log->l_cilp->xc_ctx->sequence = 1;
-       log->l_cilp->xc_ctx->commit_lsn = xlog_assign_lsn(log->l_curr_cycle,
-                                                               
log->l_curr_block);
 }
 
 /*


<Prev in Thread] Current Thread [Next in Thread>