[sheepdog] [PATCH v5 5/7] sheep: rename journal_file.c as journal.c

Liu Yuan namei.unix at gmail.com
Mon Apr 8 04:52:52 CEST 2013


On 04/08/2013 12:48 AM, Hitoshi Mitake wrote:
> I have a naive question about the design of this journaling
> mechanism. It seems that jfile.pos is increased when new journal entry
> is appended and is set as 0 when switching of journal files is caused.
> 
> So the replay_journal_entry() has a possibility of overwriting epoch,
> config, and object with identical data which is already stored in the
> files. This may cause an overhead during initialization process of
> sheep.

The rewrite happens only at the case that sheep crashes before journal
committing. The normal process(jsize = 0) won't trigger journal
recovery. But, there might be a corner case for shutdown. At shutdown,
we should assure journal is committed (jfile size is set to 0). But this
is out of scope of this patch set. It would be great if you can submit a
patch when this patch set is merged.

Thanks,
Yuan



More information about the sheepdog mailing list