Re: [PATCH 23/26] block: implement bio helper to add iter bvec pages to bio

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

 



On 12/16/18 9:40 AM, Christoph Hellwig wrote:
>> +	do {
>> +		size_t size;
>> +
>> +		bv = iter->bvec + iter->iov_offset;
>> +		size = bio_add_page(bio, bv->bv_page, bv->bv_len, bv->bv_offset);
> 
> Overly long line here.

Will fix.

>> +		if (size != bv->bv_len)
>> +			break;
>> +		iov_iter_advance(iter, size);
>> +	} while (iov_iter_count(iter) && !bio_full(bio));
> 
> bio_add_page already does the bio_full check for you.

get_pages does the same thing, but I guess it makes more sense there since
we'd have to undo if we could not add.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux