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=-16.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8148DC433E6 for ; Thu, 28 Jan 2021 17:27:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F84864DF9 for ; Thu, 28 Jan 2021 17:27:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233166AbhA1R1N (ORCPT ); Thu, 28 Jan 2021 12:27:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:53686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232965AbhA1RYo (ORCPT ); Thu, 28 Jan 2021 12:24:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B21F464DF9; Thu, 28 Jan 2021 17:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611854642; bh=Zs2s8ZvTIPYGR4BFwbfSOZLDbQpy7x8YdhBNvxD8Dok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dYixlgG2K3aWwDLaJowzYgnOFmByUyz6PjYTAvhTfbvB+e9gPk0mBgRRvBez32mDu g+/BEjUeO2s7tBkV+OtFiT2UlC3mn8gjSXsXC5Xpxm6KRmfDNpc8Z7+gIuibodKK4H l1i2cwlyEJsSukyTcGjNrcpQfEjVAbCBE6DwgrePquTtnF0XcOLlk2eq3YbBOrXlcF 50KQtEwBjnE5+b+zJhPCQRu9YN8ISWqvJskcg8GQfdpqKteYo166Aso1a23IfJvuVj VfAojNA36QPu6qz6sKkxuvacugxCY5JwWT3tNh6OxRrRzVwkEqP+vyF3JrdyJAT+Ys o8BRepJ02vTLA== Date: Thu, 28 Jan 2021 09:24:02 -0800 From: "Darrick J. Wong" To: Chaitanya Kulkarni Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, xen-devel@lists.xenproject.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-fscrypt@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-pm@vger.kernel.org, linux-mm@kvack.org, axboe@kernel.dk, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, konrad.wilk@oracle.com, roger.pau@citrix.com, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, agk@redhat.com, snitzer@redhat.com, hch@lst.de, sagi@grimberg.me, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, tytso@mit.edu, jaegeuk@kernel.org, ebiggers@kernel.org, shaggy@kernel.org, konishi.ryusuke@gmail.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org, rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, akpm@linux-foundation.org, hare@suse.de, gustavoars@kernel.org, tiwai@suse.de, alex.shi@linux.alibaba.com, asml.silence@gmail.com, ming.lei@redhat.com, tj@kernel.org, osandov@fb.com, bvanassche@acm.org, jefflexu@linux.alibaba.com Subject: Re: [RFC PATCH 18/34] iomap: use bio_new in iomap_dio_bio_actor Message-ID: <20210128172402.GO7698@magnolia> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Wed, Jan 27, 2021 at 11:11:17PM -0800, Chaitanya Kulkarni wrote: > Signed-off-by: Chaitanya Kulkarni > --- > fs/iomap/direct-io.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > index f6c557a1bd25..0737192f7e5c 100644 > --- a/fs/iomap/direct-io.c > +++ b/fs/iomap/direct-io.c > @@ -267,9 +267,8 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, > goto out; > } > > - bio = bio_alloc(GFP_KERNEL, nr_pages); > - bio_set_dev(bio, iomap->bdev); > - bio->bi_iter.bi_sector = iomap_sector(iomap, pos); > + bio = bio_new(iomap->bdev, iomap_sector(iomap, pos), 0, 0, > + nr_pages, GFP_KERNEL); op == 0? It seems a little odd to me that we'd set the field to zero and then construct bi_opf later. It also strikes me as a little strange that bi_opf is combined from the third and fourth parameters, but maybe some day you'll want to do some parameter verification on debug kernels or something...? --D > bio->bi_write_hint = dio->iocb->ki_hint; > bio->bi_ioprio = dio->iocb->ki_ioprio; > bio->bi_private = dio; > -- > 2.22.1 > 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 F2843C433DB for ; Thu, 28 Jan 2021 17:26:22 +0000 (UTC) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62F6861481 for ; Thu, 28 Jan 2021 17:26:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62F6861481 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10SHAlng184769; Thu, 28 Jan 2021 17:26:21 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brkw8yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 17:26:21 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10SHAG9C010988; Thu, 28 Jan 2021 17:24:20 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wr0n6t8-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 17:24:20 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l5B1n-0002ol-Ct; Thu, 28 Jan 2021 09:24:19 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l5B1Z-0002m6-Mw for ocfs2-devel@oss.oracle.com; Thu, 28 Jan 2021 09:24:05 -0800 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10SHBKAa169689 for ; Thu, 28 Jan 2021 17:24:05 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcr06r3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 17:24:05 +0000 Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10SHEQVH001309 for ; Thu, 28 Jan 2021 17:24:04 GMT Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by userp2030.oracle.com with ESMTP id 36c0pa90fh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 28 Jan 2021 17:24:04 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id B21F464DF9; Thu, 28 Jan 2021 17:24:02 +0000 (UTC) Date: Thu, 28 Jan 2021 09:24:02 -0800 From: "Darrick J. Wong" To: Chaitanya Kulkarni Message-ID: <20210128172402.GO7698@magnolia> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> X-PDR: PASS X-Source-IP: 198.145.29.99 X-ServerName: mail.kernel.org X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 mx a:vger.kernel.org a:mail.wl.linuxfoundation.org ~all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9878 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_safe policy=tap score=0 classifier= adjust=0 reason=safe scancount=1 engine=8.12.0-2009150000 definitions=main-2101280083 X-Spam: OrgSafeList X-SpamRule: orgsafelist X-Mailman-Approved-At: Thu, 28 Jan 2021 09:24:17 -0800 Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, gustavoars@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, linux-nvme@lists.infradead.org, philipp.reisner@linbit.com, linux-mm@kvack.org, dm-devel@redhat.com, target-devel@vger.kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, drbd-dev@lists.linbit.com, naohiro.aota@wdc.com, linux-nilfs@vger.kernel.org, sagi@grimberg.me, linux-scsi@vger.kernel.org, konrad.wilk@oracle.com, osandov@fb.com, ebiggers@kernel.org, xen-devel@lists.xenproject.org, ngupta@vflare.org, len.brown@intel.com, linux-pm@vger.kernel.org, hare@suse.de, ming.lei@redhat.com, linux-block@vger.kernel.org, tj@kernel.org, linux-fscrypt@vger.kernel.org, viro@zeniv.linux.org.uk, jefflexu@linux.alibaba.com, jaegeuk@kernel.org, konishi.ryusuke@gmail.com, bvanassche@acm.org, axboe@kernel.dk, damien.lemoal@wdc.com, tytso@mit.edu, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, minchan@kernel.org, linux-fsdevel@vger.kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, ocfs2-devel@oss.oracle.com, roger.pau@citrix.com Subject: Re: [Ocfs2-devel] [RFC PATCH 18/34] iomap: use bio_new in iomap_dio_bio_actor X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9878 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280083 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9878 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280083 On Wed, Jan 27, 2021 at 11:11:17PM -0800, Chaitanya Kulkarni wrote: > Signed-off-by: Chaitanya Kulkarni > --- > fs/iomap/direct-io.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > index f6c557a1bd25..0737192f7e5c 100644 > --- a/fs/iomap/direct-io.c > +++ b/fs/iomap/direct-io.c > @@ -267,9 +267,8 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, > goto out; > } > > - bio = bio_alloc(GFP_KERNEL, nr_pages); > - bio_set_dev(bio, iomap->bdev); > - bio->bi_iter.bi_sector = iomap_sector(iomap, pos); > + bio = bio_new(iomap->bdev, iomap_sector(iomap, pos), 0, 0, > + nr_pages, GFP_KERNEL); op == 0? It seems a little odd to me that we'd set the field to zero and then construct bi_opf later. It also strikes me as a little strange that bi_opf is combined from the third and fourth parameters, but maybe some day you'll want to do some parameter verification on debug kernels or something...? --D > bio->bi_write_hint = dio->iocb->ki_hint; > bio->bi_ioprio = dio->iocb->ki_ioprio; > bio->bi_private = dio; > -- > 2.22.1 > _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 28951C433E0 for ; Fri, 29 Jan 2021 09:37:40 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7BECE64E24 for ; Fri, 29 Jan 2021 09:37:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BECE64E24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373-68IniprBMee6bLs0IKHAQw-1; Fri, 29 Jan 2021 04:37:35 -0500 X-MC-Unique: 68IniprBMee6bLs0IKHAQw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B786B8017FC; Fri, 29 Jan 2021 09:37:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A8F760BE2; Fri, 29 Jan 2021 09:37:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 706C24A7C7; Fri, 29 Jan 2021 09:37:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10SHOANO014858 for ; Thu, 28 Jan 2021 12:24:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1EE542166B2E; Thu, 28 Jan 2021 17:24:10 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18D832166B2F for ; Thu, 28 Jan 2021 17:24:07 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D937811E78 for ; Thu, 28 Jan 2021 17:24:07 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-555-JHyur5a0PfeumZ9T2VWskg-1; Thu, 28 Jan 2021 12:24:04 -0500 X-MC-Unique: JHyur5a0PfeumZ9T2VWskg-1 Received: by mail.kernel.org (Postfix) with ESMTPSA id B21F464DF9; Thu, 28 Jan 2021 17:24:02 +0000 (UTC) Date: Thu, 28 Jan 2021 09:24:02 -0800 From: "Darrick J. Wong" To: Chaitanya Kulkarni Message-ID: <20210128172402.GO7698@magnolia> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 In-Reply-To: <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Fri, 29 Jan 2021 04:33:26 -0500 Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, gustavoars@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, linux-nvme@lists.infradead.org, philipp.reisner@linbit.com, linux-mm@kvack.org, dm-devel@redhat.com, target-devel@vger.kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, hch@lst.de, agk@redhat.com, naohiro.aota@wdc.com, linux-nilfs@vger.kernel.org, sagi@grimberg.me, linux-scsi@vger.kernel.org, mark@fasheh.com, konrad.wilk@oracle.com, osandov@fb.com, ebiggers@kernel.org, xen-devel@lists.xenproject.org, ngupta@vflare.org, len.brown@intel.com, linux-pm@vger.kernel.org, ming.lei@redhat.com, linux-block@vger.kernel.org, tj@kernel.org, linux-fscrypt@vger.kernel.org, viro@zeniv.linux.org.uk, drbd-dev@tron.linbit.com, jaegeuk@kernel.org, jlbec@evilplan.org, konishi.ryusuke@gmail.com, bvanassche@acm.org, axboe@kernel.dk, damien.lemoal@wdc.com, tytso@mit.edu, akpm@linux-foundation.org, martin.petersen@oracle.com, joseph.qi@linux.alibaba.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, minchan@kernel.org, jefflexu@linux.alibaba.com, linux-fsdevel@vger.kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, ocfs2-devel@oss.oracle.com, roger.pau@citrix.com Subject: Re: [dm-devel] [RFC PATCH 18/34] iomap: use bio_new in iomap_dio_bio_actor X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Jan 27, 2021 at 11:11:17PM -0800, Chaitanya Kulkarni wrote: > Signed-off-by: Chaitanya Kulkarni > --- > fs/iomap/direct-io.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > index f6c557a1bd25..0737192f7e5c 100644 > --- a/fs/iomap/direct-io.c > +++ b/fs/iomap/direct-io.c > @@ -267,9 +267,8 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, > goto out; > } > > - bio = bio_alloc(GFP_KERNEL, nr_pages); > - bio_set_dev(bio, iomap->bdev); > - bio->bi_iter.bi_sector = iomap_sector(iomap, pos); > + bio = bio_new(iomap->bdev, iomap_sector(iomap, pos), 0, 0, > + nr_pages, GFP_KERNEL); op == 0? It seems a little odd to me that we'd set the field to zero and then construct bi_opf later. It also strikes me as a little strange that bi_opf is combined from the third and fourth parameters, but maybe some day you'll want to do some parameter verification on debug kernels or something...? --D > bio->bi_write_hint = dio->iocb->ki_hint; > bio->bi_ioprio = dio->iocb->ki_ioprio; > bio->bi_private = dio; > -- > 2.22.1 > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Darrick J. Wong" Subject: Re: [RFC PATCH 18/34] iomap: use bio_new in iomap_dio_bio_actor Date: Thu, 28 Jan 2021 09:24:02 -0800 Message-ID: <20210128172402.GO7698@magnolia> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> Mime-Version: 1.0 Return-path: List-Id: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611854642; bh=Zs2s8ZvTIPYGR4BFwbfSOZLDbQpy7x8YdhBNvxD8Dok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dYixlgG2K3aWwDLaJowzYgnOFmByUyz6PjYTAvhTfbvB+e9gPk0mBgRRvBez32mDu g+/BEjUeO2s7tBkV+OtFiT2UlC3mn8gjSXsXC5Xpxm6KRmfDNpc8Z7+gIuibodKK4H l1i2cwlyEJsSukyTcGjNrcpQfEjVAbCBE6DwgrePquTtnF0XcOLlk2eq3YbBOrXlcF 50KQtEwBjnE5+b+zJhPCQRu9YN8ISWqvJskcg8GQfdpqKteYo166Aso1a23IfJvuVj VfAojNA36QPu6qz6sKkxuvacugxCY5JwWT3tNh6OxRrRzVwkEqP+vyF3JrdyJAT+Ys o8BRepJ02vTLA== Content-Disposition: inline In-Reply-To: <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Chaitanya Kulkarni Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, xen-devel@lists.xenproject.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-fscrypt@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-pm@vger.kernel.org, linux-mm@kvack.org, axboe@kernel.dk, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, konrad.wilk@oracle.com, roger.pau@citrix.com, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, agk@redhat.com, snitzer@redhat.com, hch@lst.de, sagi@grimberg.me, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, tytso@mit.edu, jaegeuk@kernel.org, ebiggers@kernel.org, shaggy@kernel.org, konishi.ryusuke@gmail.com, mark@fashe On Wed, Jan 27, 2021 at 11:11:17PM -0800, Chaitanya Kulkarni wrote: > Signed-off-by: Chaitanya Kulkarni > --- > fs/iomap/direct-io.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > index f6c557a1bd25..0737192f7e5c 100644 > --- a/fs/iomap/direct-io.c > +++ b/fs/iomap/direct-io.c > @@ -267,9 +267,8 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, > goto out; > } > > - bio = bio_alloc(GFP_KERNEL, nr_pages); > - bio_set_dev(bio, iomap->bdev); > - bio->bi_iter.bi_sector = iomap_sector(iomap, pos); > + bio = bio_new(iomap->bdev, iomap_sector(iomap, pos), 0, 0, > + nr_pages, GFP_KERNEL); op == 0? It seems a little odd to me that we'd set the field to zero and then construct bi_opf later. It also strikes me as a little strange that bi_opf is combined from the third and fourth parameters, but maybe some day you'll want to do some parameter verification on debug kernels or something...? --D > bio->bi_write_hint = dio->iocb->ki_hint; > bio->bi_ioprio = dio->iocb->ki_ioprio; > bio->bi_private = dio; > -- > 2.22.1 >