[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 for-2.10 07/16] block/file-posix: Generalize
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v2 for-2.10 07/16] block/file-posix: Generalize raw_regular_truncate |
Date: |
Thu, 6 Apr 2017 13:33:15 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, Apr 03, 2017 at 06:09:27PM +0200, Max Reitz wrote:
> Currently, raw_regular_truncate() is intended for setting the size of a
> newly created file. However, we also want to use it for truncating an
> existing file in which case only the newly added space (when growing)
> should be preallocated.
>
> This also means that if resizing failed, we should try to restore the
> original file size. This is important when using preallocation.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block/file-posix.c | 61
> ++++++++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 50 insertions(+), 11 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-block] [PATCH v2 for-2.10 04/16] qemu-img: Expose PreallocMode for resizing, (continued)
- [Qemu-block] [PATCH v2 for-2.10 04/16] qemu-img: Expose PreallocMode for resizing, Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 05/16] block/file-posix: Small fixes in raw_create(), Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 06/16] block/file-posix: Extract raw_regular_truncate(), Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 08/16] block/file-posix: Preallocation for truncate, Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 07/16] block/file-posix: Generalize raw_regular_truncate, Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 09/16] block/qcow2: Generalize preallocate(), Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 10/16] block/qcow2: Lock s->lock in preallocate(), Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 11/16] block/qcow2: Metadata preallocation for truncate, Max Reitz, 2017/04/03
- [Qemu-block] [PATCH v2 for-2.10 13/16] block/qcow2: qcow2_calc_size_usage() for truncate, Max Reitz, 2017/04/03