[sheepdog] [PATCH v3 3/3] journal: new journal flag JF_DELETE_OBJ for deleting object

Hitoshi Mitake mitake.hitoshi at gmail.com
Mon May 6 15:42:26 CEST 2013


At Mon, 15 Apr 2013 15:31:01 +0800,
Liu Yuan wrote:
> 
> On 04/14/2013 11:54 PM, Hitoshi Mitake wrote:
> > Current journal implementation doesn't consider such a case:
> > 
> > 1. make new journal for new object creation
> > 2. actual creation of the object
> > 3. delete object
> > 4. crash
> > 
> > After such a sequence, the journaling mechanism recovers the deleted
> > object. This behavior isn't valid. This patch implements the new
> > journal flag: JF_DELETE_OBJ. If the journaling mechanism finds an
> > entry with this flag during recovery process, it deletes an
> > corresponding object.
> 
> IIUC, SD won't allow remove VDI while VDI is used by VM. So we don't
> need code to handle situation.
> 
> But after discard operation is supported, this situation might happen. I
> am highly unsure of it because this means following operations series in VM:
> 
>  1. write some file with O_SYNC that causes the creation of new object
>  2. just after the write, then remove this file.
>  3. FS issue a discard command to release this newly created object
>  4. sheep crashes with journal entry logs the 'create' operation only
> 
> What do you you think? Is this practical (happens for real)?

Sorry for my late reply. I think the event sequence might happen.
Because it seems that QEMU doesn't have mechanisms for forbiding the
above sequence. So we should prepare for it.

How do you think? If you agree, I'll send a refined version.

Thanks,
Hitoshi




More information about the sheepdog mailing list