Re: [PATCH 4/5] tcm_vhost: fix iov array offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 19, 2012 at 4:39 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> Il 19/04/2012 10:36, Zhi Yong Wu ha scritto:
>>> This counts the iov[out] element as part of the data.  Should be
>>> something like this instead:
>>>
>>>  #warning FIXME: BIDI operation
>>>    if (in > 1) {
>>>        data_first = out + 1;
>>>        data_num = in - 1;
>>>    } else {
>>>        data_first = 1;
>>>        data_num = out - 1;
>>>    }
>>>
>>>    for (i = 0; i < data_num; i++) {
>>>        exp_data_len += vq->iov[data_first + i].iov_len;
>>>    }
>> I totally understand these lines of code, and it assume that one
>> request can not have both in>1 and out>1? That is, one request is
>> either read, or write, right?
>
> In general no but for now yes (that's the #warning).
ah, BIDI == BIDIrection. thanks. i will fix it in next patch.
>
> Paolo



-- 
Regards,

Zhi Yong Wu
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux