From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72EECC433E0 for ; Sun, 26 Jul 2020 15:20:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41E932065E for ; Sun, 26 Jul 2020 15:20:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hgywvEY7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725989AbgGZPUW (ORCPT ); Sun, 26 Jul 2020 11:20:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbgGZPUV (ORCPT ); Sun, 26 Jul 2020 11:20:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72ADAC0619D2; Sun, 26 Jul 2020 08:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uNW1eZ4bx44vGwfBMFPSJ/xfKPBN8zLMfK//Re7u/r8=; b=hgywvEY7znvmMpz/qJfRo27bKH 8KllS+Z3U+0/fzHmuJd2FBTeRViKOOXxYvHeFHUmQ+OPLlwk8cCRCUII73LNMY3iXCTsRotJQC6Bz abLmbfPBHQMDJYgueFPta9U3YmgN5+euI9UuThGRSnOg+NdOTXU/QlxIBesV3n4A3nPO0K3DgIrPa v9SkxBM3g7zT5QqqghYXEi9xn+CiLjUwjPuhLoG9VTk23a2MJU2+bCBd/OjqJ9i9m4bUA55xV4Rdo j2u/9a4lsBmd34Y47dy2wb+oJJi8kkgUuehsf+mqg0NpBQTrg18+ipcQ8M7WGuBpsBYxfS4+vmLgh WfR7QqGA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jziRi-0006pE-JN; Sun, 26 Jul 2020 15:20:14 +0000 Date: Sun, 26 Jul 2020 16:20:14 +0100 From: Christoph Hellwig To: Kanchan Joshi Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk, bcrl@kvack.org, willy@infradead.org, hch@infradead.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, linux-api@vger.kernel.org, Selvakumar S , Nitesh Shetty , Javier Gonzalez Subject: Re: [PATCH v4 5/6] block: enable zone-append for iov_iter of bvec type Message-ID: <20200726152014.GD25328@infradead.org> References: <1595605762-17010-1-git-send-email-joshi.k@samsung.com> <1595605762-17010-6-git-send-email-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1595605762-17010-6-git-send-email-joshi.k@samsung.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org 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 > Signed-off-by: Selvakumar S > Signed-off-by: Nitesh Shetty > Signed-off-by: Javier Gonzalez > --- > 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.