Re: [PATCH v4 02/10] block: Introduce REQ_OP_ZONE_APPEND

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

 



On 07/04/2020 18:48, Christoph Hellwig wrote:
>> @@ -927,6 +970,7 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
>>   	ssize_t size, left;
>>   	unsigned len, i;
>>   	size_t offset;
>> +	unsigned op = bio_op(bio);
>>   
>>   	/*
>>   	 * Move page array up in the allocated memory for the bio vecs as far as
>> @@ -944,13 +988,20 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
>>   		struct page *page = pages[i];
>>   
>>   		len = min_t(size_t, PAGE_SIZE - offset, left);
>> +		if (op == REQ_OP_ZONE_APPEND) {
>> +			int ret;
>>   
>> +			ret = bio_add_append_page(bio, page, len, offset);
>> +			if (ret != len)
>> +				return -EINVAL;
> 
> I think zone append needs the same try to merge logic to deal with
> page refcounts doesn't it?
> 

Sure, no big deal




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux