[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/28] block/raw-posix: use seek_hole ahead of fiemap
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 03/28] block/raw-posix: use seek_hole ahead of fiemap |
Date: |
Mon, 20 Oct 2014 15:35:29 +0200 |
From: Tony Breeds <address@hidden>
try_fiemap() uses FIEMAP_FLAG_SYNC which has a significant performance
impact.
Prefer seek_hole() over fiemap() to avoid this impact where possible.
seek_hole is more widely used and, arguably, has potential to be
optimised in the kernel.
Reported-By: Michael Steffens <address@hidden>
Signed-off-by: Tony Breeds <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: Pádraig Brady <address@hidden>
Cc: Eric Blake <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw-posix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index d672c73..eb76f0e 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1571,9 +1571,9 @@ static int64_t coroutine_fn
raw_co_get_block_status(BlockDriverState *bs,
start = sector_num * BDRV_SECTOR_SIZE;
- ret = try_fiemap(bs, start, &data, &hole, nb_sectors, pnum);
+ ret = try_seek_hole(bs, start, &data, &hole, pnum);
if (ret < 0) {
- ret = try_seek_hole(bs, start, &data, &hole, pnum);
+ ret = try_fiemap(bs, start, &data, &hole, nb_sectors, pnum);
if (ret < 0) {
/* Assume everything is allocated. */
data = 0;
--
1.8.3.1
- [Qemu-devel] [PULL 00/28] Block patches, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 02/28] block/raw-posix: Fix disk corruption in try_fiemap, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 03/28] block/raw-posix: use seek_hole ahead of fiemap,
Kevin Wolf <=
- [Qemu-devel] [PULL 01/28] qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 05/28] block: Split bdrv_new_root() off bdrv_new(), Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 06/28] block: New BlockBackend, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 04/28] nbd: Fix filename generation, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 07/28] block: Connect BlockBackend to BlockDriverState, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 09/28] block: Code motion to get rid of stubs/blockdev.c, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 08/28] block: Connect BlockBackend and DriveInfo, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 10/28] block: Make BlockBackend own its BlockDriverState, Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 11/28] blockdev: Eliminate drive_del(), Kevin Wolf, 2014/10/20
- [Qemu-devel] [PULL 12/28] block: Eliminate bdrv_iterate(), use bdrv_next(), Kevin Wolf, 2014/10/20