mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
Merge remote-tracking branch 'stefanha/block' into staging
# By Stefan Hajnoczi (4) and others # Via Stefan Hajnoczi * stefanha/block: virtio-blk: do not relay a previous driver's WCE configuration to the current blockdev: do not default cache.no-flush to true block: don't lose data from last incomplete sector qcow2: Correct snapshots size for overlap check coroutine: fix /perf/nesting coroutine benchmark coroutine: add qemu_coroutine_yield benchmark qemu-timer: do not take the lock in timer_pending qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe qemu-timer: drop outdated signal safety comments osdep: warn if open(O_DIRECT) on fails with EINVAL libcacard: link against qemu-error.o for error_report() Message-id: 1379698931-946-1-git-send-email-stefanha@redhat.com
This commit is contained in:
commit
16121fa39e
10 changed files with 155 additions and 40 deletions
|
@ -207,6 +207,13 @@ int qemu_open(const char *name, int flags, ...)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef O_DIRECT
|
||||
if (ret == -1 && errno == EINVAL && (flags & O_DIRECT)) {
|
||||
error_report("file system may not support O_DIRECT");
|
||||
errno = EINVAL; /* in case it was clobbered */
|
||||
}
|
||||
#endif /* O_DIRECT */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue