Re: [Qemu-devel] [PATCH 08/10] qcow2: Allow updating no refcounts

2010-01-20 Thread Kevin Wolf
Am 19.01.2010 19:53, schrieb Christoph Hellwig: #endif -if (length = 0) +if (length 0) { return -EINVAL; +} + start = offset ~(s-cluster_size - 1); last = (offset + length - 1) ~(s-cluster_size - 1); for(cluster_offset = start; cluster_offset =

Re: [Qemu-devel] [PATCH 08/10] qcow2: Allow updating no refcounts

2010-01-19 Thread Christoph Hellwig
#endif -if (length = 0) +if (length 0) { return -EINVAL; +} + start = offset ~(s-cluster_size - 1); last = (offset + length - 1) ~(s-cluster_size - 1); for(cluster_offset = start; cluster_offset = last; So for legnth = 0, last will equal start and

[Qemu-devel] [PATCH 08/10] qcow2: Allow updating no refcounts

2010-01-18 Thread Kevin Wolf
There's absolutely no problem with updating the refcounts of 0 clusters. At least snapshot code is doing this and would fail once the result of update_refcount isn't ignored any more. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c |4 +++- 1 files changed, 3