diff options
author | 2020-09-10 17:50:39 +0200 | |
---|---|---|
committer | 2020-09-22 17:31:42 -0400 | |
commit | 52ef2743f16cca9884a9dfd3a8bb013b8e136e4a (patch) | |
tree | 4d12d890a4d1b06caea769373bf8e26bd0fe05e9 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | scsi: core: Only re-run queue in scsi_end_request() if device queue is busy (diff) | |
download | wireguard-linux-52ef2743f16cca9884a9dfd3a8bb013b8e136e4a.tar.xz wireguard-linux-52ef2743f16cca9884a9dfd3a8bb013b8e136e4a.zip |
scsi: target: tcmu: Join tcmu_cmd_get_data_length() and tcmu_cmd_get_block_cnt()
Simplify code by joining tcmu_cmd_get_data_length() and
tcmu_cmd_get_block_cnt() into tcmu_cmd_set_block_cnts(). The new function
sets tcmu_cmd->dbi_cnt and also the new field tcmu_cmd->dbi_bidi_cnt which
is needed for further enhancements in following patches. Simplify some
code by using tcmu_cmd->dbi(_bidi)_cnt instead of calculation from length.
Please note: The calculation of the number of dbis needed for bidi was
wrong. It was based on the length of the first bidi sg only. I changed it
to correctly sum up entire length of all bidi sgs.
Link: https://lore.kernel.org/r/20200910155041.17654-2-bstroesser@ts.fujitsu.com
Acked-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions