All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lin Ma <LMa@suse.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Jon Maloy <jmaloy@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"hare@suse.de" <hare@suse.de>
Subject: Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer
Date: Tue, 10 Mar 2020 06:18:00 +0000	[thread overview]
Message-ID: <DM6PR18MB3322E8AF16F20D91557C3335C5FF0@DM6PR18MB3322.namprd18.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]

First of all, Thanks for your reply, Stefan.

We know that the GET LBA STATUS works well under scsi lun passthrough due to the vm directly talks to the scsi target.
I'm curious that if I use file backend image(say qcow2) + qemu scsi emulation, Does it make sense if I issue sg_get_lba_status in vm to get the lba status?
If it doesn't make sense, That could explain why qemu scsi emulation layer lack of this support for a long time and no user complains.

Thanks,
Lin
________________________________
From: Stefan Hajnoczi
Sent: Friday, March 6, 2020 9:01 PM
To: Lin Ma
Cc: qemu-devel@nongnu.org; pbonzini@redhat.com; hare@suse.de; Eric Blake; Jon Maloy
Subject: Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer

On Sun, Mar 01, 2020 at 01:01:29PM +0000, Lin Ma wrote:
> Hi all,
>
> I'm not familiar with scsi, I'm curious why there is no GET LBA STATUS(16) support in qemu scsi emulation layer.
>
> So far, There is only one subcommand of SERVICE ACTION was implemented: The READ CAPACITY(16)
> e.g.
> static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
>     [......]
>     case SERVICE_ACTION_IN_16:
>         /* Service Action In subcommands. */
>         if ((req->cmd.buf[1] & 31) == SAI_READ_CAPACITY_16) {
>             [......]
>         }
>         trace_scsi_disk_emulate_command_SAI_unsupported();
>         goto illegal_request;
>     [......]
>
>
> It seems that this situation has been for a long time. Is the GET LBA STATUS (16 or 32) unnessesary for qemu scsi emulation or did I misunderstand something?

GET LBA STATUS is optional according to the SBC specification so QEMU's
SCSI target is conformant.

I guess the question is which applications need this command?

It's probably a case of no one needing this command enough to implement
it yet.

Stefan

[-- Attachment #2: Type: text/html, Size: 3195 bytes --]

             reply	other threads:[~2020-03-10  6:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  6:18 Lin Ma [this message]
2020-03-10  9:24 ` [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2020-03-10 13:51 Lin Ma
2020-03-01 13:01 Lin Ma
2020-03-06 13:01 ` 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=DM6PR18MB3322E8AF16F20D91557C3335C5FF0@DM6PR18MB3322.namprd18.prod.outlook.com \
    --to=lma@suse.com \
    --cc=hare@suse.de \
    --cc=jmaloy@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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 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.