target: pass sense_reason as a return value
Pass the sense reason as an explicit return value from the I/O submission path instead of storing it in struct se_cmd and using negative return values. This cleans up a lot of the code pathes, and with the sparse annotations for the new sense_reason_t type allows for much better error checking. (nab: Convert spc_emulate_modesense + spc_emulate_modeselect to use sense_reason_t with Roland's MODE SELECT changes) Signed-off-by:Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by:
Nicholas Bellinger <nab@linux-iscsi.org>
Showing
- drivers/infiniband/ulp/srpt/ib_srpt.c 18 additions, 25 deletionsdrivers/infiniband/ulp/srpt/ib_srpt.c
- drivers/scsi/qla2xxx/tcm_qla2xxx.c 2 additions, 2 deletionsdrivers/scsi/qla2xxx/tcm_qla2xxx.c
- drivers/target/iscsi/iscsi_target.c 28 additions, 52 deletionsdrivers/target/iscsi/iscsi_target.c
- drivers/target/iscsi/iscsi_target_core.h 1 addition, 1 deletiondrivers/target/iscsi/iscsi_target_core.h
- drivers/target/iscsi/iscsi_target_erl1.c 5 additions, 6 deletionsdrivers/target/iscsi/iscsi_target_erl1.c
- drivers/target/target_core_alua.c 45 additions, 53 deletionsdrivers/target/target_core_alua.c
- drivers/target/target_core_alua.h 3 additions, 3 deletionsdrivers/target/target_core_alua.h
- drivers/target/target_core_device.c 9 additions, 22 deletionsdrivers/target/target_core_device.c
- drivers/target/target_core_file.c 11 additions, 11 deletionsdrivers/target/target_core_file.c
- drivers/target/target_core_iblock.c 27 additions, 28 deletionsdrivers/target/target_core_iblock.c
- drivers/target/target_core_internal.h 1 addition, 1 deletiondrivers/target/target_core_internal.h
- drivers/target/target_core_pr.c 411 additions, 507 deletionsdrivers/target/target_core_pr.c
- drivers/target/target_core_pr.h 5 additions, 5 deletionsdrivers/target/target_core_pr.h
- drivers/target/target_core_pscsi.c 24 additions, 27 deletionsdrivers/target/target_core_pscsi.c
- drivers/target/target_core_rd.c 6 additions, 4 deletionsdrivers/target/target_core_rd.c
- drivers/target/target_core_sbc.c 40 additions, 47 deletionsdrivers/target/target_core_sbc.c
- drivers/target/target_core_spc.c 63 additions, 63 deletionsdrivers/target/target_core_spc.c
- drivers/target/target_core_transport.c 99 additions, 153 deletionsdrivers/target/target_core_transport.c
- drivers/target/target_core_ua.c 4 additions, 7 deletionsdrivers/target/target_core_ua.c
- drivers/target/target_core_ua.h 1 addition, 1 deletiondrivers/target/target_core_ua.h
Loading
Please register or sign in to comment