]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Fix a vol-clone bug on ppc64
authorLi Zhang <zhlcindy@linux.vnet.ibm.com>
Thu, 7 Nov 2013 08:35:10 +0000 (16:35 +0800)
committerJán Tomko <jtomko@redhat.com>
Fri, 8 Nov 2013 06:51:43 +0000 (07:51 +0100)
commit4ffcb0208cc9d2d9295ebe846618aca63833fdd8
treee0a93e6da8b80f1d7975544e1663210be48c393d
parent1f2f879ed17a784559f67b0fa2408d2436b731fd
storage: Fix a vol-clone bug on ppc64

vol-clone reports out of memory error with disk type on ppc64.

Currently, wbytes is defined as size_t type (8 bytes), but
args's value in ioctl(fd, args..) in kernel is int (4 bytes).
This makes wbytes 2^32 times larger, causing an out of memory error.

This patch changes size_t to int to synchronize with kernel.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/block/ioctl.c?id=5e01dc7b#n363
[2] https://lkml.org/lkml/2013/11/1/620

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/storage/storage_backend.c