From: kbuild test robot <lkp@intel.com>
Cc: Vitaly Mayatskikh <v.mayatskih@gmail.com>,
kvm@vger.kernel.org, "Michael S . Tsirkin" <mst@redhat.com>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, kbuild-all@01.org,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/1] Add vhost_blk driver
Date: Sat, 3 Nov 2018 10:50:32 +0800 [thread overview]
Message-ID: <201811031005.6kPMDLB3%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181102182123.29420-2-v.mayatskih@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5345 bytes --]
Hi Vitaly,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on vhost/linux-next]
[also build test ERROR on v4.19 next-20181102]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Vitaly-Mayatskikh/vhost-add-vhost_blk-driver/20181103-084141
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=mips
All error/warnings (new ones prefixed by >>):
drivers/vhost/blk.c: In function 'vhost_blk_iocb_complete':
>> drivers/vhost/blk.c:129:2: error: implicit declaration of function 'vhost_vq_work_queue'; did you mean 'vhost_work_queue'? [-Werror=implicit-function-declaration]
vhost_vq_work_queue(&req->q->vq, &req->q->w);
^~~~~~~~~~~~~~~~~~~
vhost_work_queue
In file included from include/linux/kernel.h:14:0,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/vhost/blk.c:11:
drivers/vhost/blk.c: In function 'vhost_blk_req_handle':
>> drivers/vhost/blk.c:153:12: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'ssize_t {aka int}' [-Wformat=]
pr_debug("%s: [pid:%d %s] %s sector %lld, len %ld\n",
^
include/linux/printk.h:292:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:340:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~
>> drivers/vhost/blk.c:153:3: note: in expansion of macro 'pr_debug'
pr_debug("%s: [pid:%d %s] %s sector %lld, len %ld\n",
^~~~~~~~
cc1: some warnings being treated as errors
vim +129 drivers/vhost/blk.c
118
119 static void vhost_blk_iocb_complete(struct kiocb *iocb, long ret, long ret2)
120 {
121 struct vhost_blk_req *req = container_of(iocb, struct vhost_blk_req,
122 iocb);
123
124 pr_debug("%s vq[%d] req->index %d ret %ld ret2 %ld\n", __func__,
125 req->q->index, req->index, ret, ret2);
126
127 req->res = (ret == req->len) ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR;
128 llist_add(&req->list, &req->q->wl);
> 129 vhost_vq_work_queue(&req->q->vq, &req->q->w);
130 }
131
132 static int vhost_blk_req_handle(struct vhost_blk_req *req)
133 {
134 struct vhost_blk *blk = req->q->blk;
135 struct vhost_virtqueue *vq = &req->q->vq;
136 int type = le32_to_cpu(req->hdr.type);
137 int ret;
138 u8 status;
139
140 if ((type == VIRTIO_BLK_T_IN) || (type == VIRTIO_BLK_T_OUT)) {
141 bool write = (type == VIRTIO_BLK_T_OUT);
142 int nr_seg = (write ? req->out_num : req->in_num) - 1;
143 unsigned long sector = le64_to_cpu(req->hdr.sector);
144 ssize_t len, rem_len;
145
146 if (!req->q->blk->backend) {
147 vq_err(vq, "blk %p no backend!\n", req->q->blk);
148 ret = -EINVAL;
149 goto out_err;
150 }
151
152 len = iov_length(&vq->iov[1], nr_seg);
> 153 pr_debug("%s: [pid:%d %s] %s sector %lld, len %ld\n",
154 __func__, current->pid, current->comm,
155 write ? "WRITE" : "READ", req->hdr.sector, len);
156
157 req->len = len;
158 rem_len = len;
159 iov_iter_init(&req->i, (write ? WRITE : READ),
160 write ? &req->out_iov[0] : &req->in_iov[0],
161 nr_seg, len);
162
163 req->iocb.ki_pos = sector << 9;
164 req->iocb.ki_filp = blk->backend;
165 req->iocb.ki_complete = vhost_blk_iocb_complete;
166 req->iocb.ki_flags = IOCB_DIRECT;
167
168 if (write)
169 ret = call_write_iter(blk->backend, &req->iocb,
170 &req->i);
171 else
172 ret = call_read_iter(blk->backend, &req->iocb,
173 &req->i);
174
175 if (ret != -EIOCBQUEUED)
176 vhost_blk_iocb_complete(&req->iocb, ret, 0);
177
178 ret = 0;
179 goto out;
180 }
181
182 if (type == VIRTIO_BLK_T_GET_ID) {
183 char s[] = "vhost_blk";
184 size_t len = min_t(size_t, req->in_iov[0].iov_len,
185 strlen(s));
186
187 ret = copy_to_user(req->in_iov[0].iov_base, s, len);
188 status = ret ? VIRTIO_BLK_S_IOERR : VIRTIO_BLK_S_OK;
189 if (put_user(status, (unsigned char __user *)req->status)) {
190 ret = -EFAULT;
191 goto out_err;
192 }
193 vhost_add_used_and_signal(&blk->dev, vq, req->index, 1);
194 ret = 0;
195 goto out;
196 } else {
197 pr_warn("Unsupported request type %d\n", type);
198 vhost_discard_vq_desc(vq, 1);
199 ret = -EINVAL;
200 return ret;
201 }
202 out_err:
203 vhost_discard_vq_desc(vq, 1);
204 out:
205 return ret;
206 }
207
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 57563 bytes --]
[-- Attachment #3: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2018-11-03 2:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181102182123.29420-1-v.mayatskih@gmail.com>
2018-11-02 18:26 ` [PATCH 0/1] vhost: add vhost_blk driver Michael S. Tsirkin
[not found] ` <20181102182123.29420-2-v.mayatskih@gmail.com>
2018-11-02 18:36 ` [PATCH 1/1] Add " Michael S. Tsirkin
[not found] ` <20181102142645-mutt-send-email-mst@kernel.org>
[not found] ` <CAGF4SLj0TtW_kP935UdqswjT9qaznh_BR7sxW2ALozy7yTJ8vg@mail.gmail.com>
2018-11-02 20:38 ` Michael S. Tsirkin
2018-11-03 2:50 ` kbuild test robot [this message]
2018-11-06 16:03 ` Stefan Hajnoczi
2018-11-05 3:00 ` [PATCH 0/1] vhost: add " Jason Wang
[not found] ` <20181102142446-mutt-send-email-mst@kernel.org>
2018-11-05 14:02 ` Christian Borntraeger
2018-11-06 15:40 ` Stefan Hajnoczi
[not found] ` <6a7f1668-bf2d-0caa-2efd-c8fab5f1db24@redhat.com>
2018-11-05 15:48 ` Christian Borntraeger
[not found] ` <CAGF4SLg6+nt+zV4haXys4Wz2dWPDyx7xHXuA+h01NcQ94j0E1A@mail.gmail.com>
2018-11-06 2:45 ` Jason Wang
[not found] ` <57eefa62-7e66-786d-441c-5dd6b0d451a5@redhat.com>
2018-11-06 7:13 ` Christoph Hellwig
[not found] ` <20181106071349.GA5526@infradead.org>
2018-11-06 21:41 ` Paolo Bonzini
[not found] ` <c042686f-db95-514d-8bd8-92b72e4e087a@de.ibm.com>
[not found] ` <CAGF4SLjC5Gs33k1XzK8vFF5FWE0pwHvB56iQ--DJ_4ADw5yuGg@mail.gmail.com>
2018-11-06 15:21 ` Stefan Hajnoczi
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=201811031005.6kPMDLB3%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=v.mayatskih@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
/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