qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add Support for GET LBA STATUS 16 command in scsi emulation
@ 2020-06-02  7:41 Lin Ma
  2020-06-02  7:41 ` [PATCH 1/4] block: Add bdrv_co_get_lba_status Lin Ma
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Lin Ma @ 2020-06-02  7:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, stefanha, Lin Ma

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 (4):
  block: Add bdrv_co_get_lba_status
  block: Add GET LBA STATUS support
  block: Add block accounting code for GET LBA STATUS
  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            | 92 ++++++++++++++++++++++++++++++++++
 include/block/accounting.h     |  1 +
 include/scsi/constants.h       |  1 +
 include/sysemu/block-backend.h |  2 +
 6 files changed, 177 insertions(+)

-- 
2.24.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-06-03 15:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  7:41 [PATCH 0/4] Add Support for GET LBA STATUS 16 command in scsi emulation Lin Ma
2020-06-02  7:41 ` [PATCH 1/4] block: Add bdrv_co_get_lba_status Lin Ma
2020-06-03 14:46   ` Claudio Fontana
2020-06-02  7:41 ` [PATCH 2/4] block: Add GET LBA STATUS support Lin Ma
2020-06-02  7:42 ` [PATCH 3/4] block: Add block accounting code for GET LBA STATUS Lin Ma
2020-06-03 14:53   ` Claudio Fontana
2020-06-02  7:42 ` [PATCH 4/4] scsi-disk: Add support for the GET LBA STATUS 16 command Lin Ma
2020-06-03 14:51   ` Claudio Fontana
2020-06-02  7:52 ` [PATCH 0/4] Add Support for GET LBA STATUS 16 command in scsi emulation no-reply
2020-06-02  7:53 ` no-reply
2020-06-02  7:54 ` no-reply
2020-06-02  7:56 ` no-reply

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).