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

Srinivas Eeda srinivas.eeda at oracle.com
Wed May 27 20:19:17 PDT 2015


Acked-by: Srinivas Eeda <srinivas.eeda at oracle.com>

On 05/27/2015 08:11 PM, 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.
>
> 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 ff47633..bc84652 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