All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: target-devel@vger.kernel.org
Subject: Re: strange dm-crypt problem with qemu / LIO / vhost
Date: Mon, 06 Apr 2020 23:05:08 +0000	[thread overview]
Message-ID: <20200407010508.70bd36c6@suse.de> (raw)
In-Reply-To: <5e29cc94-a21d-2506-9bac-48d8d29ab85b@posteo.de>

On Tue, 7 Apr 2020 00:01:49 +0200, Andreas Kinzler wrote:

> > It's normally a good idea to provide your kernel version with any
> > bug reports...  
> 
> Sorry. Kernel is 5.3.18 vanilla from kernel.org

Thanks.

> >> [ 3683.414936] bio error: 0000000024d02dea,  err: 10
> >> This is from target_core_iblock.c function "iblock_bio_done".
> >> Any ideas? Hints?  
> > This looks like an I/O error from the block layer / underlying dm-crypt
> > block device. It's not much to go on, but I'd suggest tracing the I/O
> > further down the stack.  
> 
> In the meantime, I was able to debug further. Actually in Windows only 
> the "format disk" operation fails. If you do that otherwise and later 
> use the formatted disk, it seems to work. So I assume it is a special 
> SCSI opcode that is only used during "format disk" that fails.
> 
> What would be a simple debug statement in iblock_bio_done to print the 
> SCSI opcode to find out which operation failed?

You could print the SCSI opcode value with something like:

--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -290,7 +290,8 @@ static void iblock_bio_done(struct bio *bio)
        struct iblock_req *ibr = cmd->priv;
 
        if (bio->bi_status) {
-               pr_err("bio error: %p,  err: %d\n", bio, bio->bi_status);
+               pr_err("op: %#x, bio error: %p, err: %d\n", cmd->t_task_cdb[0],
+                      bio, bio->bi_status);
                /*
                 * Bump the ib_bio_err_cnt and release bio.
                 */


include/scsi/scsi_proto.h should allow you to lookup the name.

Cheers, David

  parent reply	other threads:[~2020-04-06 23:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 18:21 strange dm-crypt problem with qemu / LIO / vhost Andreas Kinzler
2020-04-06 21:33 ` David Disseldorp
2020-04-06 22:01 ` Andreas Kinzler
2020-04-06 23:05 ` David Disseldorp [this message]
2020-04-07 10:29 ` Andreas Kinzler

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=20200407010508.70bd36c6@suse.de \
    --to=ddiss@suse.de \
    --cc=target-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.