From: Lin Ma <lma@suse.com>
To: qemu-block@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, qemu-devel@nongnu.org,
mreitz@redhat.com, stefanha@redhat.com, Lin Ma <lma@suse.com>,
pbonzini@redhat.com
Subject: [PATCH v2 0/3] Add Support for GET LBA STATUS 16 command in scsi emulation
Date: Wed, 17 Jun 2020 18:20:16 +0800 [thread overview]
Message-ID: <20200617102019.29652-1-lma@suse.com> (raw)
v2->v1:
Follow Claudio's suggestions and the docker test result, Fix the dereferencing
'void *' pointer issues and the coding style issues.
In this current design, The GET LBA STATUS parameter data only contains
an eight-byte header + one LBA status descriptor.
How to test:
host:~ # qemu-system-x86_64 \
...
-drive file=/vm0/disk0.raw,format=raw,if=none,id=drive0,discard=unmap \
-device scsi-hd,id=scsi0,drive=drive0 \
...
guest:~ # dd if=/dev/zero of=/dev/sda bs=512 seek=1024 count=256
guest:~ # sg_unmap -l 1024 -n 32 /dev/sda
guest:~ # sg_get_lba_status /dev/sda -l 1024
No indication of the completion condition
RTP=0
descriptor LBA: 0x0000000000000400 blocks: 32 deallocated
Lin Ma (3):
block: Add bdrv_co_get_lba_status
block: Add GET LBA STATUS support
scsi-disk: Add support for the GET LBA STATUS 16 command
block/block-backend.c | 38 ++++++++++++++
block/io.c | 43 ++++++++++++++++
hw/scsi/scsi-disk.c | 90 ++++++++++++++++++++++++++++++++++
include/block/accounting.h | 1 +
include/block/block_int.h | 5 ++
include/scsi/constants.h | 1 +
include/sysemu/block-backend.h | 2 +
7 files changed, 180 insertions(+)
--
2.26.0
next reply other threads:[~2020-06-17 10:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 10:20 Lin Ma [this message]
2020-06-17 10:20 ` [PATCH v2 1/3] block: Add bdrv_co_get_lba_status Lin Ma
2020-06-17 10:20 ` [PATCH v2 2/3] block: Add GET LBA STATUS support Lin Ma
2020-06-17 10:20 ` [PATCH v2 3/3] scsi-disk: Add support for the GET LBA STATUS 16 command Lin Ma
2020-06-17 10:54 ` [PATCH v2 0/3] Add Support for GET LBA STATUS 16 command in scsi emulation no-reply
-- strict thread matches above, loose matches on Subject: below --
2020-06-17 10:30 Lin Ma
2020-06-17 11:14 ` no-reply
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=20200617102019.29652-1-lma@suse.com \
--to=lma@suse.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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).