Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Eric Blake
On 05/06/2014 11:46 AM, Max Reitz wrote: > > Okay, then I'll put the functionality in own functions and reverse the > order in v2 while keeping the fallback idea, as I think there may exist > systems where the reverse of what this patch tries to fix is true: > SEEK_HOLE/SEEK_DATA is not supported

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Max Reitz
On 06.05.2014 14:27, Eric Blake wrote: On 05/06/2014 05:49 AM, Stefan Hajnoczi wrote: On Mon, May 05, 2014 at 10:01:39PM +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 t

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Max Reitz
On 06.05.2014 13:49, Stefan Hajnoczi wrote: On Mon, May 05, 2014 at 10:01:39PM +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 implementat

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Eric Blake
On 05/06/2014 05:49 AM, Stefan Hajnoczi wrote: > On Mon, May 05, 2014 at 10:01:39PM +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

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Stefan Hajnoczi
On Mon, May 05, 2014 at 10:01:39PM +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

[Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-05 Thread Max Reitz
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.2). In this case, raw-posix should fall back