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: NIlias Tsitsimpis <iliastsi@arrikto.com> Reviewed-by: NMike Christie <mchristi@redhat.com> Signed-off-by: NXiubo Li <lixiubo@cmss.chinamobile.com> Cc: stable@vger.kernel.org # 3.18+ Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
Showing
想要评论请 注册 或 登录