qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] block: Do OFD lock check at runtime
@ 2017-07-21 10:20 Fam Zheng
  2017-07-21 10:20 ` [Qemu-devel] [PATCH 1/2] osdep: Add runtime OFD lock detection Fam Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Fam Zheng @ 2017-07-21 10:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Andrew Baumann, jsnow, Max Reitz, eblake

This fixes the image opening failure reported by Andrew Baumann:

> I'm running a recent Linux build of qemu on Windows Subsystem for Linux (WSL)
> which doesn't appear to implement file locking:
>
> $ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,id=hd0 -device virtio-blk-pci,drive=hd0
> qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100
> qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100
> qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to lock byte 100

It appears to be that the binary is built for Linux targets, but the WSL
runtime doesn't recognize the ops (-EINVAL).

Convert to runtime check to cope with that.

Fam Zheng (2):
  osdep: Add runtime OFD lock detection
  file-posix: Do runtime check for ofd lock API

 block/file-posix.c   | 19 ++++++--------
 include/qemu/osdep.h |  1 +
 util/osdep.c         | 72 +++++++++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 72 insertions(+), 20 deletions(-)

-- 
2.13.3

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-10  8:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-21 10:20 [Qemu-devel] [PATCH 0/2] block: Do OFD lock check at runtime Fam Zheng
2017-07-21 10:20 ` [Qemu-devel] [PATCH 1/2] osdep: Add runtime OFD lock detection Fam Zheng
2017-07-21 12:30   ` Eric Blake
2017-07-21 10:20 ` [Qemu-devel] [PATCH 2/2] file-posix: Do runtime check for ofd lock API Fam Zheng
2017-07-21 12:36   ` Eric Blake
2017-08-10  8:16     ` Christian Ehrhardt
2017-07-21 17:23   ` Andrew Baumann
2017-07-21 11:56 ` [Qemu-devel] [PATCH 0/2] block: Do OFD lock check at runtime Kevin Wolf
2017-07-21 12:34   ` Eric Blake
2017-07-21 13:47     ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).