qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/2] block/raw-posix: use seek_hole ahead of


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 2/2] block/raw-posix: use seek_hole ahead of fiemap
Date: Fri, 26 Sep 2014 19:04:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 26.09.2014 01:14, Tony Breeds wrote:
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>
---
Changes since v1:
  - split in to 2 patches
  - tried to make the commit messages better

I used this order in at least one of the non-final versions of 4f11aa8a, so I'm fine with it. The reason it got rejected was (as far as I remember) that the FIEMAP ioctl() returns ENOTSUP if not supported, whereas lseek() with SEEK_HOLE/SEEK_DATA returns some failsafe value, probably reporting no holes at all. By reversing the order of try_fiemap() and try_seek_hole(), try_fiemap() therefore may very well become dead code. I don't object, however.

Reviewed-by: Max Reitz <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]