At Wed, 3 Aug 2011 14:01:15 +0100, Chris Webb wrote: > > Another operation I could do with exposing to end users from the new > Sheepdog branch of our platform is drive read and write. From our existing > drives, we provide API calls to > > - read N bytes (or the remainder of the drive) starting at offset M > - write bytes starting at offset M > > as well as being able to attach drives to qemu virtual machines. > > I don't think there's a qemu-img or collie operation to read data to stdout > or write data from stdin. Would it be reasonable to teach collie to do a vdi > read/write for this? > > More generally, there are only a couple of operations which must be done via > qemu-img: snapshot, resize and create. Everything else is doable through > collie, i.e. without any dependency on qemu. I wonder whether for > completeness, and to make the sheepdog distribution fully stand-alone, > collie ought to gain these three operations? This might just be a matter of > lifting the relevant code from qemu/block/sheepdog.c and reformatting for > the sheepdog code conventions? Yes, it makes sense to support above features in collie. There is no technical issues to do it, and probably it is easy. > > Apart from the aesthetic benefit of the sheepdog distribution being > meaningfully self-contained, this would presumably make a 'make test' target > for the sheepdog source tree easier to implement, and would also provide a > good foundation for a extracting a libsheepdog client library from collie > later on---paving the way for easy integration of sheepdog against other > virtualisation systems like kvm-tools. Agreed. There seems to be a lot of benefit if we can do everying with collie. This would also help for Matt to write tests. Thanks, Kazutaka |