Re: [PATCH] qcow2 disk format

2018-08-31 Thread Ori Bernstein
On Fri, 31 Aug 2018 14:32:24 +0800, Michael Mikonos wrote: > Hi Ori, > > I had one question about mkcluster() in src/usr.sbin/vmd/vioqcow2.c... > > + if (src_phys > 0 && copy_cluster(disk, base, disk->end, src_phys) == -1) > + return -1; > > The other error cases around

Re: [PATCH] qcow2 disk format

2018-08-30 Thread Michael Mikonos
On Thu, Aug 30, 2018 at 11:19:08PM -0700, Ori Bernstein wrote: > On Wed, 15 Aug 2018 23:02:16 -0700, Ori Bernstein wrote: > > > Updated style from feedback from off-list. Also added checks and > > erroring for incompatible extensions. > > One more update. This revision adds explicit definitions

Re: [PATCH] qcow2 disk format

2018-08-30 Thread Ori Bernstein
On Wed, 15 Aug 2018 23:02:16 -0700, Ori Bernstein wrote: > Updated style from feedback from off-list. Also added checks and > erroring for incompatible extensions. One more update. This revision adds explicit definitions of the disk format, and adds regress tests for parsing it. The syntax for i

Re: [PATCH] qcow2 disk format

2018-08-19 Thread Ori Bernstein
On Sun, 12 Aug 2018 22:51:24 -0700, Ori Bernstein wrote: > This patch adds preliminary support for creating qcow2 disk images. It gives the 'vmctl create' command an option '-f', which can be given arguments of either 'raw' (defualt) or 'qcow2', and it creates a disk of the appropriate format.

Re: [PATCH] qcow2 disk format

2018-08-19 Thread Ori Bernstein
On Sun, 12 Aug 2018 22:51:24 -0700, Ori Bernstein wrote: > On Sun, 5 Aug 2018 00:52:32 -0700, Ori Bernstein wrote: > > And, now something that actually appears to work. You can create a > disk on OpenBSD using qemu: > > qemu-img create foo.qc2 16G > > add it to your vm.conf: > >

Re: [PATCH] qcow2 disk format

2018-08-15 Thread Ori Bernstein
Updated style from feedback from off-list. Also added checks and erroring for incompatible extensions. --- usr.sbin/vmd/Makefile | 2 +- usr.sbin/vmd/vioqcow2.c| 546 + usr.sbin/vmd/vioqcow2.h| 6 + usr.sbin/vmd/vioscribble.c | 143 ++

Re: [PATCH] qcow2 disk format

2018-08-12 Thread Ori Bernstein
On Sun, 5 Aug 2018 00:52:32 -0700, Ori Bernstein wrote: > This change introduces a 'struct virtio_backing' which makes the > disk i/o pluggable, providing 'backing->{pread,pwrite}' calls that > can be replaced by different disk i/o drivers. > > This is necessary preparation for adding qcow2 supp