qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support bl


From: Xiao Guangrong
Subject: Re: [Qemu-block] [PATCH v7 12/35] util: let qemu_fd_getlength support block device
Date: Mon, 9 Nov 2015 13:58:27 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0



On 11/06/2015 11:54 PM, Eduardo Habkost wrote:
On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote:
lseek can not work for all block devices as the man page says:
| Some devices are incapable of seeking and POSIX does not specify
| which devices must support lseek().

This patch tries to add the support on Linux by using BLKGETSIZE64
ioctl

Signed-off-by: Xiao Guangrong <address@hidden>

On which cases is this patch necessary? Do you know any examples of
Linux block devices that won't work with lseek(SEEK_END)?

To be honest, i have not checked all block device, this patch was made
based on the man page. However, i do not mind drop this patch (and maybe
other patches) to make this pachset smaller. BLKGETSIZE64 can be added
in the future if we meet such device.





reply via email to

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