[Ocfs2-tools-devel] [PATCH 02/14] fsck.ocfs2: fix journal tail wrapper

piaojun piaojun at huawei.com
Mon Nov 14 22:48:39 PST 2016


Hi Junxiao,

Could you show me the way to reproduce this problem?

On 2016-4-1 11:10, Junxiao Bi wrote:
> If there is one transaction, its last block but one located at the
> tail of the journal and its last commit block located at the head
> of the journal, Crash the kernel and when fsck.ocfs2 -a run during
> the reboot, the journal replay will fail due to the wrapper error.
> This will make all the following transaction starting from the journal
> head lost, and this will corrupt the fs.
> 
> Acked-by: Srinivas Eeda <srinivas.eeda at oracle.com>
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
> ---
>  fsck.ocfs2/journal.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fsck.ocfs2/journal.c b/fsck.ocfs2/journal.c
> index ff47633851f3..bc8465209097 100644
> --- a/fsck.ocfs2/journal.c
> +++ b/fsck.ocfs2/journal.c
> @@ -339,6 +339,7 @@ static errcode_t replay_blocks(ocfs2_filesys *fs, struct journal_info *ji,
>  			tagp += 16;
>  	}
>  	
> +	*next_block = jwrap(ji->ji_jsb, *next_block);
>  out:
>  	if (io_buf)
>  		ocfs2_free(&io_buf);
> 




More information about the Ocfs2-tools-devel mailing list