mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-28 00:06:55 +00:00
dm: virtio: add debugging information in virtio-blk
Output debugging message when virtio-blk completes with error. v1 -> v2: - fix coding style - refine debugging message Tracked-On: #1422 Signed-off-by: Peter Fang <peter.fang@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
parent
7101ce87a7
commit
ba4e72bd0a
@ -171,6 +171,9 @@ virtio_blk_done(struct blockif_req *br, int err)
|
||||
struct virtio_blk_ioreq *io = br->param;
|
||||
struct virtio_blk *blk = io->blk;
|
||||
|
||||
if (err)
|
||||
DPRINTF(("virtio_blk: done with error = %d\n\r", err));
|
||||
|
||||
/* convert errno into a virtio block error return */
|
||||
if (err == EOPNOTSUPP || err == ENOSYS)
|
||||
*io->status = VIRTIO_BLK_S_UNSUPP;
|
||||
@ -245,7 +248,7 @@ virtio_blk_proc(struct virtio_blk *blk, struct virtio_vq_info *vq)
|
||||
}
|
||||
io->req.resid = iolen;
|
||||
|
||||
DPRINTF(("virtio-block: %s op, %zd bytes, %d segs, offset %ld\n\r",
|
||||
DPRINTF(("virtio_blk: %s op, %zd bytes, %d segs, offset %ld\n\r",
|
||||
writeop ? "write" : "read/ident", iolen, i - 1,
|
||||
io->req.offset));
|
||||
|
||||
@ -309,7 +312,7 @@ virtio_blk_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
int rc;
|
||||
|
||||
if (opts == NULL) {
|
||||
printf("virtio-block: backing device required\n");
|
||||
printf("virtio_blk: backing device required\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user