[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 0/6] qemu-img: add preallocation=full
From: |
Hu Tao |
Subject: |
[Qemu-devel] [PATCH v10 0/6] qemu-img: add preallocation=full |
Date: |
Thu, 12 Jun 2014 11:54:21 +0800 |
The purpose of this series is to use posix_fallocate() when creating
img file to ensure there are disk space for it which is way fast than
acturally writing to disk. But this only works in file system level.
For cases like thin provisioning, an option full preallocation is
added to write zeros to storage to ensure disk space.
note: there are two false positives of checkpatch.pl to patch 01.
changes to v9:
- use ROUND_UP to do round up
- split the round up into its own patch and add test case
- new patch rename parse_enum_option to qapi_enum_parse and make it public
- reuse qapi_enum_parse
Hu Tao (6):
block: round up file size to nearest sector
raw, qcow2: don't convert file size to sector size
rename parse_enum_option to qapi_enum_parse and make it public
qapi: introduce PreallocMode and a new PreallocMode full.
raw-posix: Add full image preallocation option
qcow2: Add full image preallocation option
block/qcow2.c | 102 ++++++++++++++++++++++++++++++++++++++-------
block/raw-posix.c | 61 +++++++++++++++++++++++----
block/raw-win32.c | 4 +-
blockdev.c | 22 +---------
include/qapi/util.h | 17 ++++++++
qapi-schema.json | 14 +++++++
qapi/Makefile.objs | 2 +-
qapi/qapi-util.c | 32 ++++++++++++++
tests/qemu-iotests/082.out | 54 ++++++++++++------------
tests/qemu-iotests/093 | 64 ++++++++++++++++++++++++++++
tests/qemu-iotests/093.out | 14 +++++++
tests/qemu-iotests/group | 1 +
12 files changed, 313 insertions(+), 74 deletions(-)
create mode 100644 include/qapi/util.h
create mode 100644 qapi/qapi-util.c
create mode 100755 tests/qemu-iotests/093
create mode 100644 tests/qemu-iotests/093.out
--
1.9.3
- [Qemu-devel] [PATCH v10 0/6] qemu-img: add preallocation=full,
Hu Tao <=