Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp406949ybg; Sun, 26 Jul 2020 08:21:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYQjHRxlvwvOPF6DNw85O2qnw6v4XiGjkOBKavXs5pEQz4VCETu0bghY4+/5TDecDLz+5n X-Received: by 2002:a05:6402:176e:: with SMTP id da14mr17864162edb.262.1595776883397; Sun, 26 Jul 2020 08:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595776883; cv=none; d=google.com; s=arc-20160816; b=y3L0hb3IwpQi8zj6ZnQbeMhNKp1VqQ7s1Ik+vP7FfY78rjvgv5jDUdRcc5LHpFSAHi oT/6NjyPQxsvPZpSMRNSbSrcxiKOs+pCR7GuuyOwYYWXItI0ToViVAaJ1c5o+/Jri3G0 1pEmTLfrq38K58BLGRxCj4DyooGwFPPRU9aWLlWVG63PswENJe/j4KQXJ20M+g8DcdeW gtwiiJkoi72rHTfyd4F7pHY18B5Op105wkhyTQOs4s7cVdckEN2IKbbYE9hRbhdNWz21 Co6L2tHzptj+hC9v5wrqCa/UOiXC+b0BDI0+FKIwnmr7P/4ZB6Mk4kOzCJz9YJEWOve7 KCHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=uNW1eZ4bx44vGwfBMFPSJ/xfKPBN8zLMfK//Re7u/r8=; b=qIAh3tFPhVsvoPhiPEo5FT4zv+0EBYh317VP4rUXLTHk918/LzyxwtG0Bip1Bqu9V9 CgvfK9nxmtU2Xr3c3PGdc/B4+s3RfK3Eavb9RYuOTu0xEQqw1pGypRaRV0zhqrKmwpuP 7XCnIob5FvpOg3L1KTWEunG2jXJtQL8uE/fuWypWYb5wTmfQ7Jm24TcmPSSZCLA9Lk4B 2+mfS1cUt29GEQtbAs3lp0lWfDqWcbUxxo1/ZnU9KkaNpB+jFKzOo04anLmqTO7GAleJ Do6z49Dk36ebDSimmgOjlil6m69IRVSBGJ1WrNgogUde690L8IUV61WAiU/YhIgqSSfd Iu+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=hgywvEY7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce2si4268341edb.531.2020.07.26.08.21.01; Sun, 26 Jul 2020 08:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=hgywvEY7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726937AbgGZPUW (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.