[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation optio
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option |
Date: |
Fri, 29 Aug 2014 09:48:01 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Fri, Aug 29, 2014 at 04:33:12PM +0800, Hu Tao wrote:
> + if (prealloc == PREALLOC_MODE_FULL) {
> + /* posix_fallocate() doesn't set errno. */
> + result = -posix_fallocate(fd, 0, total_size);
> + if (result != 0) {
Is it better to test:
result != ENOSYS && result != EOPNOTSUPP
here?
I think this is definitely the right approach.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
- [Qemu-devel] [PATCH v13 0/6] qcow2, raw: add preallocation=full, Hu Tao, 2014/08/29
- [Qemu-devel] [PATCH v13 1/6] block: round up file size to nearest sector, Hu Tao, 2014/08/29
- [Qemu-devel] [PATCH v13 2/6] block: don't convert file size to sector size, Hu Tao, 2014/08/29
- [Qemu-devel] [PATCH v13 3/6] rename parse_enum_option to qapi_enum_parse and make it public, Hu Tao, 2014/08/29
- [Qemu-devel] [PATCH v13 4/6] qapi: introduce PreallocMode and a new PreallocMode full., Hu Tao, 2014/08/29
- [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option, Hu Tao, 2014/08/29
- Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option,
Richard W.M. Jones <=
- [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option, Hu Tao, 2014/08/29