From: Changpeng Liu <changpeng.liu@intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, stefanha@redhat.com, sgazare@redhat.com,
changpeng.liu@intel.com
Subject: [Qemu-devel] [PATCH v2 2/3] contrib/vhost-user-blk: fix the compilation issue
Date: Wed, 16 Jan 2019 13:19:29 +0800 [thread overview]
Message-ID: <1547615970-23545-2-git-send-email-changpeng.liu@intel.com> (raw)
In-Reply-To: <1547615970-23545-1-git-send-email-changpeng.liu@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
contrib/vhost-user-blk/vhost-user-blk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
index 858221a..49640df 100644
--- a/contrib/vhost-user-blk/vhost-user-blk.c
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
@@ -20,6 +20,10 @@
#include "contrib/libvhost-user/libvhost-user-glib.h"
#include "contrib/libvhost-user/libvhost-user.h"
+#if defined(__linux__)
+#include <linux/fs.h>
+#include <sys/ioctl.h>
+#endif
struct virtio_blk_inhdr {
unsigned char status;
@@ -454,7 +458,7 @@ vub_get_blocksize(int fd)
#if defined(__linux__) && defined(BLKSSZGET)
if (ioctl(fd, BLKSSZGET, &blocksize) == 0) {
- return blocklen;
+ return blocksize;
}
#endif
--
1.9.3
next prev parent reply other threads:[~2019-01-16 5:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 5:19 [Qemu-devel] [PATCH v2 1/3] contrib: compile vhost-user-blk tool by default Changpeng Liu
2019-01-16 5:19 ` Changpeng Liu [this message]
2019-01-16 14:26 ` [Qemu-devel] [PATCH v2 2/3] contrib/vhost-user-blk: fix the compilation issue Stefan Hajnoczi
2019-01-17 11:49 ` Stefano Garzarella
2019-01-16 5:19 ` [Qemu-devel] [PATCH v2 3/3] vhost-user-blk: add discard/write zeroes features support Changpeng Liu
2019-01-16 14:26 ` Stefan Hajnoczi
2019-01-16 14:26 ` [Qemu-devel] [PATCH v2 1/3] contrib: compile vhost-user-blk tool by default Stefan Hajnoczi
2019-01-17 11:47 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547615970-23545-2-git-send-email-changpeng.liu@intel.com \
--to=changpeng.liu@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sgazare@redhat.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).