Skip to content
Commit abe342a5 authored by Xiubo Li's avatar Xiubo Li Committed by Nicholas Bellinger
Browse files

tcmu: Fix wrongly calculating of the base_command_size



The t_data_nents and t_bidi_data_nents are the numbers of the
segments, but it couldn't be sure the block size equals to size
of the segment.

For the worst case, all the blocks are discontiguous and there
will need the same number of iovecs, that's to say: blocks == iovs.
So here just set the number of iovs to block count needed by tcmu
cmd.

Tested-by: default avatarIlias Tsitsimpis <iliastsi@arrikto.com>
Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarXiubo Li <lixiubo@cmss.chinamobile.com>
Cc: stable@vger.kernel.org # 3.18+
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent ab22d260
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment