[sheepdog] [PATCH v2 1/2] sheep: introduce journal file to boost IO performance

MORITA Kazutaka morita.kazutaka at gmail.com
Mon Nov 12 05:33:23 CET 2012


At Mon, 12 Nov 2012 11:35:01 +0800,
Liu Yuan wrote:
> >> > +	memcpy(p, buf, rusize);
> >> > +	p += rusize;
> > The size of buf can be smaller than rusize when size is not
> > SECTOR_SIZE aligned.  This memcpy should be something like as follows.
> > 
> 
> wsize = JOURNAL_META_SIZE + rusize, it will be never smaller than rusize
> and always SECTOR_SIZE aligned. no?

I meant the source buffer of memcpy.  For example, when we write 100
bytes data to the journal file, the buffer size of 'buf' is 100 bytes
but 'rusize' is 512.  The similar problem actually happened when I
tried to write date to the vdi object because the size of it is not
512 bytes aligned.

Thanks,

Kazutaka



More information about the sheepdog mailing list