qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] hw/block/nvme: dulbe and dsm support
@ 2020-10-22  7:33 Klaus Jensen
  2020-10-22  7:33 ` [PATCH v4 1/2] hw/block/nvme: add dulbe support Klaus Jensen
  2020-10-22  7:33 ` [PATCH v4 2/2] hw/block/nvme: add the dataset management command Klaus Jensen
  0 siblings, 2 replies; 7+ messages in thread
From: Klaus Jensen @ 2020-10-22  7:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Klaus Jensen, Max Reitz, Keith Busch,
	Klaus Jensen

From: Klaus Jensen <k.jensen@samsung.com>

This adds support for the Deallocated or Unwritten Logical Block error
recovery feature as well as the Dataset Management command.

I wanted to add support for the NPDG and NPDA fields such that the host
could get a hint on how many blocks to request deallocation of for the
deallocation to actually happen, but I cannot find a realiable way to
get the actual block size of the underlying device. If it is an image on
a file system we could typically use the host page size, but if it is a
raw device, we might have 512 byte sectors that we can issue discards
on. And QEMU doesn't seem to provide this without root privileges at
least.

See the two patches for some gotchas.

I also integrated this into my zoned proposal. I'll spare you the v4, nobody
cares anyway. But I put it in my repo[1] for posterity.

  [1]: https://irrelevant.dk/g/pci-nvme.git/tag/?h=zoned-v4.

v4:
  - Removed mixed declaration and code (Keith)
  - Set NPDG and NPDA and account for the blockdev cluster size.

Klaus Jensen (2):
  hw/block/nvme: add dulbe support
  hw/block/nvme: add the dataset management command

 hw/block/nvme-ns.h    |   4 +
 hw/block/nvme.h       |   2 +
 include/block/nvme.h  |  12 ++-
 hw/block/nvme-ns.c    |  40 +++++++--
 hw/block/nvme.c       | 183 +++++++++++++++++++++++++++++++++++++++++-
 hw/block/trace-events |   4 +
 6 files changed, 236 insertions(+), 9 deletions(-)

-- 
2.28.0



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

end of thread, other threads:[~2020-10-22 18:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-22  7:33 [PATCH v4 0/2] hw/block/nvme: dulbe and dsm support Klaus Jensen
2020-10-22  7:33 ` [PATCH v4 1/2] hw/block/nvme: add dulbe support Klaus Jensen
2020-10-22  7:33 ` [PATCH v4 2/2] hw/block/nvme: add the dataset management command Klaus Jensen
2020-10-22 15:01   ` Keith Busch
2020-10-22 17:43     ` Klaus Jensen
2020-10-22 17:50       ` Keith Busch
2020-10-22 18:43         ` Klaus Jensen

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