Re: [PATCH] rbd: enforce parent overlap

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

 



On 04/22/2013 01:34 PM, Josh Durgin wrote:
>> +     * We need to zero anything beyond the parent overlap
>> +     * boundary.  Since rbd_img_obj_request_read_callback()
>> +     * will zero anything beyond the end of a short read, an
>> +     * easy way to do this is to pretend the data from the
>> +     * parent came up short--ending at the overlap boundary.
>> +     */

Sorry, I missed this one.

>> +    rbd_assert(obj_request->img_offset < U64_MAX - obj_request->length);
>> +    obj_end = obj_request->img_offset + obj_request->length;
>> +    rbd_dev = obj_request->img_request->rbd_dev;
>> +    if (obj_end > rbd_dev->parent_overlap) {
> 
> Shouldn't this be >=, since the overlap is a size?

Does the overlap define the maximum byte offste included in
the overlap, or does it define the first offset not included?

If it's the former, then I agree with you (and it's not
what I thought).

					-Alex

>> +        u64 xferred = 0;
>> +
>> +        if (obj_request->img_offset < rbd_dev->parent_overlap)
>> +            xferred = rbd_dev->parent_overlap -
>> +                    obj_request->img_offset;
>> +
>> +        obj_request->xferred = min(img_request->xferred, xferred);
>> +    } else { 

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




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux