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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62A1EECAAA1 for ; Tue, 6 Sep 2022 06:25:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231901AbiIFGZc (ORCPT ); Tue, 6 Sep 2022 02:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237992AbiIFGZ2 (ORCPT ); Tue, 6 Sep 2022 02:25:28 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F147C52448; Mon, 5 Sep 2022 23:25:26 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 096F468AA6; Tue, 6 Sep 2022 08:25:22 +0200 (CEST) Date: Tue, 6 Sep 2022 08:25:22 +0200 From: Christoph Hellwig To: Kanchan Joshi Cc: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org, asml.silence@gmail.com, io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Anuj Gupta Subject: Re: [PATCH for-next v4 3/4] block: add helper to map bvec iterator for passthrough Message-ID: <20220906062522.GA1566@lst.de> References: <20220905134833.6387-1-joshi.k@samsung.com> <20220905134833.6387-4-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220905134833.6387-4-joshi.k@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Sep 05, 2022 at 07:18:32PM +0530, Kanchan Joshi wrote: > +static struct bio *bio_map_get(struct request *rq, unsigned int nr_vecs, > gfp_t gfp_mask) > { > @@ -259,13 +252,31 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter, > bio = bio_alloc_bioset(NULL, nr_vecs, opf, gfp_mask, > &fs_bio_set); > if (!bio) > - return -ENOMEM; > + return NULL; This context looks weird? That bio_alloc_bioset should not be there, as biosets are only used for file system I/O, which this is not.