kernel_samsung_a53x/drivers/scsi
Damien Le Moal 08e96cffc0 block: introduce zone_write_granularity limit
[ Upstream commit a805a4fa4fa376bbc145762bb8b09caa2fa8af48 ]

Per ZBC and ZAC specifications, host-managed SMR hard-disks mandate that
all writes into sequential write required zones be aligned to the device
physical block size. However, NVMe ZNS does not have this constraint and
allows write operations into sequential zones to be aligned to the
device logical block size. This inconsistency does not help with
software portability across device types.

To solve this, introduce the zone_write_granularity queue limit to
indicate the alignment constraint, in bytes, of write operations into
zones of a zoned block device. This new limit is exported as a
read-only sysfs queue attribute and the helper
blk_queue_zone_write_granularity() introduced for drivers to set this
limit.

The function blk_queue_set_zoned() is modified to set this new limit to
the device logical block size by default. NVMe ZNS devices as well as
zoned nullb devices use this default value as is. The scsi disk driver
is modified to execute the blk_queue_zone_write_granularity() helper to
set the zone write granularity of host-managed SMR disks to the disk
physical block size.

The accessor functions queue_zone_write_granularity() and
bdev_zone_write_granularity() are also introduced.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@edc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: c8f6f88d2592 ("block: Clear zone limits for a non-zoned stacked queue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 09:22:16 +01:00
..
aacraid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aic7xxx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aic94xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arcmsr scsi: arcmsr: Support new PCI device IDs 1883 and 1886 2024-11-18 12:13:12 +01:00
arm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
be2iscsi scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle() 2024-11-18 12:11:41 +01:00
bfa scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn 2024-11-19 08:44:57 +01:00
bnx2fc scsi: bnx2fc: Fix skb double free in bnx2fc_rcv() 2024-11-18 12:12:00 +01:00
bnx2i Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
csiostor scsi: csiostor: Avoid function pointer casts 2024-11-19 08:44:57 +01:00
cxgbi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cxlflash Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device_handler scsi: core: Introduce enum scsi_disposition 2024-11-18 12:13:21 +01:00
dpt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esas2r Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fcoe scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock" 2024-11-18 12:13:29 +01:00
fnic scsi: fnic: Return error if vmalloc() failed 2024-11-18 12:12:31 +01:00
hisi_sas scsi: hisi_sas: Replace with standard error code return value 2024-11-18 12:12:36 +01:00
ibmvscsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibmvscsi_tgt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isci scsi: isci: Fix an error code problem in isci_io_request_build() 2024-11-18 12:13:21 +01:00
libfc scsi: libfc: Fix up timeout error in fc_fcp_rec_error() 2024-11-18 12:13:12 +01:00
libsas Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpfc scsi: lpfc: Use unsigned type for num_sge 2024-11-18 22:25:34 +01:00
megaraid scsi: megaraid_sas: Increase register read retry rount from 3 to 30 for selected registers 2024-11-18 11:43:21 +01:00
mpt3sas scsi: mpt3sas: Prevent sending diag_reset when the controller is ready 2024-11-19 08:44:36 +01:00
mvsas Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm8001 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qedf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qedi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla2xxx scsi: qla2xxx: Fix system crash due to bad pointer access 2024-11-18 12:11:13 +01:00
qla4xxx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smartpqi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
snic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sym53c8xx_2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ufs scsi: ufs: core: Leave space for '\0' in utf8 desc string 2024-11-18 11:43:03 +01:00
3w-9xxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-9xxx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-sas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-sas.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-xxxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
3w-xxxx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700.scr Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
53c700_d.h_shipped Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a100u2w.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a100u2w.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a2091.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a2091.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a3000.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a3000.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
a4000t.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
advansys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha152x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha152x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1542.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1542.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1740.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aha1740.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
am53c974.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atari_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atp870u.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atp870u.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
BusLogic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
BusLogic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bvme6000_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
constants.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dc395x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dc395x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmx3191d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dpt_i2o.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dpti.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esp_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
esp_scsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain_isa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdomain_pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
FlashPoint.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
g_NCR5380.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth_ioctl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth_proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdth_proc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gvp11.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gvp11.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hosts.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpsa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpsa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpsa_cmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hptiop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hptiop.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
initio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
initio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ips.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ips.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_boot_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_tcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_tcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jazz_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig scsi: jazz_esp: Only build if SCSI core is builtin 2024-11-18 22:25:41 +01:00
lasi700.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libiscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libiscsi_tcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac53c94.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac53c94.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
megaraid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
megaraid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvme16x_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvme147.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvme147.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvumi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvumi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myrb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myrb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myrs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
myrs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ncr53c8xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ncr53c8xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
NCR5380.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
NCR5380.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsp32_io.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmcraid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmcraid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3rom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla1280.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla1280.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicfas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicfas408.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicfas408.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicpti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlogicpti.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid_class.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
script_asm.pl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_debugfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_devinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_dh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_error.c scsi: core: Move scsi_host_busy() out of host lock if it is for per-command 2024-11-18 12:13:26 +01:00
scsi_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_lib.c scsi: core: Move scsi_host_busy() out of host lock if it is for per-command 2024-11-18 12:13:26 +01:00
scsi_lib_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_logging.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_logging.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_priv.h scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler 2024-11-18 12:13:21 +01:00
scsi_proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_sas_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_scan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_srpmb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_srpmb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_sysctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_api.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_fc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_iscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_sas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_srp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsicam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd_dif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd_zbc.c block: introduce zone_write_granularity limit 2024-11-19 09:22:16 +01:00
sense_codes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ses.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sgiwd93.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sim710.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sni_53c710.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr_vendor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_options.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
storvsc_drv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun3_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun3_scsi_vme.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun3x_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_scsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmw_pvscsi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmw_pvscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd33c93.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd33c93.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd719x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wd719x.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-scsifront.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zalon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zorro7xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zorro_esp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00