[sheepdog] [PATCH] sheep: disable journal by default
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Fri Sep 7 18:28:37 CEST 2012
At Fri, 7 Sep 2012 17:26:28 +0800,
Liu Yuan wrote:
>
> sent from my galaxy 2
> 在 2012-9-7 PM5:17,"MORITA Kazutaka" <morita.kazutaka at lab.ntt.co.jp>写道:
> >
> > It seems that most modern disk drives implement atomic sector writes
> > (e.g. section 7.4 in http://www.sqlite.org/atomiccommit.html). If it
> > is true, we don't need to use journal for vdi object updates because
> > we don't update them across a sector boundary.
> >
> > This patch uses atomic_put() for vdi creation, and doesn't use journal
> > for vdi updates by default.
>
> for partial update, we can use check command to repair consistency. So can
> we completely remove journal?
No, what we want to guarantee with journal is not consistency but data
correctness.
For example, when we update inode->data_vdi_id[i] with a new vdi id (4
bytes) and the machine fails during the write operation, only the
first 2 bytes would be updated if the operation is not atomic. We
cannot repair this case with vdi check command and need a journal to
update the area again with correct data.
Thanks,
Kazutaka
More information about the sheepdog
mailing list