Re: [PATCH v4 5/6] block: enable zone-append for iov_iter of bvec type

From: Christoph Hellwig
Date: Sun Jul 26 2020 - 11:20:23 EST


On Fri, Jul 24, 2020 at 09:19:21PM +0530, Kanchan Joshi wrote:
> zone-append with bvec iov_iter gives WARN_ON, and returns -EINVAL.
> Add new helper to process such iov_iter and add pages in bio honoring
> zone-append specific constraints.
> This is used to enable zone-append with io-uring fixed-buffer.
>
> Signed-off-by: Kanchan Joshi <joshi.k@xxxxxxxxxxx>
> Signed-off-by: Selvakumar S <selvakuma.s1@xxxxxxxxxxx>
> Signed-off-by: Nitesh Shetty <nj.shetty@xxxxxxxxxxx>
> Signed-off-by: Javier Gonzalez <javier.gonz@xxxxxxxxxxx>
> ---
> block/bio.c | 31 ++++++++++++++++++++++++++++---
> 1 file changed, 28 insertions(+), 3 deletions(-)
>
> diff --git a/block/bio.c b/block/bio.c
> index 0cecdbc..ade9da7 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -975,6 +975,30 @@ static int __bio_iov_bvec_add_pages(struct bio *bio, struct iov_iter *iter)
> iov_iter_advance(iter, size);
> return 0;
> }
> +static int __bio_iov_bvec_append_add_pages(struct bio *bio, struct iov_iter *iter)

Missing empty line and too long line, please stick to 80 chars for this
code.

Otherwise this looks sensible.