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

Chris Webb chris at arachsys.com
Sat Oct 15 14:40:07 CEST 2011


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.

Cheers,

Chris.



More information about the sheepdog mailing list