qemu-e2k/hw
Klaus Jensen 54064e51d1 hw/block/nvme: add dulbe support
Add support for reporting the Deallocated or Unwritten Logical Block
Error (DULBE).

Rely on the block status flags reported by the block layer and consider
any block with the BDRV_BLOCK_ZERO flag to be deallocated.

Multiple factors affect when a Write Zeroes command result in
deallocation of blocks.

  * the underlying file system block size
  * the blockdev format
  * the 'discard' and 'logical_block_size' parameters

     format | discard | wz (512B)  wz (4KiB)  wz (64KiB)
    -----------------------------------------------------
      qcow2    ignore   n          n          y
      qcow2    unmap    n          n          y
      raw      ignore   n          y          y
      raw      unmap    n          y          y

So, this works best with an image in raw format and 4KiB LBAs, since
holes can then be punched on a per-block basis (this assumes a file
system with a 4kb block size, YMMV). A qcow2 image, uses a cluster size
of 64KiB by default and blocks will only be marked deallocated if a full
cluster is zeroed or discarded. However, this *is* consistent with the
spec since Write Zeroes "should" deallocate the block if the Deallocate
attribute is set and "may" deallocate if the Deallocate attribute is not
set. Thus, we always try to deallocate (the BDRV_REQ_MAY_UNMAP flag is
always set).

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
2021-02-08 18:55:48 +01:00
..
9pfs 9pfs: Convert reclaim list to QSLIST 2021-01-22 18:26:40 +01:00
acpi acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
adc
alpha
arm acpi: use constants as strncpy limit 2021-02-05 08:52:59 -05:00
audio
avr
block hw/block/nvme: add dulbe support 2021-02-08 18:55:48 +01:00
char hw/char/exynos4210_uart: Fix missing call to report ready for input 2021-02-02 17:00:54 +00:00
core confidential guest support: Alter virtio default properties for protected guests 2021-02-08 16:57:38 +11:00
cpu
cris
display display/ui: add a callback to indicate GL state is flushed 2021-02-04 15:58:54 +01:00
dma hw/arm/xlnx-versal: Versal SoC requires ZDMA 2021-02-03 10:15:50 +00:00
gpio hw: gpio: implement gpio-pwr driver for qemu reset/poweroff 2021-01-29 10:47:28 +00:00
hppa
hyperv
i2c
i386 sev: Remove false abstraction of flash encryption 2021-02-08 16:57:38 +11:00
ide block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
input
intc hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register 2021-02-02 17:00:55 +00:00
ipack
ipmi
isa
lm32
m68k
mem nvdimm: check -object memory-backend-file, readonly=on option 2021-02-01 17:07:34 -05:00
microblaze
mips cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass 2021-02-05 10:24:15 -10:00
misc hw/misc/pvpanic: add PCI interface support 2021-01-29 10:47:28 +00:00
moxie
net net: checksum: Introduce fine control over checksum type 2021-01-25 17:04:56 +08:00
nios2
nubus
nvram
openrisc
pci pci: add romsize property 2021-02-05 08:52:58 -05:00
pci-bridge
pci-host
pcmcia
ppc spapr: PEF: prevent migration 2021-02-08 16:57:38 +11:00
rdma
riscv
rtc
rx
s390x s390: Recognize confidential-guest-support option 2021-02-08 16:57:38 +11:00
scsi block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
sd block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
semihosting
sh4
smbios
sparc
sparc64
ssi hw/ssi: imx_spi: Correct tx and rx fifo endianness 2021-02-02 17:00:55 +00:00
timer arm: Remove frq properties on CMSDK timer, dualtimer, watchdog, ARMSSE 2021-01-29 15:54:44 +00:00
tpm tpm: tpm_spapr: Remove unused tracepoint 2021-01-25 20:56:38 -05:00
tricore
unicore32
usb block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
vfio ui: add an optional get_flags callback to GraphicHwOps 2021-02-04 15:58:54 +01:00
virtio vhost: Check for valid vdev in vhost_backend_handle_iotlb_msg 2021-02-05 08:52:59 -05:00
watchdog arm: Remove frq properties on CMSDK timer, dualtimer, watchdog, ARMSSE 2021-01-29 15:54:44 +00:00
xen pci: add romsize property 2021-02-05 08:52:58 -05:00
xenpv
xtensa
Kconfig hw/net/can: ZynqMP CAN device requires PTIMER 2021-02-03 10:15:50 +00:00
meson.build