[Sheepdog] [PATCH 2/2] make vdi setattr atomic

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Oct 17 17:47:40 CEST 2011


At Sat, 15 Oct 2011 13:40:07 +0100,
Chris Webb wrote:
> 
> MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> writes:
> 
> > Thanks, the reason of this problem is that you use a direct I/O option
> > but the offset and length of "collie vdi write" is not aligned to
> > sector size (512 bytes).  I didn't expect that because VM's I/O
> > requests are always sector aligned.
> > 
> > Is it okay to exit with error when the offset size is not aligned to
> > 512 bytes?  And is it okay to enlarge the read/write buffer length to
> > the sector aligned size when it is not aligned?  If possible, I don't
> > want to treat "collie vdi read/write" as special cases.
> 
> Hi. Yes, I think it's fine to error out if reads and writes aren't
> block-aligned, yes. However, I'm very puzzled that you've identified this as
> the problem here, because the offset is zero:
> 
> [2652] collie vdi write dc9d3806-cafd-47c5-8711-9b4f99b5b061 0
> failed to write object, b1028300000000 I/O error
> failed to write vdi
> Exit code: 1
> 
> and I think it should have been attempting to write exactly 5<<20 bytes,
> which is again block-aligned.

Hi Chris,

Sorry, I have no idea why your sheep daemons return EIO errors.  I
thought that the reason was the offset (or length) was not aligned,
but it looks wrong.

I've sent a patch to show an error reason when the sheep daemon
returns SD_RES_EIO.  Can you pull the vdiattr branch and try again?


Thanks,

Kazutaka



More information about the sheepdog mailing list