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 Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux