Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-14 Thread Max Reitz
On 11.05.2014 19:26, Christoph Hellwig wrote: On Tue, May 06, 2014 at 09:00:54PM +0200, Max Reitz wrote: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implement

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-11 Thread Christoph Hellwig
On Tue, May 06, 2014 at 09:00:54PM +0200, Max Reitz wrote: > The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if > FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even > compiled in in this case. However, there may be implementations which > support the latter but not t

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-09 Thread Paolo Bonzini
Il 06/05/2014 21:00, Max Reitz ha scritto: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementations which support the latter but not the former (e.g., NFSv4

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-08 Thread Max Reitz
On 07.05.2014 07:56, Markus Armbruster wrote: Eric Blake writes: On 05/06/2014 03:18 PM, Eric Blake wrote: ...if you are on a file system where SEEK_HOLE triggers the kernel fallback of "entire file is allocated", but where FIEMAP is wired up for that file system, would it make sense to have

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Markus Armbruster
Eric Blake writes: > On 05/06/2014 03:18 PM, Eric Blake wrote: > >> ...if you are on a file system where SEEK_HOLE triggers the kernel >> fallback of "entire file is allocated", but where FIEMAP is wired up for >> that file system, would it make sense to have try_seek_hole return -1 in >> situati

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Max Reitz
On 06.05.2014 23:47, Eric Blake wrote: On 05/06/2014 03:18 PM, Eric Blake wrote: ...if you are on a file system where SEEK_HOLE triggers the kernel fallback of "entire file is allocated", but where FIEMAP is wired up for that file system, would it make sense to have try_seek_hole return -1 in s

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Eric Blake
On 05/06/2014 03:18 PM, Eric Blake wrote: > ...if you are on a file system where SEEK_HOLE triggers the kernel > fallback of "entire file is allocated", but where FIEMAP is wired up for > that file system, would it make sense to have try_seek_hole return -1 in > situations where lseek(s->fd, 0, SE

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Max Reitz
On 06.05.2014 23:18, Eric Blake wrote: On 05/06/2014 01:00 PM, Max Reitz wrote: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementations which support the

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Eric Blake
On 05/06/2014 01:00 PM, Max Reitz wrote: > The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if > FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even > compiled in in this case. However, there may be implementations which > support the latter but not the former (e.g., N