linux_dsm_epyc7002/drivers/block
Damien Le Moal 9dd44c7e99 null_blk: Fix zoned command handling
For write operations issued to a null_blk device with zoned mode
enabled, the state and write pointer position of the zone targeted by
the command should be checked before badblocks and memory backing
are handled as the write may be first failed due to, for instance, a
sector position not aligned with the zone write pointer. This order of
checking for errors reflects more accuratly the behavior of physical
zoned devices.

Furthermore, the write pointer position of the target zone should be
incremented only and only if no errors are reported by badblocks and
memory backing handling.

To fix this, introduce the small helper function null_process_cmd()
which execute null_handle_badblocks() and null_handle_memory_backed()
and use this function in null_zone_write() to correctly handle write
requests to zoned null devices depending on the type and state of the
write target zone. Also call this function in null_handle_zoned() to
process read requests to zoned null devices.

null_process_cmd() is called directly from null_handle_cmd() for
regular null devices, resulting in no functional change for these type
of devices. To have symmetric names, the function null_handle_zoned()
is renamed to null_process_zoned_cmd().

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-23 09:35:09 -06:00
..
aoe
drbd
mtip32xx
paride
rsxx
xen-blkback
zram
amiflop.c
ataflop.c
brd.c
cryptoloop.c
floppy.c
Kconfig
loop.c
loop.h
Makefile
nbd.c
null_blk_main.c null_blk: Fix zoned command handling 2020-04-23 09:35:09 -06:00
null_blk_trace.c
null_blk_trace.h
null_blk_zoned.c null_blk: Fix zoned command handling 2020-04-23 09:35:09 -06:00
null_blk.h null_blk: Fix zoned command handling 2020-04-23 09:35:09 -06:00
pktcdvd.c
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c rbd: don't mess with a page vector in rbd_notify_op_lock() 2020-04-13 08:55:49 +02:00
skd_main.c
skd_s1120.h
sunvdc.c
swim3.c
swim_asm.S
swim.c
sx8.c
umem.c
umem.h
virtio_blk.c
xen-blkfront.c xen: branch for v5.7-rc1b 2020-04-10 17:20:06 -07:00
xsysace.c
z2ram.c