linux/drivers/scsi
Damien Le Moal 70e42fd02c scsi: sd_zbc: Write unlock zone from sd_uninit_cmnd()
Releasing a zone write lock only when the write commnand that acquired
the lock completes can cause deadlocks due to potential command
reordering if the lock owning request is requeued and not executed. This
problem exists only with the scsi-mq path as, unlike the legacy path,
requests are moved out of the dispatch queue before being prepared and
so before locking a zone for a write command.

Since sd_uninit_cmnd() is now always called when a request is requeued,
call sd_zbc_write_unlock_zone() from that function for write requests
that acquired a zone lock instead of from sd_done(). Acquisition of a zone
lock by a write command is indicated using the new command
flag SCMD_ZONE_WRITE_LOCK.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-16 20:01:31 -04:00
..
aacraid scsi: aacraid: Fix out of bounds in aac_get_name_resp 2017-08-16 20:01:31 -04:00
aic7xxx scsi: aic7xxx: fix firmware build with O=path 2017-07-24 22:06:36 -04:00
aic94xx
arcmsr
arm
be2iscsi
bfa
bnx2fc scsi: bnx2fc: Simplify CPU hotplug code 2017-07-26 21:51:25 -04:00
bnx2i scsi: bnx2i: Simplify cpu hotplug code 2017-07-26 21:51:25 -04:00
csiostor scsi: csiostor: fail probe if fw does not support FCoE 2017-08-16 20:01:30 -04:00
cxgbi scsi: libcxgbi: add check for valid cxgbi_task_data 2017-07-24 22:16:16 -04:00
cxlflash scsi: cxlflash: return -EFAULT if copy_from_user() fails 2017-07-12 17:06:51 -04:00
device_handler scsi: scsi_dh_alua: remove synchronous STPG support 2017-06-26 12:44:35 -04:00
dpt sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
esas2r scsi: esas2r: Replace semaphore fs_api_semaphore with mutex 2017-06-12 21:17:22 -04:00
fcoe SCSI misc on 20170704 2017-07-06 12:10:33 -07:00
fnic SCSI misc on 20170704 2017-07-06 12:10:33 -07:00
hisi_sas scsi: hisi_sas: make several const arrays static 2017-07-12 17:23:07 -04:00
ibmvscsi scsi: ibmvfc: constify dev_pm_ops structures. 2017-07-01 17:05:22 -04:00
ibmvscsi_tgt driver core patches for 4.13-rc1 2017-07-03 20:27:48 -07:00
isci scsi: isci: fix typo in function names 2017-07-12 17:09:57 -04:00
libfc scsi: libfc: pass an error pointer to fc_disc_error() 2017-07-12 17:25:12 -04:00
libsas scsi: sas: scsi_queue_work can fail, so make callers aware 2017-06-27 21:28:04 -04:00
lpfc Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2017-07-11 15:36:52 -07:00
megaraid scsi: megaraid_sas: fix error handle in megasas_probe_one 2017-08-16 20:01:30 -04:00
mpt3sas scsi: Create two versions of scsi_internal_device_unblock() 2017-06-12 20:55:59 -04:00
mvsas
osd blk-map: call blk_queue_bounce from blk_rq_append_bio 2017-06-27 12:13:21 -06:00
pcmcia
pm8001
qedf scsi: qedf: Limit number of CQs 2017-07-26 22:00:39 -04:00
qedi scsi: qedi: Fix return code in qedi_ep_connect() 2017-07-24 22:24:29 -04:00
qla2xxx scsi: qla2xxx: Fix system crash while triggering FW dump 2017-08-08 11:49:50 -04:00
qla4xxx
smartpqi scsi: smartpqi: limit transfer length to 1MB 2017-07-17 22:56:33 -04:00
snic scsi: snic: fix a couple of spelling mistakes/typos 2017-07-01 17:13:56 -04:00
sym53c8xx_2
ufs scsi: ufs: flush eh_work when eh_work scheduled. 2017-07-01 16:51:23 -04:00
.gitignore
3w-9xxx.c
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c
3w-xxxx.h
53c700_d.h_shipped
53c700.c scsi: 53c700: switch to dma_alloc_attrs 2017-06-26 15:01:05 -04:00
53c700.h
53c700.scr
a100u2w.c
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_scsi.c scsi: atari_scsi: Use m68k_realnum_memory for FastRAM test 2017-06-12 20:48:08 -04:00
atp870u.c
atp870u.h
BusLogic.c
BusLogic.h
bvme6000_scsi.c
ch.c
constants.c
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c
dpti.h
eata_generic.h
eata_pio.c
eata_pio.h
eata.c
esp_scsi.c
esp_scsi.h
fdomain.c
fdomain.h
FlashPoint.c
g_NCR5380.c
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gdth.c
gdth.h
gvp11.c
gvp11.h
hosts.c
hpsa_cmd.h scsi: hpsa: update identify physical device structure 2017-06-12 20:48:00 -04:00
hpsa.c scsi: hpsa: limit transfer length to 1MB 2017-07-17 22:51:47 -04:00
hpsa.h scsi: hpsa: remove abort handler 2017-06-12 20:48:01 -04:00
hptiop.c scsi: hptiop: make function hptiop_iop_request_callback_itl static 2017-06-26 15:01:02 -04:00
hptiop.h
imm.c
imm.h
initio.c
initio.h
ipr.c scsi: ipr: Fix scsi-mq lockdep issue 2017-08-08 11:49:51 -04:00
ipr.h scsi: ipr: Fix scsi-mq lockdep issue 2017-08-08 11:49:51 -04:00
ips.c sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
ips.h sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
iscsi_boot_sysfs.c
iscsi_tcp.c
iscsi_tcp.h
jazz_esp.c
Kconfig scsi: lpfc: fix linking against modular NVMe support 2017-07-24 22:21:55 -04:00
lasi700.c
libiscsi_tcp.c
libiscsi.c scsi: libiscsi: use kvzalloc for iscsi_pool_init 2017-06-12 20:48:04 -04:00
mac53c94.c
mac53c94.h
mac_esp.c
mac_scsi.c
Makefile
megaraid.c
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c
NCR5380.h
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32_debug.c
nsp32_io.h
nsp32.c
nsp32.h
osst_detect.h
osst_options.h
osst.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
osst.h
pmcraid.c
pmcraid.h
ppa.c
ppa.h
ps3rom.c
qla1280.c ia64, scsi: update references for the device-io book 2017-05-16 08:44:21 -03:00
qla1280.h
qlogicfas408.c
qlogicfas408.h
qlogicfas.c
qlogicpti.c
qlogicpti.h
raid_class.c
script_asm.pl
scsi_common.c
scsi_debug.c UUID/GUID updates: 2017-07-03 09:55:26 -07:00
scsi_debugfs.c
scsi_debugfs.h
scsi_devinfo.c
scsi_dh.c
scsi_error.c SCSI misc on 20170704 2017-07-06 12:10:33 -07:00
scsi_ioctl.c
scsi_lib_dma.c
scsi_lib.c SCSI misc on 20170704 2017-07-06 12:10:33 -07:00
scsi_logging.c
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_pm.c
scsi_priv.h scsi: Only add commands to the device command list if required by the LLD 2017-06-12 20:55:59 -04:00
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c SCSI misc on 20170704 2017-07-06 12:10:33 -07:00
scsi_sysctl.c
scsi_sysfs.c scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state 2017-07-01 16:54:44 -04:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c scsi: scsi_transport_fc: return -EBUSY for deleted vport 2017-07-24 22:17:30 -04:00
scsi_transport_iscsi.c
scsi_transport_sas.c block: don't set bounce limit in blk_init_allocated_queue 2017-06-27 12:13:45 -06:00
scsi_transport_spi.c
scsi_transport_srp.c scsi: Protect SCSI device state changes with a mutex 2017-06-12 20:55:59 -04:00
scsi_typedefs.h
scsi.c scsi: default to scsi-mq 2017-06-27 21:31:12 -04:00
scsi.h
scsicam.c scsi: fix some kernel-doc markups 2017-05-16 08:44:15 -03:00
sd_dif.c
sd_zbc.c scsi: sd_zbc: Write unlock zone from sd_uninit_cmnd() 2017-08-16 20:01:31 -04:00
sd.c scsi: sd_zbc: Write unlock zone from sd_uninit_cmnd() 2017-08-16 20:01:31 -04:00
sd.h sd: add support for TCG OPAL self encrypting disks 2017-06-29 10:21:15 -04:00
sense_codes.h
ses.c scsi: ses: Fix wrong page error 2017-08-08 11:49:52 -04:00
sg.c scsi: sg: only check for dxfer_len greater than 256M 2017-07-27 08:50:11 -04:00
sgiwd93.c scsi: sgiwd93: switch to dma_alloc_attrs 2017-06-26 15:01:06 -04:00
sim710.c
sni_53c710.c
sr_ioctl.c
sr_vendor.c
sr.c
sr.h
st_options.h
st.c scsi: st: fix blk_get_queue usage 2017-08-08 11:49:51 -04:00
st.h
stex.c
storvsc_drv.c scsi: storvsc: use default I/O timeout handler for FC devices 2017-06-26 12:33:26 -04:00
sun3_scsi_vme.c
sun3_scsi.c
sun3x_esp.c
sun_esp.c scsi: sun_esp: fix device reference leaks 2017-06-27 21:46:55 -04:00
sym53c416.c
sym53c416.h
virtio_scsi.c scsi: virtio_scsi: always read VPD pages for multiqueue too 2017-07-12 17:15:54 -04:00
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c
wd719x.h
xen-scsifront.c scsi: xen-scsifront: Remove code that zeroes driver-private command data 2017-06-12 21:02:04 -04:00
zalon.c
zorro7xx.c