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 <michael_steff...@posteo.de>
Signed-off-by: Tony Breeds <t...@bakeyournoodle.com>
Cc: Kevin Wolf <kw...@redhat.com>
Cc: Markus Armbruster <arm...@redhat.com>
Cc: Stefan Hajnoczi <stefa...@redhat.com>
Cc: Max Reitz <mre...@redhat.com>
Cc: Pádraig Brady <pbr...@redhat.com>
Cc: Eric Blake <ebl...@redhat.com>
---
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 <mre...@redhat.com>

Reply via email to