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

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

 



> @@ -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?



[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