From patchwork Tue Jan 19 05:06:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12028641 X-Patchwork-Delegate: snitzer@redhat.com 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C8C4CC433E6 for ; Tue, 19 Jan 2021 05:08:32 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.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 543A022BE9 for ; Tue, 19 Jan 2021 05:08:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 543A022BE9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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-382-Q6CJc4JyOiWciHr4nmrIvw-1; Tue, 19 Jan 2021 00:08:28 -0500 X-MC-Unique: Q6CJc4JyOiWciHr4nmrIvw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 01104806660; Tue, 19 Jan 2021 05:08:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D649710013BD; Tue, 19 Jan 2021 05:08:23 +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 A41351809CA4; Tue, 19 Jan 2021 05:08:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10J58LlP020555 for ; Tue, 19 Jan 2021 00:08:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id F24F92026D11; Tue, 19 Jan 2021 05:08:20 +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 ED2B22026D14 for ; Tue, 19 Jan 2021 05:08:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 D84D8811E91 for ; Tue, 19 Jan 2021 05:08:20 +0000 (UTC) Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-242-LHcs12osNe-b-3XIPsbH-w-1; Tue, 19 Jan 2021 00:08:16 -0500 X-MC-Unique: LHcs12osNe-b-3XIPsbH-w-1 IronPort-SDR: wGyXOKbD+ckYA1JTKqMaTrnGe+dH7n10xNbG8mnjShFLNn+HQYSfcBXspp/SjOX0foGi/NVHtP kj+pwRBVyAvq41+xpqDHUVFmRkKHHSY+01arxnTBMOThKihPYCm65z9kjElwQP7SStRuKv0Kcx VIs7L8Off4Px4Ns64u8F9SEORkI1C9yQd1BzIG6qHZ9IiT6kn3dqAOa3jhp54mrt8BbSmnwRqJ z21PhBOMieGt2BN4O4wrgoAbTRRWSdVAeYyl2u2YedQ9cYdXNBUw2Zru0Q6uxmzlwsC77QHmSW oNU= X-IronPort-AV: E=Sophos;i="5.79,357,1602518400"; d="scan'208";a="157758606" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 19 Jan 2021 13:08:14 +0800 IronPort-SDR: IDA7wKtocHix1EgcoSlVtTqdSCgl397CWuD+0eogeTCpuQOGRfdc6D4iBDr2lMY+f+AAKjV1J9 DsAOWU6fYi/mbBWcONqeOoAMd1AfN0Un14S0razd1akCeiehm+SS8PmlLjPgzMjcIdi1e8wqfN Hh2GEAzchtEsK8Dij1i8IRVGfvCtEESbAFKMU3s7K/8Ka66C7U7n2u9g6ygKa1n93CGo5otTkM pGop+f4Q+OAjtMZs4joboHQLFzZyI5oh2erRkaG9DD8kuEAN52OagHV87gVKmbkuvP0GYN32nD mhwo2fzLhEvBE0HJ7P3Uwy7n Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 20:50:50 -0800 IronPort-SDR: p1tcnYwAx/l/NVCOSE++cI0sO4XNQ+lbfc67fxaPGZ0Kwcqxhdz9+u3CPNrCwOw83oDaMA1Qjm ESU3xmsUtmMt60eRcgdVRVFxzLHWW7CqjKNcfNh1+RIHGbsJ3Ai97YW6MaxhVDB0yLEg9IysxE 83VZ2vSeY/l/vgDGSUb38hhYRsZT54dyq7c3WndcswTCZVlwVMvWGE4bWezbXz6r57OZtdR1bX 3lpkUR2AIs9h1PW1353M+8ODhhBWH9ueZ25tUnouwQQq8n8IP+3JRSYVgmwudbuVJ26I/RNNul ogs= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 18 Jan 2021 21:08:14 -0800 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@tron.linbit.com, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com Date: Mon, 18 Jan 2021 21:06:08 -0800 Message-Id: <20210119050631.57073-15-chaitanya.kulkarni@wdc.com> In-Reply-To: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> References: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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.4 X-loop: dm-devel@redhat.com Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, snitzer@redhat.com, gustavo@embeddedor.com, clm@fb.com, dm-devel@redhat.com, adilger.kernel@dilger.ca, hch@lst.de, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, darrick.wong@oracle.com, osandov@fb.com, kent.overstreet@gmail.com, Chaitanya Kulkarni , josef@toxicpanda.com, efremov@linux.com, colyli@suse.de, tj@kernel.org, viro@zeniv.linux.org.uk, dsterba@suse.com, bvanassche@acm.org, agruenba@redhat.com, axboe@kernel.dk, damien.lemoal@wdc.com, tytso@mit.edu, martin.petersen@oracle.com, song@kernel.org, philipp.reisner@linbit.com, jefflexu@linux.alibaba.com, rpeterso@redhat.com, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com Subject: [dm-devel] [RFC PATCH 14/37] drdb: use bio_init_fields in bitmap 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.84 on 10.5.11.22 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 Signed-off-by: Chaitanya Kulkarni --- drivers/block/drbd/drbd_bitmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index df53dca5d02c..4fd9746af469 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -1006,13 +1006,10 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho bm_store_page_idx(page, page_nr); } else page = b->bm_pages[page_nr]; - bio_set_dev(bio, device->ldev->md_bdev); - bio->bi_iter.bi_sector = on_disk_sector; + bio_init_fields(bio, device->ldev->md_bdev, on_disk_sector, ctx, drbd_bm_endio, 0, 0); /* bio_add_page of a single page to an empty bio will always succeed, * according to api. Do we want to assert that? */ bio_add_page(bio, page, len, 0); - bio->bi_private = ctx; - bio->bi_end_io = drbd_bm_endio; bio_set_op_attrs(bio, op, 0); if (drbd_insert_fault(device, (op == REQ_OP_WRITE) ? DRBD_FAULT_MD_WR : DRBD_FAULT_MD_RD)) {