From patchwork Thu Jan 28 07:11:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052617 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 EC02CC433E6 for ; Thu, 28 Jan 2021 07:27:12 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 63F3964DD6 for ; Thu, 28 Jan 2021 07:27:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63F3964DD6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7O6HE005301; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2qhq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:10 +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 10S7QDFV096931; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5va-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:09 +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 1l51hs-0003LL-Lu; Wed, 27 Jan 2021 23:27:08 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51T3-0002RC-W6 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:11:50 -0800 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 10S70E5C012098 for ; Thu, 28 Jan 2021 07:11:49 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvp6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:11:49 +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 10S74LY4040564 for ; Thu, 28 Jan 2021 07:11:49 GMT Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by userp2030.oracle.com with ESMTP id 36bqd38wfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:11:48 +0000 IronPort-SDR: wlaq2i4C57+FAAS/gSsGUG/zHc0skX37t+2SBFak1dbf9iI25CqU02PC0Bt2WRB8CBA4T4jBbV xrXDXFW2SnCqgZ29N4jiz8fw7bnrg6k25J3UQPZGYzbtiq3x12fw4TIsHj8PhJkiGUCfLQMH64 gGpta1F63fCnjPs66l272bx1C+w1AaN41WOPI0BObAEb6kUmuUQNTPw3N0Qevu0v1zKc3MgMtP k0uU7qXm6jgxsDOtTSOHpROW4523lLiXnJtj9wPxl6X0S89EUNtsYHw7KE6mUG1yGdsxb7/G/C 3dE= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262548849" 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; 28 Jan 2021 15:12:53 +0800 IronPort-SDR: f905K07QXkPWhe6ufqwMLVmQQ5/ueNxA6uTOr+tu4le973uGJ4TNRHDSd14p0++jYsh1LMA6RQ bnu5ny7NwHXdlvw6h1Ees0iMe6DZhDrS9meGgnQ6pE94p34C9F766ZOkvxEFza/0+9lyhRw4Ea fKPnxKrvrUvF+B97Nzm/Y3tpHFpy0W1DoizeMyYS8TQFuc5ksdol9PIFGR+4bwY5yF3/X8pJ// ZBjVhhMMQvodnZosSYQG+PnsYu9bCGmBQt+xShgRUXe3SCtgXMJ0uOTvcNWXVi3N+v+iQrc4/R kIK0Vfj6z6ZJ8e6e6tRVYMlY 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; 27 Jan 2021 22:54:05 -0800 IronPort-SDR: UO027L+w2LmrSv+r4jHc7V6MfhclxochZ4q/gKoOnHb/alTZT7F9/4KjZrNCZAKJPJHjEl8zjQ btfDHq8ntGB6arYkxikoGObA79gqCi3nJZAFBbpTjKtHzOWqNheZit1SHeKrnOkOlZqda10wHA lKzVa+peWlZiSXNoZnitf2s3YH424/Lf6Od0Q5TvGZLxtIxoLSsxIGie29rcLN/atLab1ULG9S UmjXPLLRWItiporouoLkwAzUh8fELyClcBeyT3S1PWdOuFAmZ6ShYxhRystXSbBeBsPW0LixEL geY= 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; 27 Jan 2021 23:11:46 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:00 -0800 Message-Id: <20210128071133.60335-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.143.124 X-ServerName: esa2.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=168 mlxlogscore=949 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=30 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 01/34] block: move common code into blk_next_bio() 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1011 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 blk_next_bio() is the central function which allocates the bios for discard, write-same, write-zeroes and zone-mgmt. The initialization of various bio members is duplicated in disacrd, write-same, write-zeores. In this preparation patch we add bdev, sector, op, and opf arguments to the blk_next_bio() to reduce the duplication. In the next patch we introduce bio_new(), this prepration patch allows us to call it inside blk_next_bio(). Signed-off-by: Chaitanya Kulkarni --- block/blk-lib.c | 36 +++++++++++++++--------------------- block/blk-zoned.c | 4 +--- block/blk.h | 5 +++-- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 752f9c722062..fb486a0bdb58 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -10,7 +10,9 @@ #include "blk.h" -struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp) +struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev, + sector_t sect, unsigned op, unsigned opf, + unsigned int nr_pages, gfp_t gfp) { struct bio *new = bio_alloc(gfp, nr_pages); @@ -19,6 +21,10 @@ struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp) submit_bio(bio); } + new->bi_iter.bi_sector = sect; + bio_set_dev(new, bdev); + bio_set_op_attrs(new, op, opf); + return new; } @@ -94,11 +100,7 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, WARN_ON_ONCE((req_sects << 9) > UINT_MAX); - bio = blk_next_bio(bio, 0, gfp_mask); - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, bdev); - bio_set_op_attrs(bio, op, 0); - + bio = blk_next_bio(bio, bdev, sector, op, 0, 0, gfp_mask); bio->bi_iter.bi_size = req_sects << 9; sector += req_sects; nr_sects -= req_sects; @@ -168,6 +170,7 @@ static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector, { struct request_queue *q = bdev_get_queue(bdev); unsigned int max_write_same_sectors; + unsigned int op = REQ_OP_WRITE_SAME; struct bio *bio = *biop; sector_t bs_mask; @@ -188,14 +191,11 @@ static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector, max_write_same_sectors = bio_allowed_max_sectors(q); while (nr_sects) { - bio = blk_next_bio(bio, 1, gfp_mask); - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, bdev); + bio = blk_next_bio(bio, bdev, sector, op, 0, 1, gfp_mask); bio->bi_vcnt = 1; bio->bi_io_vec->bv_page = page; bio->bi_io_vec->bv_offset = 0; bio->bi_io_vec->bv_len = bdev_logical_block_size(bdev); - bio_set_op_attrs(bio, REQ_OP_WRITE_SAME, 0); if (nr_sects > max_write_same_sectors) { bio->bi_iter.bi_size = max_write_same_sectors << 9; @@ -249,7 +249,9 @@ static int __blkdev_issue_write_zeroes(struct block_device *bdev, { struct bio *bio = *biop; unsigned int max_write_zeroes_sectors; + unsigned int op = REQ_OP_WRITE_ZEROES; struct request_queue *q = bdev_get_queue(bdev); + unsigned int opf = flags & BLKDEV_ZERO_NOUNMAP ? REQ_NOUNMAP : 0; if (!q) return -ENXIO; @@ -264,13 +266,7 @@ static int __blkdev_issue_write_zeroes(struct block_device *bdev, return -EOPNOTSUPP; while (nr_sects) { - bio = blk_next_bio(bio, 0, gfp_mask); - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, bdev); - bio->bi_opf = REQ_OP_WRITE_ZEROES; - if (flags & BLKDEV_ZERO_NOUNMAP) - bio->bi_opf |= REQ_NOUNMAP; - + bio = blk_next_bio(bio, bdev, sector, op, opf, 0, gfp_mask); if (nr_sects > max_write_zeroes_sectors) { bio->bi_iter.bi_size = max_write_zeroes_sectors << 9; nr_sects -= max_write_zeroes_sectors; @@ -303,6 +299,7 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev, sector_t sector, sector_t nr_sects, gfp_t gfp_mask, struct bio **biop) { + unsigned int nr_pages = __blkdev_sectors_to_bio_pages(nr_sects); struct request_queue *q = bdev_get_queue(bdev); struct bio *bio = *biop; int bi_size = 0; @@ -315,11 +312,8 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev, return -EPERM; while (nr_sects != 0) { - bio = blk_next_bio(bio, __blkdev_sectors_to_bio_pages(nr_sects), + bio = blk_next_bio(bio, bdev, sector, REQ_OP_WRITE, 0, nr_pages, gfp_mask); - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, bdev); - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); while (nr_sects != 0) { sz = min((sector_t) PAGE_SIZE, nr_sects << 9); diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 7a68b6e4300c..68e77628348d 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -231,8 +231,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, return -EINVAL; while (sector < end_sector) { - bio = blk_next_bio(bio, 0, gfp_mask); - bio_set_dev(bio, bdev); + bio = blk_next_bio(bio, bdev, 0 , op, REQ_SYNC, 0, gfp_mask); /* * Special case for the zone reset operation that reset all @@ -244,7 +243,6 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, break; } - bio->bi_opf = op | REQ_SYNC; bio->bi_iter.bi_sector = sector; sector += zone_sectors; diff --git a/block/blk.h b/block/blk.h index 0198335c5838..0a278bae5478 100644 --- a/block/blk.h +++ b/block/blk.h @@ -329,8 +329,9 @@ extern int blk_iolatency_init(struct request_queue *q); static inline int blk_iolatency_init(struct request_queue *q) { return 0; } #endif -struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp); - +struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev, + sector_t sect, unsigned op, unsigned opf, + unsigned int nr_pages, gfp_t gfp); #ifdef CONFIG_BLK_DEV_ZONED void blk_queue_free_zone_bitmaps(struct request_queue *q); #else From patchwork Thu Jan 28 07:11:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052645 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 00588C433E9 for ; Thu, 28 Jan 2021 07:29:13 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 7132764DDA for ; Thu, 28 Jan 2021 07:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7132764DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7TBUF131512; Thu, 28 Jan 2021 07:29:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 3689aatw13-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:29:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PoAK103602; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn37q-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:09 +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 1l51hs-0003Lq-Ob; Wed, 27 Jan 2021 23:27:08 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51TE-0002Ri-2Y for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:00 -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 10S71AFR050241 for ; Thu, 28 Jan 2021 07:11:59 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq93ft-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:11:59 +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 10S74Nn7040626 for ; Thu, 28 Jan 2021 07:11:59 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2030.oracle.com with ESMTP id 36bqd38whn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:11:58 +0000 IronPort-SDR: nAQVs0JbtqtUN5yNC3Y7lgPqCDrYkeECMfxeaDE+ESs2zyTabjj3zhwVCY0EbnWuLwyTgbh91w /6ugN3DkqrBA4sZpylMW4yjVTPcEhFqWSHlTbx8/s9mGIMQNlI9f93YAj7Htz+eQ00GZbttq0a CKb9fnfT2z3/bvKCxjd5/V9CpEzjPyRsP+IHmRH8wflayMjkHxEDIsKcDoaPjKkjCzxGBj1sgH 6YPpVfcinxMA7PthXlITtWafnbMye6IFeYigBWjGN3ub5ksNrPJBMyasB4T7GoHp/SPODM8nRZ 4xE= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963099" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:11:57 +0800 IronPort-SDR: jFfVWdpLd1RpXrJlVBwOheGqiN3bv9oumOszP3qkgDMujjkcqADzeZuyLMU/7nBgODcP/o4jEi sA5tog1h6gSCN5cFbKwAYPvybHGHq147ckFbeG2OcxflWao/II+qw6Chgk3OxN2e2soZpa3SMh B5tlrbO4mOrDVjFof+39gjP4jDbgNjL39Obr2GuHiQUjeX2X9Na7bey5ssdMqbboUTNYZNy9XF dl3p3Cj+/N6FZdmYJcGxFQ4fPRuhIsxgpkl2Apu07OVgLB9a/SktAcTmVvuOHuE3TaQMyQt9LD Y/J2BYrSB/MgSRyqxBaycRaN 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; 27 Jan 2021 22:54:15 -0800 IronPort-SDR: HYKG8+pmcZ9KZ4KZ0ijEvKFdi7W0dgGDXHFsWIaWNxW3zaOZulAuYVmKBU97gor6eDg6ylP5Ni 6/ahnxe6yM79ewZwsqKvrfMjvqQiAhLVOYCtlxS8Bh1Gz/vhwXPlVRnl4SwtLQD680yYKL86EL o3y724i0cbqHM9ChTIb0swq0MYuYoJx+iwqVjQ/XkVzNSKEtJ8uwRbdybmRUPVMHWHGtPAl98+ IjNd0sVxBZiY+I2eDgAQpiJ9r1dqmBNoZAqnfBCkqleNy/DSVZGKQaXDO89s0wR1FlZS/ZCSSd 5w0= 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; 27 Jan 2021 23:11:57 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:01 -0800 Message-Id: <20210128071133.60335-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=205 mlxlogscore=949 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=78 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 02/34] block: introduce and use bio_new 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Introduce bio_new() helper and use it in blk-lib.c to allocate and initialize various non-optional or semi-optional members of the bio along with bio allocation done with bio_alloc(). Here we also calmp the max_bvecs for bio with BIO_MAX_PAGES before we pass to bio_alloc(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Chaitanya Kulkarni --- block/blk-lib.c | 6 +----- include/linux/bio.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index fb486a0bdb58..ec29415f00dd 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -14,17 +14,13 @@ struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev, sector_t sect, unsigned op, unsigned opf, unsigned int nr_pages, gfp_t gfp) { - struct bio *new = bio_alloc(gfp, nr_pages); + struct bio *new = bio_new(bdev, sect, op, opf, gfp, nr_pages); if (bio) { bio_chain(bio, new); submit_bio(bio); } - new->bi_iter.bi_sector = sect; - bio_set_dev(new, bdev); - bio_set_op_attrs(new, op, opf); - return new; } diff --git a/include/linux/bio.h b/include/linux/bio.h index c74857cf1252..2a09ba100546 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -826,5 +826,30 @@ static inline void bio_set_polled(struct bio *bio, struct kiocb *kiocb) if (!is_sync_kiocb(kiocb)) bio->bi_opf |= REQ_NOWAIT; } +/** + * bio_new - allcate and initialize new bio + * @bdev: blockdev to issue discard for + * @sector: start sector + * @op: REQ_OP_XXX from enum req_opf + * @op_flags: REQ_XXX from enum req_flag_bits + * @max_bvecs: maximum bvec to be allocated for this bio + * @gfp_mask: memory allocation flags (for bio_alloc) + * + * Description: + * Allocates, initializes common members, and returns a new bio. + */ +static inline struct bio *bio_new(struct block_device *bdev, sector_t sector, + unsigned int op, unsigned int op_flags, + unsigned int max_bvecs, gfp_t gfp_mask) +{ + unsigned nr_bvec = clamp_t(unsigned int, max_bvecs, 0, BIO_MAX_PAGES); + struct bio *bio = bio_alloc(gfp_mask, nr_bvec); + + bio_set_dev(bio, bdev); + bio->bi_iter.bi_sector = sector; + bio_set_op_attrs(bio, op, op_flags); + + return bio; +} #endif /* __LINUX_BIO_H */ From patchwork Thu Jan 28 07:11:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052637 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 C56CDC433DB for ; Thu, 28 Jan 2021 07:29:12 +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 5004E64DD8 for ; Thu, 28 Jan 2021 07:29:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5004E64DD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S7OwNb064368; Thu, 28 Jan 2021 07:29:11 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktms3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:29:11 +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 10S7QDOt096886; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5vh-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:09 +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 1l51hs-0003ML-Ro; Wed, 27 Jan 2021 23:27:08 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51TM-0002S9-JW for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:08 -0800 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 10S70FhH012219 for ; Thu, 28 Jan 2021 07:12:08 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvpjq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:12:08 +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 10S74LxY040567 for ; Thu, 28 Jan 2021 07:12:07 GMT Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by userp2030.oracle.com with ESMTP id 36bqd38wky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:12:07 +0000 IronPort-SDR: ERT/nnyqdcqLBfhuQtFsqRueHqVWEnu8bkNb9rIna99AXauVVcTrJa2PJFI1N1+mjCdKP0ODvn qZSFUHy6nPcpWYWtQaH7DTAVLJzV90ztRAVJFgOefjlbuKBmG1YXmJxTtM7LdXLIAmjGZRZBE6 OoHGugbyXZZcVS1UJguc5+O4NHP+wOnbLThaHSEMRD71psxOgWALlpsyk1eOZiJ5JqF+Xq7gA0 KppEZznsLHI0GCdm6/JZwWpHdw7yjbP3dxSf1iMhBZYVp9DVM5JHkbYwcgF3a/ElIb9ueEtQhL qks= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="268892355" 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; 28 Jan 2021 15:12:06 +0800 IronPort-SDR: 4Bbj+g2YmXIxlx5npHOCOP4bHS5HUS0lZoE/MddPOc50LYShK3XnP6KtOLPYL/Jd6+SHW6Va2O Lc5PXe6ZW5t5Fom6vEFIrCqIn2CVxrYmIyfabfrmbQjtZGodpKAvGwsYr52Q6I2Yz2Nd1QGhj4 N6al9QBcnu3tDz3uMw3gJfe7Zho1J8Xl+P3ISEa+QbDo3c66lKjHFqj20gJNzH0MguZAXpVIDh O46uJgQTXF5ZNykx7HtgLzMwD7Kk3dkBPVLNHCJu31VeunXRxOOXpFWAWqvFxkBV8Kk+BjUYPY JA/2DH5zNeLIGkinMit7r5vY 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; 27 Jan 2021 22:54:24 -0800 IronPort-SDR: d5xTirF8Ys37shQjxL90xQdmAvrvSyaDd23k+ldZQk6g8Gmyh3lDvEoGm16xcyp5mSBaZTpxOa PvC1PFp6twA2TpPlG+Ql+/AG65S9RMLgGFawcQCbg9J6k/x2AMPUiKYtsSCC84Z+EGYfmFKoID N3xp6Srvi9c6y+EZp98pFBd59WcY1NGSO1F5aHMorlNIT26uZMyL8pegMXpgjACziNosRf/+TT qFeHE9fwJbeXCBkPpJ7sXhYMSQdfV8ojzZIb3gXAYZT1zkKG2mcOAVOk/sf7gRxWJd9WgQISSA lhk= 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; 27 Jan 2021 23:12:06 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:02 -0800 Message-Id: <20210128071133.60335-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.141.245 X-ServerName: esa1.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=212 mlxlogscore=662 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=100 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 03/34] drdb: use bio_new in drdb 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/block/drbd/drbd_receiver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 09c86ef3f0fd..e1cd3427b28b 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -1643,6 +1643,7 @@ int drbd_submit_peer_request(struct drbd_device *device, struct bio *bio; struct page *page = peer_req->pages; sector_t sector = peer_req->i.sector; + struct block_device *bdev = device->ldev->backing_bdev; unsigned data_size = peer_req->i.size; unsigned n_bios = 0; unsigned nr_pages = (data_size + PAGE_SIZE -1) >> PAGE_SHIFT; @@ -1687,15 +1688,12 @@ int drbd_submit_peer_request(struct drbd_device *device, * generated bio, but a bio allocated on behalf of the peer. */ next_bio: - bio = bio_alloc(GFP_NOIO, nr_pages); + bio = bio_new(bdev, sector, op, op_flags, GFP_NOIO, nr_pages); if (!bio) { drbd_err(device, "submit_ee: Allocation of a bio failed (nr_pages=%u)\n", nr_pages); goto fail; } /* > peer_req->i.sector, unless this is the first bio */ - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, device->ldev->backing_bdev); - bio_set_op_attrs(bio, op, op_flags); bio->bi_private = peer_req; bio->bi_end_io = drbd_peer_request_endio; From patchwork Thu Jan 28 07:11:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052615 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 E3D43C433E0 for ; Thu, 28 Jan 2021 07:27:12 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 5AB6D6024A for ; Thu, 28 Jan 2021 07:27:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AB6D6024A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7O7Yc005308; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7r2qhr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:10 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7Pojk103579; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn37t-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:09 +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 1l51hs-0003Mp-Uf; Wed, 27 Jan 2021 23:27:08 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51TY-0002V9-39 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:20 -0800 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 10S70FWJ012211 for ; Thu, 28 Jan 2021 07:12:19 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvpuc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:12:19 +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 10S74PCb040689 for ; Thu, 28 Jan 2021 07:12:19 GMT Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by userp2030.oracle.com with ESMTP id 36bqd38wqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:12:19 +0000 IronPort-SDR: sF1WcMrglNnLrpvcj9mtQvqYFL8ru652KunZNROPSmecYzlvwYj2LepPlYNtWGEBiFtrdfodEj qFfAiaqie/JtkdhZ14N2QNtW5/U/Oy+hvGTcfdty89HK7e8eR5skrd6KuEBBUokYfzbX/gp6E/ xJdtVU6NIDAesGOLCZESBpfjlLW7JC+hJAC3UXWIznZ1rhj1SQn9xh3PZ9lPn8HS60WtUMg3bW bnPvyIIDghbMh7N68ajPIeH4ZkwfUpHOw1h+5YVJdr35+ym1ImYCU+w2YAQeru7AsD6Jgrz13x G8I= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158518050" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:12:16 +0800 IronPort-SDR: 1D3Vi1/0JNW1NroEhhcXST9Fcbczch6Gw6MyDEyXqALWN8UTXCu7T0LW9PhppGB+j5mXNOvvaU Lg78YRkGlBnf2nYdjVRdgjO3ZQoi2qvrjyzATL9sLV3HXwVoAMUzTJBOsFYDBBRYztxQu2hKdt rAbAnq0vRbHFGd8ZnAA51R13tUABBdMtTSWNVJzOa0OhSn7ISqeOgn81BfW6Y5ie8xjySYiO/F hL5M+5NxlNbgoP9KqnVJOEZq3GmGy8tiJ2fR0EfL2l8rLxWsqCteVh/vFoQsfjV/8oazETgnox lvwsRdIS8W1SbTwXcq2RpCG4 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; 27 Jan 2021 22:54:34 -0800 IronPort-SDR: sJ1sB4+NIXrk86BqB2mBiNRkLb2CtaUtTUjLUptuVolKqncgiWgms0hBmEnyXBHOe2LGJgTWAc Mtkqx7/Ji/KEF3P2zVgoCc4AZmvUpaw07sB7pwwqNDwBZIjeJgdIawB6xDKz7hKZuinbJ6FPFN v+digmuqEID+qvvg+Pvdb6mLkPbYX8es6TqyRNtA6iTBnQbrstI0JA9CgrvLf0RhQ0DnF83KdI QwpSDAYi/vWthDgyxzldo4sKChZfQfmY/MjRYeTOvpJG4q5JRSujoZAO3KJfZIMHz0OJMVK9L1 YPQ= 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; 27 Jan 2021 23:12:16 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:03 -0800 Message-Id: <20210128071133.60335-5-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.144 X-ServerName: esa5.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=224 mlxlogscore=485 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=100 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 04/34] drdb: use bio_new() in submit_one_flush 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/block/drbd/drbd_receiver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index e1cd3427b28b..b86bbf725cbd 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -1277,8 +1277,10 @@ static void one_flush_endio(struct bio *bio) static void submit_one_flush(struct drbd_device *device, struct issue_flush_context *ctx) { - struct bio *bio = bio_alloc(GFP_NOIO, 0); + struct block_device *bdev = device->ldev->backing_bdev; + struct bio *bio = bio_new(bdev, 0, REQ_OP_FLUSH, REQ_PREFLUSH, 0, GFP_NOIO); struct one_flush_context *octx = kmalloc(sizeof(*octx), GFP_NOIO); + if (!bio || !octx) { drbd_warn(device, "Could not allocate a bio, CANNOT ISSUE FLUSH\n"); /* FIXME: what else can I do now? disconnecting or detaching @@ -1296,10 +1298,8 @@ static void submit_one_flush(struct drbd_device *device, struct issue_flush_cont octx->device = device; octx->ctx = ctx; - bio_set_dev(bio, device->ldev->backing_bdev); bio->bi_private = octx; bio->bi_end_io = one_flush_endio; - bio->bi_opf = REQ_OP_FLUSH | REQ_PREFLUSH; device->flush_jif = jiffies; set_bit(FLUSH_PENDING, &device->flags); From patchwork Thu Jan 28 07:11:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052639 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 E9476C433E0 for ; Thu, 28 Jan 2021 07:29:12 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 6E5356024A for ; Thu, 28 Jan 2021 07:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E5356024A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7QFhV115333; Thu, 28 Jan 2021 07:29:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 3689aatw12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:29:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7Pn5P103445; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn37x-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003NN-1o; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Th-0002WB-1M for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:29 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xmHV017767 for ; Thu, 28 Jan 2021 07:12:28 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3020.oracle.com with ESMTP id 368wjtmmtd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:12:28 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74GHo013954 for ; Thu, 28 Jan 2021 07:12:28 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2040.oracle.com with ESMTP id 36bpgxhk4w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:12:27 +0000 IronPort-SDR: 8NJR0CndfdMAowXA41T4id5vELSWw85PjxC3LWOzt6s8j5MbtQc3LHcoffRECojduZPpzagbyG IhGjh/2paC7LglYuqUfB6XcAKvwAhn6Fr8MrUpLYUDKPbnndsXPJZpU4ukw/3NEkQWMGA6wZ/g 03uggQbDJWdx09JaT7d2uOoLVOME5mxxIZeGCzanOFR6jMdVkRme7AVSZsMnE290IEE9DaUKBj WQowTmGqAg7MvCMJ+wmkRDhbjKsHFl46hGIsqv7sYl/V7Qyl7otvfahEgoqul7CKr/5XojzzFt q/Q= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963159" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:12:26 +0800 IronPort-SDR: EeTyJ4FLxvmqXAHiiD2z4Ogx4l6MiP0COZBZ8f3UgXs93Yai2/a8XQbwMlRKSh5SGIyZRJVjZM nd6bEkTfLpXMQw+USEh7wdKPGw4GHrs0KabcGO2qMlvssveFWh2pTtDzmGBBp9e+viXILES99C SKucP8hgakTqG2D/Tv4YDp2UGEmGxysu0Ef1XL0pf/NhvIg3YpMaBQJTvwBWc+4Yd3cMRIyQgl nwfNn8rQSKDy81iFRO0WNpV6DEmNKRzU7bw44HiemtILpdqCImIXCO8Tav7qhcjSN83YD8QFqy B5CzT3XUYFL0sCIauu6BVX+x Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:56:46 -0800 IronPort-SDR: AXyfJ+0DzRblLd1C2a8i26F/p5ozSimYWSlSS31hVM9ZD6XicSUM+PrSEKfC1Dird0dpCST4jr RH8MY1sbvDVq5P84PowPihV3IFXmyzQNH7jhgBGPCvDUQHmJMRxTWJczw7haMsXH6G94Is8ChW 3Thpc5BIBnKiKhlT74BApZ+91+Tr+DAOOck7bXVmzNs8yvwHiSmvLe1vToPqpHXLGvuEQ8CHDc wMtFD3vO2n6mQgoI8Yf56mEPo6oNIWF003bHhQMN3DD+ikOw4kJGblAZl7I7M30srcHVxOHbPk wqE= 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; 27 Jan 2021 23:12:26 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:04 -0800 Message-Id: <20210128071133.60335-6-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=100 phishscore=0 spamscore=0 clxscore=224 mlxlogscore=695 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 05/34] xen-blkback: use bio_new 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Create a wrapper on the tio of the bio_new() named get_new_bio() & use it in the dispatch_rw_block_io(). p Signed-off-by: Chaitanya Kulkarni --- drivers/block/xen-blkback/blkback.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 9ebf53903d7b..3760278f0ee6 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -1174,6 +1174,15 @@ do_block_io_op(struct xen_blkif_ring *ring, unsigned int *eoi_flags) return more_to_do; } + +static struct bio * +get_new_bio(struct phys_req *preq, unsigned int op, unsigned int op_flags, + gfp_t gfp_mask, unsigned int nr_bvec) +{ + return bio_new(preq->bdev, preq->sector_number, op, op_flags, nr_bvec, + gfp_mask); + +} /* * Transmutation of the 'struct blkif_request' to a proper 'struct bio' * and call the 'submit_bio' to pass it to the underlying storage. @@ -1324,16 +1333,14 @@ static int dispatch_rw_block_io(struct xen_blkif_ring *ring, seg[i].offset) == 0)) { int nr_iovecs = min_t(int, (nseg-i), BIO_MAX_PAGES); - bio = bio_alloc(GFP_KERNEL, nr_iovecs); + bio = get_new_bio(&preq, operation, operation_flags, + GFP_KERNEL, nr_iovecs); if (unlikely(bio == NULL)) goto fail_put_bio; biolist[nbio++] = bio; - bio_set_dev(bio, preq.bdev); bio->bi_private = pending_req; bio->bi_end_io = end_block_io_op; - bio->bi_iter.bi_sector = preq.sector_number; - bio_set_op_attrs(bio, operation, operation_flags); } preq.sector_number += seg[i].nsec; @@ -1343,15 +1350,14 @@ static int dispatch_rw_block_io(struct xen_blkif_ring *ring, if (!bio) { BUG_ON(operation_flags != REQ_PREFLUSH); - bio = bio_alloc(GFP_KERNEL, 0); + bio = get_new_bio(&preq, operation, operation_flags, + GFP_KERNEL, 0); if (unlikely(bio == NULL)) goto fail_put_bio; biolist[nbio++] = bio; - bio_set_dev(bio, preq.bdev); bio->bi_private = pending_req; bio->bi_end_io = end_block_io_op; - bio_set_op_attrs(bio, operation, operation_flags); } atomic_set(&pending_req->pendcnt, nbio); From patchwork Thu Jan 28 07:11:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052961 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 96041C433DB for ; Thu, 28 Jan 2021 08:13:52 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 2F44460C41 for ; Thu, 28 Jan 2021 08:13:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F44460C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8AOFJ083077; Thu, 28 Jan 2021 08:13:51 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2ut2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:51 +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 10S8AEhf091621; Thu, 28 Jan 2021 08:11:51 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy1mr-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:11:50 +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 1l51ht-0003Nr-5G; Wed, 27 Jan 2021 23:27:09 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Tq-0002XI-PD for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:38 -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 10S71A0W050186 for ; Thu, 28 Jan 2021 07:12:38 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq94ck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:12:38 +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 10S74JiQ040504 for ; Thu, 28 Jan 2021 07:12:37 GMT Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by userp2030.oracle.com with ESMTP id 36bqd38wue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:12:37 +0000 IronPort-SDR: l+Sa09Yl/meZhXCutV3FpMJisbqSRkfK/lj1+Rlh4Kk4xScM20hQg7fZWU+i7RAyZa00i1KmTH RIAdohguduRg7VgL/RSwGH7YBI90RzvJfNXdUHZufETLAgbsWodnXtcD8+99RmpT5jxiK+Jtx9 bPVyhJqcr5MXpR/yDMMLYlUo3g+LyCy5YVY/Lu0iK9Eofzwa2sxoU5Vt7zH6lad+YP0tlzing2 JO15JrEY4Q3g7jThLT43TPKQEf8PVtKqPPd8C8dzpvuGOtZ5qoYFAZFX9UqnOIrIipXV9RMwf1 hPY= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262548921" 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; 28 Jan 2021 15:14:07 +0800 IronPort-SDR: IxrH8behs7vmcW1ThLqeppItyY37QUofKIexm9Iec+qJT4BaEwC9QcWYcVGUm5PMp5yG9W8vY0 U53NgTtODbEi81Du2tzNFID0J7pzH05gTnawKihfQLAIa8uOse0cbIsZZB5GGYzafVkbiJXH27 odkK66Y+87d8pkVYmm8I6Tb8zyOt0OCdivbQaDTVN6UmUcFA7t1fCAkTp4xQIDqdGEE5VqIxH9 +ncnfdqv18550xBwrmKX2Q358wIjvRsbRtqLCJ7YBeDyZGKy0TWd/3OaBesQT1LIQEk0gji8// CFPBu4o2Jl6SwRe4HCMIM7gP 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; 27 Jan 2021 22:54:54 -0800 IronPort-SDR: Luc6lg4Pa+bVHOb4HzkXJiWLGqMg6JC6Nyg0Lqb88ZIBDNylXDUPHvAGuri+ui5nWB8hV8jug9 qFWTXFaOWHAL0oehOyPdERabJ1LaG9aVOt3b6RTgmVCVF9xZaJrmkG+mjzow98LgNG5t1Hjoni gqXmojTILo9AyCGo2PpCozas3remWiyjnR1rz1m7Heq2aoYdQ+f2mWDUtJhIIR3UJyQKknW4V+ XZO06It7hG6XcBrRwkAZf9a8HSkB5bDSC1ddzu75XBYoKVtN9lipurMfP/HgqVuXVuz/kSCAwn InQ= 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; 27 Jan 2021 23:12:36 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:05 -0800 Message-Id: <20210128071133.60335-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.143.124 X-ServerName: esa2.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=713 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=100 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 06/34] zram: use bio_new 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- drivers/block/zram/zram_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index d7018543842e..5d744e528d4f 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -587,12 +587,11 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, { struct bio *bio; - bio = bio_alloc(GFP_ATOMIC, 1); + bio = bio_alloc(zram->bdev, entry * (PAGE_SIZE >> 9), 0, 0, + 1, GFP_ATOMIC); if (!bio) return -ENOMEM; - bio->bi_iter.bi_sector = entry * (PAGE_SIZE >> 9); - bio_set_dev(bio, zram->bdev); if (!bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset)) { bio_put(bio); return -EIO; From patchwork Thu Jan 28 07:11:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052627 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 2732AC4332B for ; Thu, 28 Jan 2021 07:27:14 +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 8F48B64DD9 for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F48B64DD9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S7OxE1064380; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktmms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:11 +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 10S7QDfa096858; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5vv-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003ON-7f; Wed, 27 Jan 2021 23:27:09 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Tz-0002YL-Py for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:47 -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 10S71AuG050208 for ; Thu, 28 Jan 2021 07:12:47 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserp3030.oracle.com with ESMTP id 368wcq94m3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:12:47 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74GIQ013951 for ; Thu, 28 Jan 2021 07:12:46 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2040.oracle.com with ESMTP id 36bpgxhk8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:12:46 +0000 IronPort-SDR: UcnUbZKFoLZf9gznTBE0tP9k3CSgfRbfrWuAh4kIwVg8eTuu9j7Xoevn2KGp62mQP6PQLpXlst KUjHp0Rw95u0PnL0a/3Z9L+LNt07H63XT+9DCPcdyXbramrstm+jr1T/jwpkS0Grdq3MYoFYAu bwu3gzinC15pJpTWBwViuO1NE/pGaJW7R12UZ+xgyP/4EyZd19gnMH1QzYinZ4tWG3y0ErawvV Ac54ow3nOgQC48v5c3EoNDjHbrDc2P/fXRNga8EfhIpGOLai7LGRb++JRj5iB2L6sUiJtpK82H bNY= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963177" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:12:45 +0800 IronPort-SDR: ZxpoI27SEKOHY/DJPSeyzZoNX1mJb/KCbc4fsL9s0X1lHGthBSn0wY/EmERtR1GA4aivxL67fG 5QcR4JA8x9xpwojNqITY2nBhy+6vhlAFSZwqpvw3gVqmhwGo93NKazHAI3CClSHd1punmNnz+L Bc+KZq5bQGnavfmKxfqrrSUdWHj8tniDKkyV40zS8c5q3awKGUV/LNu44cj8OdlPTvaU4leg+3 VsIfjidGK1PC0vIMh7xO9VjOzP/u2tRejJxDCVEzjImw5fX/GaYO2aylRSarCcGr8135t23paI nt31Qot1EgiURPUDzjNkDxgk 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; 27 Jan 2021 22:55:03 -0800 IronPort-SDR: iX0HhBu+61xFa7EtRWB17G0RFoDdFxtABLHP5yHe733z1qMOeQszsqPYXIq64MFQkReY48/RWk FOClHc2dhNxuRM1QyLpF0KtQrhnCpVvcpPgq0B9OecXrJpCL8UYdCuDWFTL9LdxFS6qWHXh51B DNrP6xQEwjJPm/GL/W/Mv5XtvThzXYCRCRRzvICfBStun4/LN576oOtiFYHwzWMShhTX3BjqKf c8icNJold/1bdh3xf4xqkQcFwP0TJ4M2AqZVo41MRst8Lsv9bfR6qeue7iMnlhLF3vJJuSRBwu WXg= 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; 27 Jan 2021 23:12:45 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:06 -0800 Message-Id: <20210128071133.60335-8-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=78 phishscore=0 spamscore=0 clxscore=206 mlxlogscore=823 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 07/34] dm: use bio_new in dm-log-writes 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-log-writes.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c index e3d35c6c9f71..7ca9af407647 100644 --- a/drivers/md/dm-log-writes.c +++ b/drivers/md/dm-log-writes.c @@ -217,18 +217,15 @@ static int write_metadata(struct log_writes_c *lc, void *entry, void *ptr; size_t ret; - bio = bio_alloc(GFP_KERNEL, 1); + bio = bio_new(lc->logdev->bdev, sector, REQ_OP_WRITE, 0, 1, GFP_KERNEL); if (!bio) { DMERR("Couldn't alloc log bio"); goto error; } bio->bi_iter.bi_size = 0; - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, lc->logdev->bdev); bio->bi_end_io = (sector == WRITE_LOG_SUPER_SECTOR) ? log_end_super : log_end_io; bio->bi_private = lc; - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); page = alloc_page(GFP_KERNEL); if (!page) { @@ -264,7 +261,7 @@ static int write_inline_data(struct log_writes_c *lc, void *entry, size_t entrylen, void *data, size_t datalen, sector_t sector) { - int num_pages, bio_pages, pg_datalen, pg_sectorlen, i; + int num_pages, pg_datalen, pg_sectorlen, i; struct page *page; struct bio *bio; size_t ret; @@ -272,24 +269,21 @@ static int write_inline_data(struct log_writes_c *lc, void *entry, while (datalen) { num_pages = ALIGN(datalen, PAGE_SIZE) >> PAGE_SHIFT; - bio_pages = min(num_pages, BIO_MAX_PAGES); atomic_inc(&lc->io_blocks); - bio = bio_alloc(GFP_KERNEL, bio_pages); + bio = bio_new(lc->logdev->bdev, sector, REQ_OP_WRITE, 0, + num_pages, GFP_KERNEL); if (!bio) { DMERR("Couldn't alloc inline data bio"); goto error; } bio->bi_iter.bi_size = 0; - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, lc->logdev->bdev); bio->bi_end_io = log_end_io; bio->bi_private = lc; - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); - for (i = 0; i < bio_pages; i++) { + for (i = 0; i < bio->bi_max_vecs; i++) { pg_datalen = min_t(int, datalen, PAGE_SIZE); pg_sectorlen = ALIGN(pg_datalen, lc->sectorsize); @@ -317,7 +311,7 @@ static int write_inline_data(struct log_writes_c *lc, void *entry, } submit_bio(bio); - sector += bio_pages * PAGE_SECTORS; + sector += bio->bi_max_vecs * PAGE_SECTORS; } return 0; error_bio: @@ -364,17 +358,15 @@ static int log_one_block(struct log_writes_c *lc, goto out; atomic_inc(&lc->io_blocks); - bio = bio_alloc(GFP_KERNEL, min(block->vec_cnt, BIO_MAX_PAGES)); + bio = bio_new(lc->logdev->bdev, sector, REQ_OP_WRITE, 0, + block->vec_cnt, GFP_KERNEL); if (!bio) { DMERR("Couldn't alloc log bio"); goto error; } bio->bi_iter.bi_size = 0; - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, lc->logdev->bdev); bio->bi_end_io = log_end_io; bio->bi_private = lc; - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); for (i = 0; i < block->vec_cnt; i++) { /* @@ -386,17 +378,15 @@ static int log_one_block(struct log_writes_c *lc, if (ret != block->vecs[i].bv_len) { atomic_inc(&lc->io_blocks); submit_bio(bio); - bio = bio_alloc(GFP_KERNEL, min(block->vec_cnt - i, BIO_MAX_PAGES)); + bio = bio_new(lc->logdev->bdev, sector, REQ_OP_WRITE, + 0, block->vec_cnt - i, GFP_KERNEL); if (!bio) { DMERR("Couldn't alloc log bio"); goto error; } bio->bi_iter.bi_size = 0; - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, lc->logdev->bdev); bio->bi_end_io = log_end_io; bio->bi_private = lc; - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); ret = bio_add_page(bio, block->vecs[i].bv_page, block->vecs[i].bv_len, 0); From patchwork Thu Jan 28 07:11:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052631 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 40679C43331 for ; Thu, 28 Jan 2021 07:27:14 +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 A6CC164DDA for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6CC164DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S7OefC064253; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktmmq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:11 +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 10S7QCrg096812; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5w1-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003Os-AZ; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51U8-0002ZS-D2 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:12:56 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xlod017613 for ; Thu, 28 Jan 2021 07:12:56 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 368wjtmn9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:12:56 +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 10S74JiT040504 for ; Thu, 28 Jan 2021 07:12:55 GMT Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by userp2030.oracle.com with ESMTP id 36bqd38wyb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:12:55 +0000 IronPort-SDR: cLM1mbsjEeGDZP9qh0XzTrnF92Jkh5SpGt4wJsP+5kVUP8i2xzx0k0K33wTjy5uH7I888Cra06 a9ch8IN8Pn1Lh5o0tX13LKwV5QoNcn1sbs6YunY8k+DkbhpFResSx2wI6t90MlU/QooDDz2Ey5 cPvx/KGKi810irYfm5SKbI3lF1KWtZRSHXNBIswoQvS8U3fRNvugxpCy3QP+bTEdrMgMgsW5ws NwXzQ6yHRgrLVI8UOKPrm40zfoLe2NQxTgbzgVOYHb559zIliRHdwv5gLV1r+mew0j4hmCTfKI a3Q= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158517296" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:12:53 +0800 IronPort-SDR: YshQnoBfWEATBgiIBPa3x6XMCR2nH01ghf/d7OYKFtIO+PSalnsMI67jTxc9/9+vHdglzCdRRT s4d6uKzuzBRgmHbWCWIgUGZChK0Z/jzr/fMZpKWdrl0nutbyHP3ZPyiSdBQfQIXVRvCSTEzl9P 7D5ggfavZ57IX+nknLQ1ib+gvrOD8vQ+5FHZ0QABchmHhbJtjZBVswVsNfZQWyToU+Gvbueees Z5Qvz5fRE9qY3mSYlq2hOpXCWEsb2Nprsu7OZo/2zZ//8/giNwqa/0psukqP0ZKdZnirh+9qJh 36P/R4eLmSN07D6RyKn67UBd Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:57:13 -0800 IronPort-SDR: PY5y9iQTPaVno0Uv+vDzXalBIBo52CYeNhdpn1c7TxoOle28qWYUG06GBXepBaS7SSBSs9yjco 7juMCiLNAFC5Fl7+86T3v8dT5wViZ/r3nWsFgtnjfanPUZXEs47a6Ez/SVmFCas+uBcEU4K0rz 829GMnmof7Vria8o+CPxuoND3CfaQPgb+QYuf0lvO7BAPoDvQAY10VoO7lep1Qta/l6nA5+vbg ht+uppfjRckOmE5ekZUsc4vMGzhgqqwVxG/dC7eG99G+et4hw+q4h30FxFyz73HjopgItSw/2N PHA= 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; 27 Jan 2021 23:12:53 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:07 -0800 Message-Id: <20210128071133.60335-9-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.42 X-ServerName: esa4.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=743 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=100 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 08/34] dm-zoned: use bio_new in get_mblock_slow 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-zoned-metadata.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 039d17b28938..e6252f48a49c 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -550,7 +550,8 @@ static struct dmz_mblock *dmz_get_mblock_slow(struct dmz_metadata *zmd, if (!mblk) return ERR_PTR(-ENOMEM); - bio = bio_alloc(GFP_NOIO, 1); + bio = bio_new(dev->bdev, dmz_blk2sect(block), REQ_OP_READ, + REQ_META | REQ_PRIO, 1, GFP_NOIO); if (!bio) { dmz_free_mblock(zmd, mblk); return ERR_PTR(-ENOMEM); @@ -577,11 +578,8 @@ static struct dmz_mblock *dmz_get_mblock_slow(struct dmz_metadata *zmd, spin_unlock(&zmd->mblk_lock); /* Submit read BIO */ - bio->bi_iter.bi_sector = dmz_blk2sect(block); - bio_set_dev(bio, dev->bdev); bio->bi_private = mblk; bio->bi_end_io = dmz_mblock_bio_end_io; - bio_set_op_attrs(bio, REQ_OP_READ, REQ_META | REQ_PRIO); bio_add_page(bio, mblk->page, DMZ_BLOCK_SIZE, 0); submit_bio(bio); From patchwork Thu Jan 28 07:11: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: 12052625 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 29D96C4332E for ; Thu, 28 Jan 2021 07:27:14 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 9148464DD1 for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9148464DD1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7Q8jQ115085; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 3689aatvua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:11 +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 10S7QC4a096808; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5w3-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003PN-E1; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51UH-0002aT-1Q for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:05 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xl0L017614 for ; Thu, 28 Jan 2021 07:13:04 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 368wjtmne2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:04 +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 10S74MDo040576 for ; Thu, 28 Jan 2021 07:13:04 GMT Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by userp2030.oracle.com with ESMTP id 36bqd38x0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:04 +0000 IronPort-SDR: Soa0FP/VAxG+Cw7dCZB7aEZDCKDlTJGIvx3rVG2r3hyeGI+JnbGjE0adkbQzVdUUekMFmhNqBA rdJCxw/Ockt8mhrN/E2dF5eBhJnsWS50lbpp89ryOrW7oc+3R85f5KuM0pYWHt+57i1TAvZvs7 51gnc2rlmrw0iP0PONfS9XsIOhAAcgCifZrt2w+Ys2nk3abPF13JwBOeW5pYvy47mvOwp2EB6C Kcw8NwMdMrc5irC5PqG38HI84InMExa1BABHSW+zAiZxKRaiY8ZiEDhnb0+Miy95VdpEViEY/c 00k= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262548958" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:14:47 +0800 IronPort-SDR: qZoTGf8ALmKLElkf6TlgKjWz8Y/ga7BoS8Zyc01iPl28JdiXJ+8lNSmeqHKqJEWU1odepGQ6z9 5C+AX6dx2FTMXpcIhp8g87oG9gfGktXnwiD7uyNeBTZmybgCfzTOswPb7080Ozj/9IGbSHg0Y6 DXzvgS4XjyR+o5F/hseFbZDz6xKUJpSkfE4XDu9qMGmC360JNTRSIa4N5c3T2GBt2sMfq0voOq 4sl9zVZ2RgD2jSQ/F/+OhVpZtCwTgaIuhwiTpdniRM3kbXB7zWTxab59QgKiC8Cs/wdANf+Zlr Md3GyRksm6y60AMAJbTj1asn Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:57:22 -0800 IronPort-SDR: m8MWhLly+Q/ggpFQoQazEvRAK79hMprrsJeibomNIX1/4xtKgak83IDhV3hY33IYYgETWfckla 12cflgJcZOLhtYF332W1ZeqMwkaZsc7uQahEN2f8ydynExvlY4KkvRqWC31LBbVv2+B3KXuSeg s9mXwdZWg1TGYc2w+IbnJALYEzC776WPgdLPtLGdrMUnCNPoz5WeDSYQd/QZ1Y+MzxJurZd/eC 94O7CZ/ZfohxaTfsL58Np58+H9TOWMfDJbBI8BFZ4728SkC4ncTHu1ybMvyhjmP7gPrroYjKqQ UWE= 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; 27 Jan 2021 23:13:02 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:08 -0800 Message-Id: <20210128071133.60335-10-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.143.124 X-ServerName: esa2.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=225 mlxlogscore=780 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=78 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 09/34] dm-zoned: use bio_new in dmz_write_mblock 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-zoned-metadata.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index e6252f48a49c..fa0ee732c6e9 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -723,7 +723,8 @@ static int dmz_write_mblock(struct dmz_metadata *zmd, struct dmz_mblock *mblk, if (dmz_bdev_is_dying(dev)) return -EIO; - bio = bio_alloc(GFP_NOIO, 1); + bio = bio_new(dev->bdev, dmz_blk2sect(block), REQ_OP_WRITE, + REQ_META | REQ_PRIO, 1, GFP_NOIO); if (!bio) { set_bit(DMZ_META_ERROR, &mblk->state); return -ENOMEM; @@ -731,11 +732,8 @@ static int dmz_write_mblock(struct dmz_metadata *zmd, struct dmz_mblock *mblk, set_bit(DMZ_META_WRITING, &mblk->state); - bio->bi_iter.bi_sector = dmz_blk2sect(block); - bio_set_dev(bio, dev->bdev); bio->bi_private = mblk; bio->bi_end_io = dmz_mblock_bio_end_io; - bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_META | REQ_PRIO); bio_add_page(bio, mblk->page, DMZ_BLOCK_SIZE, 0); submit_bio(bio); From patchwork Thu Jan 28 07:11:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052641 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 59232C43381 for ; Thu, 28 Jan 2021 07:29:13 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 E0A3F64DD6 for ; Thu, 28 Jan 2021 07:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0A3F64DD6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7QB1Y115305; Thu, 28 Jan 2021 07:29:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 3689aatw15-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:29:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PoER103492; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn38f-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003Ps-Gz; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51UP-0002bU-JZ for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:13 -0800 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 10S70GQU012492 for ; Thu, 28 Jan 2021 07:13:13 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvqwk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:13 +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 10S74KBn040544 for ; Thu, 28 Jan 2021 07:13:12 GMT Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by userp2030.oracle.com with ESMTP id 36bqd38x2k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:12 +0000 IronPort-SDR: NbkV/yWx08zFU2oX7LHToowxXR/XM9sOo99LVvngr4Czy8j3AzS9amIjviq8lDfKpENTqlrqAC FdV++lO57N359UbPJ7RuiHZSkNNVS403oHW+tgI6z0a0ToCotfr4IMOcjy3rdjSjaxNhmkhvjm mLrvQRPrXbmXcN1Ybze3l1b92mlfTT/mAswH+Jdjo1ROFn76ZcVgzmrufFowoLbhWdOH8Vy5O1 CcaRXoQbMOgvomlGg99VbYQJ4DhyUdkUn+uNjhDPFwo00UhnFCEV+FA8sAQu63/3usvPcs/lpS mdY= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="268892440" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:13:11 +0800 IronPort-SDR: 7Zht9O/M3+m8v5R6oj4mW19L96Vpm1qHd5H6kudPkros1KHufa+le1yniKIiFHwDbBVqz2zn7g WAVQL1wT/xqqWdZVCwF5x43VyeollTWwJljaqDT0GxwSejpxO0Apn7kxHcgeo0mCfqkFy7QfX/ ZC6QRMiKPbbWRUqBGvhVD6UMR61qxL2GqBV7INNitDoG3x18on7p+wd7x3YTRkoYzwr9j1ZQ7L mOqb5xFxC0CQuZYE14edE3sOzCNs9zij3lmgUUUadQis1TQ74az9ho4rYyr0DRe9D4xkrQ88Qv sAeYFXGNPCT7Lj4TEb6aDv3n Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:57:31 -0800 IronPort-SDR: B3g2yURiLlkRDJQjiSw5Axb2Dh2vXpaNrKE/QAQl3YC0d9KYF6ZY/2WEGrs8Ad4s6CTMSYijlI As81DRh7fxTUcG6XscFZ0dEUGMxghLXCUSNbFTul1lhg8N84M173b0zoMSc59+C6RPGCZyVbXT e5q9NGchuukS+6n/XolnPl9CgZkf3lpSTdPe2xwj7IsZkLY+Q3H2m4972b6vr4aHe8P7F7VrjW YTjKY9EpCmYYdyolrCzI7bP6MpRPHgjkbRdfoyYEpwC7inxXY41c/i8ke9uNT4EC8+Q8lA/Kgh 6rI= 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; 27 Jan 2021 23:13:11 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:09 -0800 Message-Id: <20210128071133.60335-11-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.141.245 X-ServerName: esa1.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=226 mlxlogscore=851 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=78 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 10/34] dm-zoned: use bio_new in dmz_rdwr_block 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-zoned-metadata.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index fa0ee732c6e9..5b5ed5fce2ed 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -755,13 +755,11 @@ static int dmz_rdwr_block(struct dmz_dev *dev, int op, if (dmz_bdev_is_dying(dev)) return -EIO; - bio = bio_alloc(GFP_NOIO, 1); + bio = bio_new(dev->bdev, dmz_blk2sect(block), op, + REQ_SYNC | REQ_META | REQ_PRIO, 1, GFP_NOIO); if (!bio) return -ENOMEM; - bio->bi_iter.bi_sector = dmz_blk2sect(block); - bio_set_dev(bio, dev->bdev); - bio_set_op_attrs(bio, op, REQ_SYNC | REQ_META | REQ_PRIO); bio_add_page(bio, page, DMZ_BLOCK_SIZE, 0); ret = submit_bio_wait(bio); bio_put(bio); From patchwork Thu Jan 28 07:11:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052643 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 119DBC433E6 for ; Thu, 28 Jan 2021 07:29:13 +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 948B864DD1 for ; Thu, 28 Jan 2021 07:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 948B864DD1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S7OuCi064346; Thu, 28 Jan 2021 07:29:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brktms6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:29:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PoC7103516; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn38j-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003QN-KU; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Ub-0002ce-Ub for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:26 -0800 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 10S70GQV012522 for ; Thu, 28 Jan 2021 07:13:25 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3030.oracle.com with ESMTP id 368wqyvr5c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:25 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74Uuc014164 for ; Thu, 28 Jan 2021 07:13:25 GMT Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by userp2040.oracle.com with ESMTP id 36bpgxhkg4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:24 +0000 IronPort-SDR: a/TlQwril2UZxK1b/P/stHK5ZxzCtB1xMB4DAK62GtjpAP4kuSVw1g6zXAccmJM4dMm0OsUBmE Kwd1Qb1CFMVTXXTVg6izmdT6EGI6944QoM/FsUhghDWS9YnGRBmr98vxFlsTaDFEHXXvBtAZ+4 Bxf3/nqYJALD+TWPaQEiRVLXywknqKfvcqSbuKLmXf50+FRsz0R5Wrxcxlmwc9KamwJVo/1SuE VhaIu4cxfEGUfOYyg1ff/jFyyKcpje+FklIzw6AbTf+tYS3InrkB1spKEdFPKbW7v73WgS0u+c w4Y= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158518175" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:13:23 +0800 IronPort-SDR: OhGjDlj8iyhfC8JQOUngYw5ODcf/NI3cYbf+gh4Sytc1Oew4etbGZivqcqhh5GOcxzmqdb4qKO oO5dBd0VhUFDMFFrpsu+UcHo4GP+VEhf/xgcv+6n2FI1rhc+LePGm9oCrbOxoToznUfIhqhYhU O7azSeEnO2RybqQ8dt/VxotqlCn/jAnyTgBiByjTSWVy4vymD+Y/w8aetRyLAGWmfvw6QwPyle bxZGmw+UiBXQZ+wn53xqZy0PQqgU3ifFjXUELM7V1eW3T2jp38FjwwbnxqRO76Wh6RpACWTOWl ZR9Fd24X0pL3o7elaP5Makn/ 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; 27 Jan 2021 22:55:41 -0800 IronPort-SDR: S7K4kJLXzJBN+TtdhPMN6TP/Dffs+zSa3G/de5+S1/PIJxe5GMDYhILg7ObwZaeQtAx8NJxvkl nIc5LC+mPpv7TI+pptGOuvqvgXc2tzfVFCEyc5+LFgl+ipYQILMS5NCsDr+0Wgl54XSWETlfzh gHkg4ZggWJkUuTGFtq5ayNdqurKZ4tOlkNjJtnTH4tbAn7NSWqg+Ok++T//Bdn23FoUZxk+NbJ AQUU7LKb9NmxAxDMj2VCc1ROkgf8sOKgTR+MW0zxXzuua4VhN6N1CvrlPe6fa6RhDqhXPf7MuT aTA= 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; 27 Jan 2021 23:13:23 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:10 -0800 Message-Id: <20210128071133.60335-12-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.144 X-ServerName: esa5.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=160 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=694 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 11/34] nvmet: use bio_new in nvmet_bdev_execute_rw 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/nvme/target/io-cmd-bdev.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c index bf6e0ac9ad28..f5fd93a796a6 100644 --- a/drivers/nvme/target/io-cmd-bdev.c +++ b/drivers/nvme/target/io-cmd-bdev.c @@ -225,6 +225,7 @@ static int nvmet_bdev_alloc_bip(struct nvmet_req *req, struct bio *bio, static void nvmet_bdev_execute_rw(struct nvmet_req *req) { + struct block_device *bdev = req->ns->bdev; int sg_cnt = req->sg_cnt; struct bio *bio; struct scatterlist *sg; @@ -265,7 +266,7 @@ static void nvmet_bdev_execute_rw(struct nvmet_req *req) } else { bio = bio_alloc(GFP_KERNEL, min(sg_cnt, BIO_MAX_PAGES)); } - bio_set_dev(bio, req->ns->bdev); + bio_set_dev(bio, bdev); bio->bi_iter.bi_sector = sector; bio->bi_private = req; bio->bi_end_io = nvmet_bio_done; @@ -290,11 +291,7 @@ static void nvmet_bdev_execute_rw(struct nvmet_req *req) } } - bio = bio_alloc(GFP_KERNEL, min(sg_cnt, BIO_MAX_PAGES)); - bio_set_dev(bio, req->ns->bdev); - bio->bi_iter.bi_sector = sector; - bio->bi_opf = op; - + bio = bio_new(bdev, sector, op, 0, sg_cnt, GFP_KERNEL); bio_chain(bio, prev); submit_bio(prev); } From patchwork Thu Jan 28 07:11:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052623 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 187B4C43381 for ; Thu, 28 Jan 2021 07:27:14 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 9153564DDB for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9153564DDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PSFo114823; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 3689aatvuc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:11 +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 10S7QD9Q096930; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5wa-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003Qt-Oj; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Uj-0002dS-N2 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:33 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xm1j017744 for ; Thu, 28 Jan 2021 07:13:33 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 368wjtmnue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:33 +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 10S74TP6040727 for ; Thu, 28 Jan 2021 07:13:32 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2030.oracle.com with ESMTP id 36bqd38x69-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:32 +0000 IronPort-SDR: sjLcRD7MCFYUbEsJ3gHTe8npWPgAIvKEisJe2BEC3zrcCgYfQx/ZkG2V+vqOQ/FRTd1y70Uw1P oy/CwRdxtPhkq7/g4DEJn2rflzXRFzC3CtLzaZKiOauezMXm1pkmzgwkdrYN6o07jELegjTEbR /G2TcKQiIyy5f/Qrg8E5xaDyLG/pJMOG/QmvZCyLSYwP18j8fi3sCbJRwouaAlf0N+VmvbVaG8 XZ/kB1xJNqDLop8llWgiHw0dLtKwco157Z5nnKp3r166i8hktI/SbZP0o9QXRGzoTe7vMYW+1A NqA= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963241" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:13:31 +0800 IronPort-SDR: lRLJ1gvql69/s01C0vNUAQTu5HeUBiuANfv4jbaPEM4AqPbDCImclQ401e6yvLYy045jTf1Ibc yIXvkYwj5E+T4FQqN6NvfbdbQK4G9pVMxOzFGNigShtxYCgNsRGwKE2ZglXk5rO7XJZ82ixK7i Md/2DA/9D8Xdyoa+jp8wY8acnNF933f1W0RkbhGfFLqI7xSRZzCY4OjNiV25bXPB0+DT2qFis7 DDBSv3IWfxTk8WLMa4AHbDMOIDMqcF3fRwD3IlKUaxqCq0D8oQh8kgsfT/YxjYzbv8qRmyCPx3 dr+2S+yfxfYx8M5Vrdyj5cA0 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:57:51 -0800 IronPort-SDR: VOVmzSzF+PFJ5cIlwEfer9zopXRJVevtkqTAdV/vkmWi5tqY25x0d3LuGTyYENdxWXzay1z5UI 3lglUXeUdXrgV2kjosRDVsxHgPX3JmYCMkybSp7dVFiY2NtJizGeP3Ns2Zua+ztPSx29L5AtLA s1r4WqMcMEF5NenjfW/yptNoTwylDj+qb8oKvyina3WsNVkg0wovZeJk89NSPRf5yUzOMPXVB7 hd4QqToWmHIoH7o5yPqPfXS+LYwCHRus+XuP8hoEESu425XNxiI+t6Xi0EnlRBN9AYDyemp/IQ NGk= 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; 27 Jan 2021 23:13:31 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:11 -0800 Message-Id: <20210128071133.60335-13-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=636 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=173 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 12/34] scsi: target/iblock: use bio_new 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_iblock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 8ed93fd205c7..f1264918aee1 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -379,10 +379,9 @@ iblock_execute_sync_cache(struct se_cmd *cmd) if (immed) target_complete_cmd(cmd, SAM_STAT_GOOD); - bio = bio_alloc(GFP_KERNEL, 0); + bio = bio_new(ib_dev->ibd_bd, 0, REQ_OP_WRITE, REQ_PREFLUSH, 0, + GFP_KERNEL); bio->bi_end_io = iblock_end_io_flush; - bio_set_dev(bio, ib_dev->ibd_bd); - bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; if (!immed) bio->bi_private = cmd; submit_bio(bio); From patchwork Thu Jan 28 07:11:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052647 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 77677C4332D for ; Thu, 28 Jan 2021 07:29:13 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 048556024A for ; Thu, 28 Jan 2021 07:29:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 048556024A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7O1X7005231; Thu, 28 Jan 2021 07:29:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7r2qpc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:29:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PoKD103651; Thu, 28 Jan 2021 07:27:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn38p-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:10 +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 1l51ht-0003RO-SQ; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Ur-0002eH-G3 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:41 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xloo017613 for ; Thu, 28 Jan 2021 07:13:41 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3020.oracle.com with ESMTP id 368wjtmny3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:41 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74EQS013918 for ; Thu, 28 Jan 2021 07:13:40 GMT Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by userp2040.oracle.com with ESMTP id 36bpgxhkj3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:40 +0000 IronPort-SDR: dhMqjbeYkpxu5lznIcB3Nm1kfTK08hnYJpe2mHuySg64e8M+bvL1unhJufe95pMZiLty9m3xfo 5jxNosdsKduNQEHXb9iZI00MaW7T92gMYhkpz4mETNpo6x4djn/Xvb6h9UY0garBT5KpZEXLNB ULW7r7+o7PVdmi4A97H0dOVKlOvEhV8Vj+CYZXUOdbOewugqbEhxAKxZGOzNuA341FltLUUKZE 04EaucLNka8u6A6832i0aJWHhv468MjfRnHM6ks6JKX9ilT670rn15zpyzgORrj7MSvFef+Ydt GUA= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158517350" 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; 28 Jan 2021 15:13:38 +0800 IronPort-SDR: h+a2//sF8zwSWLiJv9dOY9Rv4kjGKg0CMfaqWxaiIFqOAdIpHyDF7YFTdv7OPiW2WrhTdkNGao DetjTvMIchY4InWD5Acl88zI711JxlnMK4l+JePLPU6Pldgon2LgKsXe96ogHRytNCQpR0sm4H J3K/Qo+4LhlsZ1J5d6y5OcEcq6H8EJ0Z/ZMPzIooFZlW1hPC5PdsiIJ/EEH2TRCOGlz/iNSMAI PZBtrfNZfHJuOyBz8Aa2uznGYFTVtdgNe4t20CKb/Ro9lo2t6dsCqv2k2gvASoS2I2OjPxXuZG C82zDtU5rH6QkaEhDxgp+nkY 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; 27 Jan 2021 22:55:56 -0800 IronPort-SDR: Soam0z/hZs1yuoqW7i6jx5roOoHAapZwcG8+RboeMSicIzBmOYiX0n71yThGE0I1AnlhuM1di0 VAe/ab59Zj3d54HqeQwwCvYowNBZyfmch3v7Oy4azaqst0BpJQIg4rXG9R5IU/X7180i4BamQI Pdm6cEOWuqZT053sZGwqRvhtwriLsaGVJTX83nQ+r2PwZZdfIXxXkXEJoScfk1suUPevohY8gp ghp78Zzi9GkjGDnNvz6HqiAkBvVb/9awaEDn2T+13/9ul6gQjwyqb4x2IkJNU2l4rR1clxPnay 0k0= 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; 27 Jan 2021 23:13:38 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:12 -0800 Message-Id: <20210128071133.60335-14-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.42 X-ServerName: esa4.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=108 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=519 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 13/34] block: use bio_new in __blkdev_direct_IO 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- fs/block_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 9d4b1a884d76..f3e3247894d7 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -367,6 +367,8 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) return -EINVAL; bio = bio_alloc_bioset(GFP_KERNEL, nr_pages, &blkdev_dio_pool); + bio_set_dev(bio, bdev); + bio->bi_iter.bi_sector = pos >> 9; dio = container_of(bio, struct blkdev_dio, bio); dio->is_sync = is_sync = is_sync_kiocb(iocb); @@ -389,8 +391,6 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) blk_start_plug(&plug); for (;;) { - bio_set_dev(bio, bdev); - bio->bi_iter.bi_sector = pos >> 9; bio->bi_write_hint = iocb->ki_hint; bio->bi_private = dio; bio->bi_end_io = blkdev_bio_end_io; @@ -446,7 +446,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) } submit_bio(bio); - bio = bio_alloc(GFP_KERNEL, nr_pages); + bio = bio_new(bdev, pos >> 9, 0, 0, nr_pages, GFP_KERNEL); } if (!is_poll) From patchwork Thu Jan 28 07:11:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052633 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 F02B8C433E6 for ; Thu, 28 Jan 2021 07:27:15 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 7D0306024A for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D0306024A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PiU3114925; Thu, 28 Jan 2021 07:27:12 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 3689aatvuf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PpMc103931; Thu, 28 Jan 2021 07:27:11 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn38y-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:11 +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 1l51ht-0003Rs-UM; Wed, 27 Jan 2021 23:27:09 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Uz-0002f7-55 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:49 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xmFa017700 for ; Thu, 28 Jan 2021 07:13:48 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3020.oracle.com with ESMTP id 368wjtmp2a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:48 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74IEH013992 for ; Thu, 28 Jan 2021 07:13:48 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2040.oracle.com with ESMTP id 36bpgxhkk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:48 +0000 IronPort-SDR: a7mT8VRY7nfS0qlbWdE/+4BIqmsxSdwPBeH6EzlcWb0je6mkQiqFE3zUTYlaC5nWsJkLGndSlL 2Sf9SuCaxbs+W+YRB6NHWTH7jRkNHW/nGloGzQ9r624b4X1Gm9QVwG5gh7he5Eit3jFxiVC8jv OJaiOOkl5lC32CUbTxBb2QOk103da//7tQ8PmpQ7BoP60Dv9K7KphDlySLJDqKQivnsqWH6/Of KhipaEiqLOrJSBmXrNYlb/c37qyHA3TfoX3C5AUhOQpuuDc+7IE0DpNvL5sJQePavPPvvl0DWN 1zs= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963267" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:13:46 +0800 IronPort-SDR: Cu6qic24F/7AlVLNkcHao8mB3hf8LreOTIcgC71grr8MLsYUzcUmZW1nZO00ABQwmVcvIUjAPY KwpIoa/pK+jl/5tMQqpzM1nQ5ADbhSeDpxtUKtWvl2AyzsmtCv8HvOkc9RGyCVXLEKHsZstAW/ JNroD8oELjiFG075iG8ET4A/8jyxTGOb1IZ6pImsbSD9kEVnbHfC2gsoBpsBX1RTuRttIQNZmy hvfqld+f2Bb3xbVTh3b2pQVQ8NBRsz8nqELhr5RdhGB2iw51wrvN2P+gJLVvnyKHMCEE6QFzKc I/ZjL5p9By0WWyLxgWciqY6r Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:58:06 -0800 IronPort-SDR: 2qgPwD8neR80/SdtH4pRH50bxmDr7msnaiMmu0nET+XLf24Atsm9LH9w2S7p7pMRphnBeo5pVx VOFkyyTuzt5tWdOljMzaLRlQ/2Y+vBgbMl5P6BLyAgHROT8V3ajdo6WQ+YwR34TObygZuUERZX rfU+sPmHgGS1V+3dgxOeo8REERCKgWHIYxzhiuWRBtY6dBheQaeAr6VP4LTAPeLl+kd1iFUoyd mqKwU7dlwbyE4M8F7GURh/yglDYKxcs47wr8oitkT1bgU4EtSPSZoGcLrNM5tqqKQP8I79UW3Y S3E= 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; 27 Jan 2021 23:13:46 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:13 -0800 Message-Id: <20210128071133.60335-15-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=173 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=558 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 14/34] fs/buffer: use bio_new in submit_bh_wbc 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- fs/buffer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 32647d2011df..fcbea667fa04 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3023,12 +3023,16 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, if (test_set_buffer_req(bh) && (op == REQ_OP_WRITE)) clear_buffer_write_io_error(bh); - bio = bio_alloc(GFP_NOIO, 1); + if (buffer_meta(bh)) + op_flags |= REQ_META; + if (buffer_prio(bh)) + op_flags |= REQ_PRIO; + + bio = bio_new(bh->b_bdev, bh->b_blocknr * (bh->b_size >> 9), op, + op_flags, GFP_NOIO, 1); fscrypt_set_bio_crypt_ctx_bh(bio, bh, GFP_NOIO); - bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); - bio_set_dev(bio, bh->b_bdev); bio->bi_write_hint = write_hint; bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh)); @@ -3037,12 +3041,6 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, bio->bi_end_io = end_bio_bh_io_sync; bio->bi_private = bh; - if (buffer_meta(bh)) - op_flags |= REQ_META; - if (buffer_prio(bh)) - op_flags |= REQ_PRIO; - bio_set_op_attrs(bio, op, op_flags); - /* Take care of bh's that straddle the end of the device */ guard_bio_eod(bio); From patchwork Thu Jan 28 07:11:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052621 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 2F88FC433E9 for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 95D0C64DD1 for ; Thu, 28 Jan 2021 07:27:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95D0C64DD1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7NvQC005197; Thu, 28 Jan 2021 07:27:11 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7r2qhw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PoES103492; Thu, 28 Jan 2021 07:27:11 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtn38v-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:11 +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 1l51hu-0003SN-0i; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51V7-0002fx-Nv for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:13:57 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xlR0017624 for ; Thu, 28 Jan 2021 07:13:57 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 368wjtmp6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:13:57 +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 10S74PTh040695 for ; Thu, 28 Jan 2021 07:13:56 GMT Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by userp2030.oracle.com with ESMTP id 36bqd38x9f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:13:56 +0000 IronPort-SDR: wmyiSBdBQic44sqZjrnDQiqRzSGuF7PKef4B2x14Lj6TP6ijjGlnoxMYvUtnugQu4wwuI6i+lb VRczEY89+OqrNkHXjkzQAUpsJnxlO/PlBzr+0+tKehNP+RdhAQ5g/xq/ljygagZNXZ3O1fMMVp oXALFX9ie2RwAEFJ7CTFe4Ntm6QQFS8vGpjvmFDYddq6hC90f9Zx1vgBQNUfnRiGyz4CJtiWRU OjoxPKbVQLMd/Q8ViZ/DKMKLWPFOoglpjGKeVeWuRVkjT68W3lXymvWhQqEYoymVygtvRubnCs zm0= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262549029" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:16:05 +0800 IronPort-SDR: U8dFrdhQcypxpxeW45XtNYjRoFKP/AXauUY7qhRfvzSvI+1bj9IQPU3+3WnyN3+oGnFEk6FEin 4/ynfec18RBBwqiNWArdL1tSYNV3qrrmbs3V6GVvzr4cE1olO7sa2ybDwdUzWeQStzOZu+Yc9u MSFEOCCqgCvCFJmLV5TIaFs2LP3FmRQTpSnZ+yiCDi+oBmtj5efkcHfgzzsoXzv5378dvdo56S n+tn2IsefjVQOnJHekrbIpz/OIi0I4LKJZPmHCs2HbrhvUho9a6XQmkhPr0jZhtXi1HwoYFlw0 FaUBkqxKfZTwnfuU68Obef8P Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:58:14 -0800 IronPort-SDR: pB2cXSth9j9iO8qI9kro9aUnzxe7uC+CM4R5ezhi5mkNe3QJ3MeSZh+GGUOxW9ROBr/hgtgk35 3kQYC2KUTB+4qbQnoUg89GyqXiUICL6Lbb6/fLgPHrp+IuvY60iwR3VPtR6IrHib1STZYvjFII G0U9LFUNwbOn5ju9S5MOKHMAKhFoQxnYNKdJKA68HgaqnFN4j9YRc5HgIY3H1XVVcQBHwY13od d8yfo6WXgScVxvO/+aDCj5bBUi8Qq8LHMuAKgJFuukK9k/tSzy9sPaWEv7Xl8jluo8DC44HSzF bXE= 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; 27 Jan 2021 23:13:54 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:14 -0800 Message-Id: <20210128071133.60335-16-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.143.124 X-ServerName: esa2.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=858 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=108 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 15/34] fscrypt: use bio_new in fscrypt_zeroout_range 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- fs/crypto/bio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c index b048a0e38516..20dab9bdf098 100644 --- a/fs/crypto/bio.c +++ b/fs/crypto/bio.c @@ -148,12 +148,11 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, return -EINVAL; /* This always succeeds since __GFP_DIRECT_RECLAIM is set. */ - bio = bio_alloc(GFP_NOFS, nr_pages); + bio = bio_alloc(inode->i_sb->s_bdev, 0, REQ_OP_WRITE, 0, nr_pages, + GFP_NOFS); do { - bio_set_dev(bio, inode->i_sb->s_bdev); bio->bi_iter.bi_sector = pblk << (blockbits - 9); - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); i = 0; offset = 0; From patchwork Thu Jan 28 07:11:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052619 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 0CA40C433DB for ; Thu, 28 Jan 2021 07:27:14 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 81D5B64DD6 for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81D5B64DD6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S7PFTO114766; Thu, 28 Jan 2021 07:27:12 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 3689aatvug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:12 +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 10S7QC74096835; Thu, 28 Jan 2021 07:27:11 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5wq-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:11 +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 1l51hu-0003Ss-3C; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51VF-0002gm-Nl for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:05 -0800 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 10S70F9w012382 for ; Thu, 28 Jan 2021 07:14:05 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3030.oracle.com with ESMTP id 368wqyvrxh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:05 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74GJx013965 for ; Thu, 28 Jan 2021 07:14:04 GMT Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by userp2040.oracle.com with ESMTP id 36bpgxhkn7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:04 +0000 IronPort-SDR: kI1UfgaZvfdhd3mes8N75+y7dSvD4sPh8lXXeWdHiR2xEehSRzz0J2McEYIrNGjyHtHaadWfcS fwCqN7RTaPiYBvWNu3YrtDSy3Q1FXcGk6vB9dPzqvpKQkbBRutILU28Qo0LqimviFcS+Kz6zKq 24vr1Ybm1R6RajUoXv0YGn3NOGHH3ZsuKG7qfq5IiFcKUxKmF76Q/uRRqahABPnJSDWHsZja0w yop+AG+sdlGeHKO+Y7mzxFGPQMa3BNN4Tyh9B6qD+o6eY4hhCZx98BL0WsOQqqh3oEIPI5AzaI dHY= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158517390" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:14:02 +0800 IronPort-SDR: C7dQEFKbhU77/tRwY6hogJrZ2G8qKswtpNXowHWa9ukFhCf/RrV+XpCZMo1acuaR+xIqU5embM W4Z5CnbVJG0GlbNaYRWfNV5d4c1KGisGpQLk/mQiitdOFNZRg7GF9kn56vPHxnT5FrLTFk6rMm 58VwvqsQgowFpNfzu2xaKngyxucvHrc/aUXuQ62lvaHcR3ma4p7kvcDH9xkqhhbDAUJ7Vs6MRq E/BD5wQOHKD1jRHZuZrrKQ/WKt5nSlP/k4nVkO5RLFTuIqHxH0YKH+yWiqfpS07aaZil3kw6L1 JdsBpNYWrcUqNouVDg/08ntg Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:58:22 -0800 IronPort-SDR: bKh0CeniWKxunCNm+jG9l29yuZPN3D1Gz/JAN/nXUgFIRD0d9U6vumFzntseHSRI/MX2HRMaPA UMPAuzQRLKKctTclKUM2aKzz/TiMAXwUZH3o+WrBdocCIchNR3Uaqkot1vGRPosruVN9zghU/S 4vOkqxWogelsFgsfoTKuGHPXS0UKS78L+4719OXJlLRXt4xtaxkQvpBhG3tmxGAdTiSRUPHfPH NMPtpPqqTRUN1CMc8PtnqpeNKU9vUEZxV6F3t4AwWzk79mqUHtn9Cp1IEV7L86NNsrAMFQsKWR ljI= 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; 27 Jan 2021 23:14:02 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:15 -0800 Message-Id: <20210128071133.60335-17-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.42 X-ServerName: esa4.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=108 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=742 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 16/34] fs/direct-io: use bio_new in dio_bio_alloc 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280035 Signed-off-by: Chaitanya Kulkarni --- fs/crypto/bio.c | 2 +- fs/direct-io.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c index 20dab9bdf098..28cd62ce853e 100644 --- a/fs/crypto/bio.c +++ b/fs/crypto/bio.c @@ -148,7 +148,7 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, return -EINVAL; /* This always succeeds since __GFP_DIRECT_RECLAIM is set. */ - bio = bio_alloc(inode->i_sb->s_bdev, 0, REQ_OP_WRITE, 0, nr_pages, + bio = bio_new(inode->i_sb->s_bdev, 0, REQ_OP_WRITE, 0, nr_pages, GFP_NOFS); do { diff --git a/fs/direct-io.c b/fs/direct-io.c index aa1083ecd623..6aab1bd167bc 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -397,11 +397,9 @@ dio_bio_alloc(struct dio *dio, struct dio_submit *sdio, * bio_alloc() is guaranteed to return a bio when allowed to sleep and * we request a valid number of vectors. */ - bio = bio_alloc(GFP_KERNEL, nr_vecs); + bio = bio_new(bdev, first_sector, dio->op, dio->op_flags, nr_vecs, + GFP_KERNEL); - bio_set_dev(bio, bdev); - bio->bi_iter.bi_sector = first_sector; - bio_set_op_attrs(bio, dio->op, dio->op_flags); if (dio->is_async) bio->bi_end_io = dio_bio_end_aio; else From patchwork Thu Jan 28 07:11:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052947 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 9362BC433DB for ; Thu, 28 Jan 2021 08:12:40 +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 115BB64DA1 for ; Thu, 28 Jan 2021 08:12:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 115BB64DA1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S88g0e138698; Thu, 28 Jan 2021 08:12:39 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktrub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:38 +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 10S8AGHn091899; Thu, 28 Jan 2021 08:12:38 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy30t-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:37 +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 1l51hu-0003TN-6z; Wed, 27 Jan 2021 23:27:10 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51VN-0002hb-7F for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:13 -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 10S7182Y050148 for ; Thu, 28 Jan 2021 07:14:13 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq964v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:13 +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 10S74N8Z040613 for ; Thu, 28 Jan 2021 07:14:12 GMT Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by userp2030.oracle.com with ESMTP id 36bqd38xbx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:11 +0000 IronPort-SDR: 52xayH2V3/06MSzzHsqaUSowNmyQYDCt4ZnjhH5BIyzvWiGivUH5KDUnBNBAVf3GY+fQg3bpLh hgsxcXH52YAqx+0ZeV7r6eUTBb0l2Cw5jf02Xam8KXVfkVQeUg+dboRZBW4Rwqzuc8o6ppLjXk ZSj44JUz+aaIp251rDu1QA7FrIjDCTKF2amgvpxOcZpBvznV5modRbmYkeTMug31UJj25r593x QZpYUImYqAOhUzNT5sg51ETbRh0VZBG3Mvsrc3FUvM943akHXxp1V/ktjMkaw3Kpn/Xv6chzL8 Ttk= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158517412" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:14:10 +0800 IronPort-SDR: Z/8njIQ9bfT+nDu9Pi6LpvurG4utrUmxDxkLkXiPogJ3451ryY5au5riYy+yiRErV8IR9x8xCf Pl8RKuwPmjXMr9xnKoupknFByOiMffxEIQMKlF3IQloIF7Jx0hpLtbaI0EMLN5Vjg+MHrFx+UB aP8sHLyTsqpwgMenIV8DBKxSYaG3OMKqGxn0ug6vqII4eFdAgHoAklkikNi6c0imj0tJy8J4NI rFtsX8WWjQp+gPh4FrQpgP/qaeD3mGpeucr5artbM2zjG0ES+fJalnLM/sBZbdk6thD8sLjiBd GTTN9m7I9jzyAaQWIoOd/Glg Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:58:30 -0800 IronPort-SDR: lKKhoxaMeyOwXqrT2FSzD4wN8uVJ+mvKyFTUKLm7JjK92Do6Pp8LlRaYGgmaQWgAcNgigcbWq0 dr8eH/C5m6jarJyZCPupuIjbqQYzS6I98zkdR7vs+3yNowqMQiZeF1CHZrTo/tpym1SjWfvRXs 6jUItt1/GcDgh349QalPLGcjYuMZ5A1EKw0wTA/1PN33qNlegyypjYwNakr5Qt7Zi77XOTVrdO glPMuXb+RS4OnELTigLzoH/k3P2LKO+/yrMNDKd4LQa/txopqXKI4iyznrBVm1YJBPOgSOjnjZ uxk= 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; 27 Jan 2021 23:14:10 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:16 -0800 Message-Id: <20210128071133.60335-18-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.42 X-ServerName: esa4.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=468 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=173 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 17/34] iomap: use bio_new in iomap_dio_zero 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong --- fs/iomap/direct-io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index ea1e8f696076..f6c557a1bd25 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -189,15 +189,13 @@ iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos, int flags = REQ_SYNC | REQ_IDLE; struct bio *bio; - bio = bio_alloc(GFP_KERNEL, 1); - bio_set_dev(bio, iomap->bdev); - bio->bi_iter.bi_sector = iomap_sector(iomap, pos); + bio = bio_new(iomap->bdev, iomap_sector(iomap, pos), REQ_OP_WRITE, + flags, 1, GFP_KERNEL); bio->bi_private = dio; bio->bi_end_io = iomap_dio_bio_end_io; get_page(page); __bio_add_page(bio, page, len, 0); - bio_set_op_attrs(bio, REQ_OP_WRITE, flags); iomap_dio_submit_bio(dio, iomap, bio, pos); } From patchwork Thu Jan 28 07:11:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052629 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 5B93EC4332D for ; Thu, 28 Jan 2021 07:27:14 +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 DC82364DDC for ; Thu, 28 Jan 2021 07:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC82364DDC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S7Os1l064330; Thu, 28 Jan 2021 07:27:12 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktmmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 07:27:12 +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 10S7QD6v096881; Thu, 28 Jan 2021 07:27:11 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyw5wx-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 07:27:11 +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 1l51hu-0003Ts-9O; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51VV-0002iR-4b for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:21 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xmIS017767 for ; Thu, 28 Jan 2021 07:14:20 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 368wjtmpgv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:20 +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 10S74TPF040727 for ; Thu, 28 Jan 2021 07:14:20 GMT Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by userp2030.oracle.com with ESMTP id 36bqd38xcp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:20 +0000 IronPort-SDR: Qv0Sw/ZVgo0LnRajimyc9/rVD0H3jmg0HWrZEvGTq03mRlR9YOkI8dBGZO08m6B5BPT1k5s9iS Sz+f9XaMPVg28Dmqj3avA7Iy+IVmQT04ExGgKULEwev9/OFMtmKgRv4i8mb2fcotCUUdsknX8X ZNYnh7HoVahs44LnhFFkhnYfYQwKncn9oLwRD6TW5m6E1znsG5DtAZ+zzfzz3P5/74uliptXKx 8e1fICZvewn7r6Sm/BTtOpajkxIhV8Mez2/V40eMEX1NClWUX+r26R6scRpbHzXpbXFvwycGn1 IEU= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="159693910" 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; 28 Jan 2021 15:14:18 +0800 IronPort-SDR: sl2C/BtLwNAvkUHZbhpC15Tuo302B9HMzBGahVcG8oTbISIKgsQCyjcwsen2qM9Q0uQT2fQdK4 MSbOUixkG9acwR1WQUv5mIdtRDKUg882It7lucitu4q7ayrOxoCVHY8SybXCtnMkc6xmNDTuPE EEUMITc34WbSdeyrP3n7ALV9Wleogp2qihE3rH5WODozvyvxR+vHj+AFujKGuErFDTLLGRRTp7 gFVeFvkpRKJrNpLLijnua+yv0dqJmwYtpcYyfE6adSX+Kuvg/HAeDNCTdhuGPQlm8ph4krteHU VDlCJVKG2iou5DdZpmq0EzqY 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; 27 Jan 2021 22:56:36 -0800 IronPort-SDR: SE/7jhzj8mUN4IuNpOkC3snrZ8NJ1clnXy6y5ds9FsX94ZBtriQ4uRa7QWKdGcnXbjLMCBoUCV muTlW54Qa3qPh6fwMtXMlfwP2+yfKLqOcAu45V7pI+dpenWI0L1OM9udcXtJMTQueAmHig5gDN d6OcRwyGrT7GxH48PliS/P58sqmLq3e242QCy6iyXTMgFXRd2EClUAs64FPFphS/GBkZYgQLMx xAByTj3G42kPYoeBIsWoRZMAgUwhHcuqehcOxGoJkKVhb66+D9X5hujEyFAgPHDC4Sd1jNsKev N7A= 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; 27 Jan 2021 23:14:18 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:17 -0800 Message-Id: <20210128071133.60335-19-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.45 X-ServerName: esa6.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=522 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=173 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280035 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); bio->bi_write_hint = dio->iocb->ki_hint; bio->bi_ioprio = dio->iocb->ki_ioprio; bio->bi_private = dio; From patchwork Thu Jan 28 07:11:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052963 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 454FFC433E9 for ; Thu, 28 Jan 2021 08:14:11 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 C89A064DA1 for ; Thu, 28 Jan 2021 08:14:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89A064DA1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89NAO189357; Thu, 28 Jan 2021 08:14:09 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 3689aau19h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:14:09 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8Bo4g106963; Thu, 28 Jan 2021 08:12:08 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq3ab-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:08 +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 1l51hu-0003UO-CX; Wed, 27 Jan 2021 23:27:10 -0800 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Ve-0002jK-P5 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:30 -0800 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S70dN5177404 for ; Thu, 28 Jan 2021 07:14:30 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3020.oracle.com with ESMTP id 368wq195p1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:30 +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 10S74NdD040630 for ; Thu, 28 Jan 2021 07:14:29 GMT Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by userp2030.oracle.com with ESMTP id 36bqd38xee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:29 +0000 IronPort-SDR: 6CIVDboiL67HnNJ9nr2sm4CAztMW6aGHJk+AdWYGP085zgamukHUkmQAVOtGU+GBsOAeBHVhAQ wJ+zT6o4f5ShzepspTAWVVKU7+4Ksqj1tv7iJkiOHUoLez3UFBZLKD4LoSks3ASbu5xMPZRW7c B8OKdvQceopUPK89+bHeeIGYm6TKy/W2rMHPZf37FzBqLC2szFLbfRmJh2cvxjt7/lmt4xs+TB rs7DO0ZBTLAi6zhrsciby2eda+JC5LZcedflod7s3tsM/Vl3oqfni3iE5gqZptqH7toM0dncIp cVI= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="268892557" 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; 28 Jan 2021 15:14:27 +0800 IronPort-SDR: uZmoD8ZVlA6f4mZmX0EXBFGTz7Y+sIke66KL/fotBPNdza5wdNyy8VS2lsGs7C8B8NfmybORKS YrcWRdCwkRmb3dain/UlYaWpCFmhtckp89V3+i/IQ31yT7lA/qMuYdMiGDad3SPC7xNHJHPL4w yfVFk9vIWc086aVEqGhQaZNJkiKjTXYiz5UWL70/nUUle06U7KhFa3pQvNohH12MCXHqEL7zJU Z3tRsdKYJP/vK1rbE7A/8X3FkglLJED/AsxbREF635kihFmJp4dgrQi6CilLzGDVWnnXKNkzzp kCmrBUpak1W+QNAmypDPaqB8 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; 27 Jan 2021 22:56:44 -0800 IronPort-SDR: 8zWpKV1GG73An1zpnhB0A6RHwKcvj53Vuxf9sCqOuA5ZBa5rmYze0QOVvU8HXRv/G7xpZnMIM1 owK+1cH03BzVuf34Vf4nPTxb3MJRxKHU7MPVsfYKBvoE5U6OUm3WvlKRFiuZT6me2l9YBpl9Dw srBAVfHgvdy6RitQaBWTWMkJB+swHKrWKKu/bnpunnMHs5/vTt80z06ovpDFKB7vDmFytTZ38T a/jEmxYBTtNgI1MsJxovm0Lez6j5sfQFarO3Hedm9NgwCWDpXDWzTcx88c/FgbEiOtdVVLfaVV avQ= 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; 27 Jan 2021 23:14:26 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:18 -0800 Message-Id: <20210128071133.60335-20-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.141.245 X-ServerName: esa1.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=593 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=194 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 19/34] fs/jfs/jfs_logmgr.c: use bio_new in lbmRead 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_logmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 9330eff210e0..4481f3e33a3f 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -1979,17 +1979,14 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp) bp->l_flag |= lbmREAD; - bio = bio_alloc(GFP_NOFS, 1); - - bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9); - bio_set_dev(bio, log->bdev); + bio = bio_new(log->bdev, bp->l_blkno << (log->l2bsize - 9), + REQ_OP_READ, 0, 1, GFP_NOFS); bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset); BUG_ON(bio->bi_iter.bi_size != LOGPSIZE); bio->bi_end_io = lbmIODone; bio->bi_private = bp; - bio->bi_opf = REQ_OP_READ; /*check if journaling to disk has been disabled*/ if (log->no_integrity) { bio->bi_iter.bi_size = 0; From patchwork Thu Jan 28 07:11:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052933 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 91C6AC433DB for ; Thu, 28 Jan 2021 08:12:03 +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 1BFE060C41 for ; Thu, 28 Jan 2021 08:12:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BFE060C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S89ES6139043; Thu, 28 Jan 2021 08:12:01 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brktrs0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:01 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8BogX106966; Thu, 28 Jan 2021 08:12:00 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq33c-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:00 +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 1l51hu-0003Us-Fc; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Vj-0002k3-Od for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:35 -0800 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 10S70Fhg012178 for ; Thu, 28 Jan 2021 07:14:35 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvsbb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:35 +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 10S74X7L040813 for ; Thu, 28 Jan 2021 07:14:34 GMT Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by userp2030.oracle.com with ESMTP id 36bqd38xf8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:34 +0000 IronPort-SDR: ElHXs4ZHJ/B44zJAR5JHH4zSvjuhbhU1w3YheplzF8D3+IaMMbZYeyzmgDpqpURexiGFqfLTBf GIBLde0IyCJ7tHd0uLGPzmQLB7q1qkUL5PMM+ntxKH5thi1PmYY5b6w0OSLYDFMEgkQAqtXFFH p6pPfNw0cszTOBIjauYHi3rcbz7+CSkvpebzC6TnEffiJh4FiJcjyMUrnst3Adnc5Np7Nbhg4V y790QNPW7dV73LhTPDHrBwBsVxIPOXtw6BFG9m03XlHe3DheOB4tat7Dn1J7YjqEBjeRewPJeY xvg= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158517437" 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; 28 Jan 2021 15:14:33 +0800 IronPort-SDR: bacopGsUVUMiLAZlIwRKVUvHiQD7fwo3VTgC2CgoQH6wuyISrr8kFhMlOlZO8/W+s4++zDdO/I gBZAVbgZdvZuy13dirIOzCX8OgC3F0xPnwcPFFgEwDei2M3XyiGFphud8XvfvwtTc/h457qCLz mqpjgV5aa5eHUl78WFGdRqzCMcstBUfVw6f+Yvxh+CsDfbiQ3HR18B0srp3nw/tnosptTzllTQ FqihkSywpaTU4PeKTufoeqHPDrxw06YGq4wQvdINcgth5m7N6sEVpTYG7wXzgWDkeKM9pu2912 Zj0b/YahWOJJVq3P7V6KvpgN 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; 27 Jan 2021 22:56:51 -0800 IronPort-SDR: hgdemKPG/3HHgXRADNUaRfIeto8NmW8LEHR468JLI5qNdwJ9I/Vz7EOVIHe6ux2OR8aMkXbCb+ hHmOp4ZL4+H3N5KG2012DyI6S+0eAji83o59kSvMRJsf1lkWorl0McE4AqjKkZANcW6TxQu0db Rg6QKY68t8KKdoDxgIWM8St6Q8n+pLj6fbsJ1LpjtPi/SVOVdnUNhjzT9HNr2ak6ECZBXsF3YT a/oz2zpRpm0NjKofMt8jO2sCHWsfpktQx0L5tGvTxbU6SR20ACdGgmG00/Fl2WObQ2KsI7nqdc S2A= 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; 27 Jan 2021 23:14:33 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:19 -0800 Message-Id: <20210128071133.60335-21-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.42 X-ServerName: esa4.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=575 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=194 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 20/34] fs/jfs/jfs_logmgr.c: use bio_new in lbmStartIO 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_logmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 4481f3e33a3f..bb25737d52f6 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -2121,16 +2121,14 @@ static void lbmStartIO(struct lbuf * bp) jfs_info("lbmStartIO"); - bio = bio_alloc(GFP_NOFS, 1); - bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9); - bio_set_dev(bio, log->bdev); + bio = bio_new(log->bdev, bp->l_blkno << (log->l2bsize - 9), + REQ_OP_WRITE | REQ_SYNC, 0, 1, GFP_NOFS); bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset); BUG_ON(bio->bi_iter.bi_size != LOGPSIZE); bio->bi_end_io = lbmIODone; bio->bi_private = bp; - bio->bi_opf = REQ_OP_WRITE | REQ_SYNC; /* check if journaling to disk has been disabled */ if (log->no_integrity) { From patchwork Thu Jan 28 07:11:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052937 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 F1BFCC433E0 for ; Thu, 28 Jan 2021 08:12:11 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 904EE6146D for ; Thu, 28 Jan 2021 08:12:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 904EE6146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89wJO082727; Thu, 28 Jan 2021 08:12:10 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2uke-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:10 +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 10S8AEqf091599; Thu, 28 Jan 2021 08:12:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy228-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:09 +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 1l51hu-0003VF-IY; Wed, 27 Jan 2021 23:27:10 -0800 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Vr-0002ks-6f for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:43 -0800 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S70e8v177488 for ; Thu, 28 Jan 2021 07:14:43 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserp3020.oracle.com with ESMTP id 368wq195tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:43 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74GdA013959 for ; Thu, 28 Jan 2021 07:14:42 GMT Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by userp2040.oracle.com with ESMTP id 36bpgxhktr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:41 +0000 IronPort-SDR: 69dhT+5Sn0GqPQqnOONggVeTF5HRBn2RcduX9eVfQefkiP3u5kEGikYwoadEwaUuOo+uKS7/rl Cf3bPrtbPPynx9R/R6A91phNGaWFR1hAEKDy+zfFqicgDqLLuSt2zjhnFSRU5lDnsdx9aGEQ4X 0IhNSE5JMOqTHf58kdTOZY0tSd30wGq8MigaB6MeBVWu7QNYSPg9oD3gJvNwkKtUf2SQ6BxcMm /eTxxUQQxPRD6uQTL34X3yvAyFUyVFp1tHttgcrsFbOepLgnlFN2WIEgBnjykOV7kCzK1R0gXc +bM= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262549097" 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; 28 Jan 2021 15:17:15 +0800 IronPort-SDR: RdITMwFExbwn7dLChlHy2dqIaYDqe51UdGLQpG1gRBLtkx+ES716qcNiSt0+F15e8aWU/tkRPa Jfm/KUzuva13CeMsvDtq3wf+9/oILUI3RQ8B2zmiHgALC1H5Uc/fwqwa8dvEC2I437TUYy3r2a 9aWe7BDtK/iLpORXkCvVt/vCFgX4SHNu4caOuwaEEF+BMRMpYN9f96pgxMx+q+pWX5VWJ96Wqj J3k54Cvl3UKDNYKeOsvkF71p9yY434nfT8YBVHAZurOW4/ZvIboTfEa1nWxiiJ0nczsmDqqAFS QarTSOHX9rw8nCMhAHDnce0P 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; 27 Jan 2021 22:56:58 -0800 IronPort-SDR: AZlMO6gj0EkPLCOgk+c5DT4WNDhjCfw45MtadZ5/GiFEmQsvwhsbRFXpLpdTLbQmQEemYM6EDm tOJGHTOsUuwCnKWQp1EvZsc2vVv2mGBlVwctpi8EDm1Wy6X1cWP44qswXm3cNGjgKR2lWgrabH PKyOztqBt3vFXNBi+4zXssLa4rCI5pehsTeRPvX3Q8KhjR216EOs3fiNJCh3n7IcfWfe8KNrrp msksZa1Bq+VYcOk7PDniLMLHnLtDMI1z0ihKaVt3jNoNuACs7lGXhymeE4zWEV78rp7w4D786X hJ8= 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; 27 Jan 2021 23:14:40 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:20 -0800 Message-Id: <20210128071133.60335-22-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.143.124 X-ServerName: esa2.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=194 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=512 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 21/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_writepage 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_metapage.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 176580f54af9..3fa09d9a0b94 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -416,12 +416,11 @@ static int metapage_writepage(struct page *page, struct writeback_control *wbc) } len = min(xlen, (int)JFS_SBI(inode->i_sb)->nbperpage); - bio = bio_alloc(GFP_NOFS, 1); - bio_set_dev(bio, inode->i_sb->s_bdev); - bio->bi_iter.bi_sector = pblock << (inode->i_blkbits - 9); + bio = bio_new(inode->i_sb->s_bdev, + pblock << (inode->i_blkbits - 9), REQ_OP_WRITE, + 0, 1, GFP_NOFS); bio->bi_end_io = metapage_write_end_io; bio->bi_private = page; - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); /* Don't call bio_add_page yet, we may add to this vec */ bio_offset = offset; From patchwork Thu Jan 28 07:11:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052935 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 910D4C433E0 for ; Thu, 28 Jan 2021 08:12:04 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 1C06760C41 for ; Thu, 28 Jan 2021 08:12:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C06760C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89Iwd189332; Thu, 28 Jan 2021 08:12:03 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 3689aau11r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:02 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8Boxu107025; Thu, 28 Jan 2021 08:12:02 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq346-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:01 +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 1l51hu-0003Vt-Kh; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Vy-0002lk-1x for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:14:50 -0800 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 10S70Hj3012686 for ; Thu, 28 Jan 2021 07:14:49 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3030.oracle.com with ESMTP id 368wqyvsmh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:14:49 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74GK2013965 for ; Thu, 28 Jan 2021 07:14:49 GMT Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by userp2040.oracle.com with ESMTP id 36bpgxhkva-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:14:49 +0000 IronPort-SDR: BJmLMncQnTZmLXRwf1+vDLe2myANw9eGDyWwHRrZNCawAiAIqExfWqjKeQ3A10hI8JZIeU2RW1 K4bgDY8wAYTipMT2IAg5I2jvNOzNEK/kzqeaumNOYjLR/GF8kR0bUTdOGBIJgEYwrHp308F9/r rLqEAKJTa6+gdFby7tlwpDUih3RGX0IDOn7gR8f8PivLNksS5tTHRTd4wUe1fh5HJPs4XIo2oy b70ibShoqV+5SJWvaHwFZKyHH3iTmgxyUxKCLV8DxDsWLg6k8Q+ifivXoqFtwBkTJOeQuUnz46 0BY= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="268892585" 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; 28 Jan 2021 15:14:47 +0800 IronPort-SDR: LpRfRqc2UKbBRu3PHeiP13z9xA+j0irx257ufoGFOBmmAn+EVTOL8DqeulTJJDDSi1QUbnawYm 7Uo6QeJqQJcCQgBwqsLQqa0+vZ+YNJRYOaTKgN4AUZPcMi0AP6JejYmG4l0vU/GDHzw7CZc1Lt 0wYSIy7mRLzM76kI31wqd1OXn/vikSEYtcL4RVEKXy4ZbbY26VOzCNyyVQzsBDzIffpUuVFlaq HDcfk7kQ3RNG7SC+AX4a4Lyarok/NioV3bujLRPY5PbU1jOIqYzKeCClI+oHbCohImSuNXc1qO zUjdlxc7n9zms91wGnnQDMdH 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; 27 Jan 2021 22:57:05 -0800 IronPort-SDR: /NPjYa5/vzKcQxwITziayqgew/xym2P+2wPZ/H6tqOBM0Xhb9g154b50VotcIn3s/gPeO6yJQj jaDu5T7BNEIYITi6TAhnovFoYzPUstLQt0EGdLi5t/kGP6Y/bNfbV9+olcDvctAzlPCNttcR2B XcI2j3jvNIAhA1FsWohm0Q1E2hEvaC5Uto6Y7wmXZKJ1CZQCBzspE+8o3ZgyvyjFSagVsi+kvR d3gH64xpw3ry94057Mia9wtqUGJtdB9qbq+w9vxtVohjFozpBIeHLdl7QNCYcftS3gwSjr5dcQ UPU= 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; 27 Jan 2021 23:14:47 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:21 -0800 Message-Id: <20210128071133.60335-23-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.141.245 X-ServerName: esa1.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=154 phishscore=0 spamscore=0 clxscore=218 mlxlogscore=611 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 22/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_readpage 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_metapage.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 3fa09d9a0b94..c7be3a2773bf 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -495,13 +495,11 @@ static int metapage_readpage(struct file *fp, struct page *page) if (bio) submit_bio(bio); - bio = bio_alloc(GFP_NOFS, 1); - bio_set_dev(bio, inode->i_sb->s_bdev); - bio->bi_iter.bi_sector = - pblock << (inode->i_blkbits - 9); + bio = bio_new(inode->i_sb->s_bdev, + pblock << (inode->i_blkbits - 9), + REQ_OP_READ, 0, 1, GFP_NOFS); bio->bi_end_io = metapage_read_end_io; bio->bi_private = page; - bio_set_op_attrs(bio, REQ_OP_READ, 0); len = xlen << inode->i_blkbits; offset = block_offset << inode->i_blkbits; if (bio_add_page(bio, page, len, offset) < len) From patchwork Thu Jan 28 07:11:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052945 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 4FFDDC433DB for ; Thu, 28 Jan 2021 08:12:27 +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 CC6126146D for ; Thu, 28 Jan 2021 08:12:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC6126146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S88vdF138941; Thu, 28 Jan 2021 08:12:25 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brktrtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:25 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8BnYv106951; Thu, 28 Jan 2021 08:12:24 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq3qx-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:24 +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 1l51hu-0003Wt-QX; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51WN-0002nl-68 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:15 -0800 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 10S70Fi6012178 for ; Thu, 28 Jan 2021 07:15:14 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvt81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:14 +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 10S74Jid040504 for ; Thu, 28 Jan 2021 07:15:14 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2030.oracle.com with ESMTP id 36bqd38xp5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:14 +0000 IronPort-SDR: WtxgnJiem5q3Vwv4xxtORispM+10DdTVEcJnfHreSQS7I5/taHrIE7a/z8R4IWgmikVVztAbd7 jf9eENP1fLrMbtM6K86K8A7I7vLSQ/V31MSRrakZUfMc0jD8ZeAI3b/ejSSslNCTXs0m8TwbcE W2UNVCVjvzC3TFU5aQKTrZJ3O5bGQ6lJB9CgJtJ6m+dmHKGsRuR2O6A1gH0WHybR/Hnm12N+dp Bxh4WzD0lL77BYBjO7c9fHUMUjU1sCztOJVj+1EZMELP3KeCONXOokoDRaCADoMEgz28ouFuF+ Hp8= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963392" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:14:54 +0800 IronPort-SDR: ibO+fuXEkqSWSzWO7SSStnMeJ8pkKlvXlD3Uiz37LG4OK4XGWRH/3gRPtU6jSAjcKsp5z2OwUl m48OwdydkpcLYW2MAxtnYZ+K531eTf11yUydorbRGyRG6XjCvbgMTN6w4Ab/l+J4iEkXaHtC7p I7tUcfPccI0vWV8Cdf2HtRBlxzgU+PrXSmcj0NPoVvXM+NcyUN+0K5jTQzAHk+TTLTXkXI70Qq Umc70l+nYRUx6rxNGy77F0M96Lj5lvy00tIoDadFmchnijy516Epr9xAkqX9w5e5zRoPvoM/dW hsfU/BqSsBq+ENLTQWLA4CIS 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; 27 Jan 2021 22:57:12 -0800 IronPort-SDR: m1TZ+g0HqYnNuuEaVgIMmloDXGiOQeWVkBatefSwdP931h6/Qc9uK8rnz+JHWAn0f3QBmOsUC2 fXJ41UlgQQnfdBQndrwCq+hQtl7mr6AQW85+ZjLVP2rPUrLfDej915AJE+NjNtCGI740sa3D8g UGQ9bx3fpoJbY98zSPHF13CT5IYtiyfyvVxvvVA5VfTuNLKWU4ZEgYs5jdqkUbRYa6sajX3DSU E+nFYRIRokBPoO+x05JGw6lqTR47HYfSK6LYXKwXfQUKv6zaLN0igntqoauBJYDwbicxGnznwF roE= 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; 27 Jan 2021 23:14:54 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:22 -0800 Message-Id: <20210128071133.60335-24-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=592 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=148 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 23/34] fs/mpage.c: use bio_new mpage_alloc 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/mpage.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index 830e6cc2a9e7..01725126e81f 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -68,25 +68,21 @@ static struct bio *mpage_bio_submit(int op, int op_flags, struct bio *bio) } static struct bio * -mpage_alloc(struct block_device *bdev, - sector_t first_sector, int nr_vecs, - gfp_t gfp_flags) +mpage_alloc(struct block_device *bdev, sector_t first_sector, int nr_vecs, + gfp_t gfp_flags) { struct bio *bio; /* Restrict the given (page cache) mask for slab allocations */ gfp_flags &= GFP_KERNEL; - bio = bio_alloc(gfp_flags, nr_vecs); + bio = bio_new(bdev, first_sector, 0, 0, nr_vecs, gfp_flags); if (bio == NULL && (current->flags & PF_MEMALLOC)) { while (!bio && (nr_vecs /= 2)) - bio = bio_alloc(gfp_flags, nr_vecs); + bio = bio_new(bdev, first_sector, 0, 0, nr_vecs, + gfp_flags); } - if (bio) { - bio_set_dev(bio, bdev); - bio->bi_iter.bi_sector = first_sector; - } return bio; } @@ -304,9 +300,7 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args) goto out; } args->bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), - min_t(int, args->nr_pages, - BIO_MAX_PAGES), - gfp); + args->nr_pages, gfp); if (args->bio == NULL) goto confused; } From patchwork Thu Jan 28 07:11:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052941 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 A1E5DC433E6 for ; Thu, 28 Jan 2021 08:12:19 +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 13AE76146D for ; Thu, 28 Jan 2021 08:12:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13AE76146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S89SWQ139101; Thu, 28 Jan 2021 08:12:18 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktrsw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:17 +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 10S8AGiR091994; Thu, 28 Jan 2021 08:12:17 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy28b-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:16 +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 1l51hu-0003WN-NV; Wed, 27 Jan 2021 23:27:10 -0800 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51WC-0002ms-KT for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:04 -0800 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S70cSH177277 for ; Thu, 28 Jan 2021 07:15:04 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserp3020.oracle.com with ESMTP id 368wq1969t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:04 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74GK3013965 for ; Thu, 28 Jan 2021 07:15:03 GMT Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by userp2040.oracle.com with ESMTP id 36bpgxhkxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:03 +0000 IronPort-SDR: bZTQ60xXVi9shjR8tFKfVgt+qUs9xfzBOsl/OhUZaB7n77wUnzyd3jdr/0Mu4Uc+pCevYfynWu IOkUOhbVTTrRzp7/JWWTZOH02aIISCxmx5oz5COXUkFHtZGvtGH7MkFC1j5TnizSU8DRDFY8DV t1ejA0Cyb1zTQy2DtawTSE7B7W6fkkyPRle2drdRTLorp0As+h9RLiGnRP6u4c9MtkMw9ovTLF M/3IPfe2vlmEHTSyIiHJXYsvSpjWTIe/jVuwV1NlE97m2d5eL90RLdQp5zGRonB+X2xJVPJ/2f RZU= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="159693974" 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; 28 Jan 2021 15:15:02 +0800 IronPort-SDR: 3sG528Z5e5YqIB5wLeI9sEsYU66ddyvzuXikaexPbPCTrgJGYcSdYZ8kLtbJ0/NhQ6h+e4/8+/ OcpmXaKZ1nfg1Tl/lSxmBHyTNJFA0IgWaOfWJ67iiVo0V5UQ7+NaevxCqdnDwU9/kMJFW0lrgi oDzBmdmfNexEGkBCFo3TBXYThQJynyQ8GuhN4smbhEEC3yrZbvZ702kXJffFdyLt+NOUZ/7s05 7tZs/2xUKZ3Omt1BRsT7EIkbgwQQ7z+HnBp4y4YwPx8MLSCIPMVcKW4+YnCzF5WturPPNoOgLD 9O6qwfY1neRzJSS5tGLuFeau 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; 27 Jan 2021 22:57:20 -0800 IronPort-SDR: RvbuIrKpOmmqZ+oQPbnvg4P9b6yDctCj11PDSHseFUe3NzGe7aNswGzNT7aYrNNymGc7RRLBwA EyS5TC5ya2f1DBzchV289rrRJN4G30R6UcKQHWHLCT1EqyVYm8BdK2p8B74xj927ubYpSXJJYX yqNCzY6cgWt8a45E/OUvNDiMBg+lmhS8FA2ZqgTfl/62S3ZiS0x0JS7q7oikS9hfGQV2kW1Mb+ vR4fnDhlmPbHKapqq2eTmDAeG1Ipck513pFwPBeDtMk5IkG3qgl83KvWp5povuzxSWxrnJjDon 5kw= 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; 27 Jan 2021 23:15:02 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:23 -0800 Message-Id: <20210128071133.60335-25-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.45 X-ServerName: esa6.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=219 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=703 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 24/34] fs/nilfs: use bio_new nilfs_alloc_seg_bio 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/nilfs2/segbuf.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 1e75417bfe6e..df352cab7a93 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c @@ -383,15 +383,9 @@ static int nilfs_segbuf_submit_bio(struct nilfs_segment_buffer *segbuf, static struct bio *nilfs_alloc_seg_bio(struct the_nilfs *nilfs, sector_t start, int nr_vecs) { - struct bio *bio; + sector_t sect = start << (nilfs->ns_blocksize_bits - 9); - bio = bio_alloc(GFP_NOIO, nr_vecs); - if (likely(bio)) { - bio_set_dev(bio, nilfs->ns_bdev); - bio->bi_iter.bi_sector = - start << (nilfs->ns_blocksize_bits - 9); - } - return bio; + return bio_new(nilfs->ns_bdev, sect, 0, 0, nr_vecs, GFP_NOIO); } static void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *segbuf, From patchwork Thu Jan 28 07:11:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052939 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 D7C60C433E0 for ; Thu, 28 Jan 2021 08:12:16 +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 6480864DA1 for ; Thu, 28 Jan 2021 08:12:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6480864DA1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S88csZ138644; Thu, 28 Jan 2021 08:12:15 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 368brktrsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:15 +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 10S8AEht091621; Thu, 28 Jan 2021 08:12:14 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy253-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:14 +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 1l51hu-0003XO-Sr; Wed, 27 Jan 2021 23:27:10 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51WO-0002o0-3t for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:16 -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 10S71ANn050202 for ; Thu, 28 Jan 2021 07:15:16 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq97ff-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:16 +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 10S74Jie040504 for ; Thu, 28 Jan 2021 07:15:14 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2030.oracle.com with ESMTP id 36bqd38xp5-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:14 +0000 IronPort-SDR: 3/K6iyB9DaYu6XdNG7bRSqyoIRWPa1ZPBOvoeTleU0gyTCcfdPDh731ZUGWjn26i3JjqFBAtTA Lal9MR4RLKS3Vrf0otlbraWdCHyJ/7/48c48T3gIG6bAtViy4uNZXsAGCJrCzrT6gNBkV/7z0C UPbfT0++tXPFFdEKneNTFudoo5STaobHPDQ93bF/rEN2aHWQWVD2ZeFlBeg7lh+xfow40YpxCR IfJEab3735m4jmBZ/PgXz3dRm1vkhLV//aV3xy9OfuXknap9Np7K3x8n4ozFv28CaHH0RuuIRN 3Bo= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963423" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:08 +0800 IronPort-SDR: hKuv8r5Xo33O70J/TaL2c+wvSM5rjmJrPiR+MzwgTZiUZNmXhwtfFX6FZ1hTFabmuibiZgkdxv lZ2gafyuufcY2URQktUPT1+MzSx2HEnZWwAQpDO7/l4x9ncrJwDGWxf+YUE2NVrbLonkddKTQC HwhKChEtry9p8zi3S3XLSnNVEeBDqsdmNBTNB3GQdA6G5t7ijhNwNuaAduMY6OQoSP5W/oPCjG 5T9kuhXEq8CKjI0vQMrbAizs6IdhjqcHZfDV6X+HIDFyCC+HkUQamWbsqOArCqbhDRec/hNoyq RSxNYhNjVsHLKcxarnnsdj+6 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:59:28 -0800 IronPort-SDR: +1TgXZ9HjoaS+86zh+aLwx6S7ZpAYQ4FpPhwS5t1uQfka+31mML1LQsLKCwFYYGr030vY+BCmC AGfrPosPVl95WjEssU5DCDJZAyR1khEX1jpqrqTT8P7u968xhLua2/lVUN5jQ7ABVZJAwAp2MY 3XKOPyoMsT52VNuagfol6rCenkg2OIsIErUkF58mfwGPLsAlDeR+kVK0eqUX532NsUF4ctVre4 Iqd0vyO+udw10x//vZBdiK4usAo9yvQxvOxxYG203IoYDBmyGC3oa9VGSQBs+2yVysQ7ZPCJPH kDc= 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; 27 Jan 2021 23:15:08 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:24 -0800 Message-Id: <20210128071133.60335-26-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=868 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=219 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 25/34] ocfs/cluster: use bio_new in dm-log-writes 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/ocfs2/cluster/heartbeat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 0179a73a3fa2..b34518036446 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -515,12 +515,13 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, unsigned int cs = *current_slot; struct bio *bio; struct page *page; + sector_t sect = (reg->hr_start_block + cs) << (bits - 9); /* Testing has shown this allocation to take long enough under * GFP_KERNEL that the local node can get fenced. It would be * nicest if we could pre-allocate these bios and avoid this * all together. */ - bio = bio_alloc(GFP_ATOMIC, 16); + bio = bio_new(reg->hr_bdev, sect, op, op_flags, 16, GFP_ATOMIC); if (!bio) { mlog(ML_ERROR, "Could not alloc slots BIO!\n"); bio = ERR_PTR(-ENOMEM); @@ -528,11 +529,8 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, } /* Must put everything in 512 byte sectors for the bio... */ - bio->bi_iter.bi_sector = (reg->hr_start_block + cs) << (bits - 9); - bio_set_dev(bio, reg->hr_bdev); bio->bi_private = wc; bio->bi_end_io = o2hb_bio_end_io; - bio_set_op_attrs(bio, op, op_flags); vec_start = (cs << bits) % PAGE_SIZE; while(cs < max_slots) { From patchwork Thu Jan 28 07:11:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052943 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 93106C433E0 for ; Thu, 28 Jan 2021 08:12:21 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 1C3B860C41 for ; Thu, 28 Jan 2021 08:12:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C3B860C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89uWI082671; Thu, 28 Jan 2021 08:12:20 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7r2umc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:12:20 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8BnDg106946; Thu, 28 Jan 2021 08:12:19 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq3m7-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:12:19 +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 1l51hu-0003Xt-VG; Wed, 27 Jan 2021 23:27:10 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51WQ-0002oS-Pj for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:18 -0800 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 10S70GAY012625 for ; Thu, 28 Jan 2021 07:15:18 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3030.oracle.com with ESMTP id 368wqyvtad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:18 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74JBn014019 for ; Thu, 28 Jan 2021 07:15:18 GMT Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by userp2040.oracle.com with ESMTP id 36bpgxhm1a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:17 +0000 IronPort-SDR: Aj2YOLDOoeKg9MRlEBRKg68gbVlvVf3MfB2TIvNvzM0ZznnzZa9aHCpwzbm9NVburSCEsD7rpo NTeH/hIO0AuO7bR9PUPCL2jNfTh7InHEVc8LD0iF7/TK6/6fsltB3vxD7f4mAGWM5svinhZzER LL+mr3PWOOixnS7hHMqoNJeQRMo7ed2Q64DxwwZOF7WQq/LSnk7XCkY4jeoeVkQ5XtHkbdK/+l REOkke17QeGaUlYNTMjuBTxx1FqvoPc0w22F1yKblZB+QOJRVpW5tKbEoCqFuGwnCyv+wGAMHf zNA= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="159693996" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:16 +0800 IronPort-SDR: /0uQaxDQbpSeqWVd3Q9fpz9GFFZQwE5qUVfBlsu1fKrWQ6iVIJl7SRg2pxn94BJZjIPr/pdYFS gHaFtyb2Wi6voyWXuggY5MHKhN6NTsX05JqjTBS5ksioTs7IFsTsHknbMKzAmkN3SEAnU5wJIY g07QUtXS+hj9uMPvhR25sWUY2bvKxnSnjRxf9QePrCPt2Bczizigq5V9ws5Ed2MC69ydYFFd51 leB6z3N8HLUfeb1ffVOgqt/X2Xz+GTsjB0qqy+vLK6NPqiXnLQHq7VaLdLx+xri6ycLouB4ge1 CLt5d48QD6HA10WW2Pe7BZbm Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:59:36 -0800 IronPort-SDR: VKPK85FFDQ0ubYH9k6Rw6wieHrPcfl4K1hBg1VEjOVVMtv+Wn9OrY3VfBreYbEOSh7D7aOPUjq dJWJ6VlQs6sIYpC3Ssc6YP0uwWxx1b9TT9J1h3Z9GJWPAkbpd7nwyEHzf2X7DKDqvOlXI3kZN0 S1wmdVHTrX+2YjnNZtTeKY+gTEIX2ZCvjrzBqJLi0bsvbsghiV571IsEQgaSLG4TZiYK5W8fXC DCDkO56zOq766cZD9jubbH+fYuelJGqJtYeO7naSGnNxMZmGQNaOGjq3DEnkrTfIYty+jvU6Mh VMc= 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; 27 Jan 2021 23:15:16 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:25 -0800 Message-Id: <20210128071133.60335-27-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.45 X-ServerName: esa6.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=219 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=597 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 26/34] xfs: use bio_new in xfs_rw_bdev 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_bio_io.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/xfs/xfs_bio_io.c b/fs/xfs/xfs_bio_io.c index e2148f2d5d6b..e4644f22ebe6 100644 --- a/fs/xfs/xfs_bio_io.c +++ b/fs/xfs/xfs_bio_io.c @@ -26,11 +26,8 @@ xfs_rw_bdev( if (is_vmalloc && op == REQ_OP_WRITE) flush_kernel_vmap_range(data, count); - bio = bio_alloc(GFP_KERNEL, bio_max_vecs(left)); - bio_set_dev(bio, bdev); - bio->bi_iter.bi_sector = sector; - bio->bi_opf = op | REQ_META | REQ_SYNC; - + bio = bio_new(bdev, sector, op, REQ_META | REQ_SYNC, bio_max_vecs(left), + GFP_KERNEL); do { struct page *page = kmem_to_page(data); unsigned int off = offset_in_page(data); From patchwork Thu Jan 28 07:11:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052967 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 7A218C433E6 for ; Thu, 28 Jan 2021 08:15:21 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (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 0EAAA60C41 for ; Thu, 28 Jan 2021 08:15:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EAAA60C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89efi189495; Thu, 28 Jan 2021 08:15:20 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 3689aau1e9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:15:19 +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 10S8AFfX091720; Thu, 28 Jan 2021 08:13:19 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy3wa-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:18 +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 1l51hv-0003YO-1O; Wed, 27 Jan 2021 23:27:11 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51WY-0002pu-FJ for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:26 -0800 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 10S70E39012109 for ; Thu, 28 Jan 2021 07:15:26 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvtgd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:26 +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 10S74PCv040689 for ; Thu, 28 Jan 2021 07:15:25 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2030.oracle.com with ESMTP id 36bqd38xrq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:25 +0000 IronPort-SDR: 1soGr0XGmGqXp4hVaEFVHxt/XvNP/bksyqFDRAyfbIuAe8AXN0I33E4ettxwkcyvbHkAqJoBEw kA3DVKHXWTvJYeYQz91w2SNa7lxXxzZ5GKPdqd6OuwE8gS8yyQqwPj7HkrQ3eywFirWvLa8tHx tDjSMDJ6YeeOXqmZiFhXSLRaKp7yzrkBdT+R2Z6FUFlczcgT0UcbT1KiepqY+CLTDzUnnCZl7R T4VgazYnY+/D/qHF55rP2L9tJwT8iH03y74IaCtxqMn81QxcPmVTgwSvREfBMYyarfZT0gwkZJ HfI= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963449" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:24 +0800 IronPort-SDR: LvEKaKNMYXSyKPQ+PU16zj9cVPUZ3Sj9BrIVdLI0QqXo9S1i9WegNXYKSXYADXy9xDG/dJODDc A63eXPAfKpuXt33DxEMcREwVJyqZpNA7eGExoGTs4vP8STlDkbFUaBHJUgcr8rM2y9C38AWKnl FMgchf5vSVBnbLRBKdKzX+TsikvKXAwyK1g/VpxrPsZsr8NBL5JUAETtPMZ+dXZBZo2UPXmRRn kuVEkGJ2mIxgEtFHis9U9IDH3n8zqQZuSCFs0Co31yeDgFc6G+lc5m/FdCqCtJRT/YTu2ShkH8 uYv7H0RVlvQgVcTm0qPIqwQd Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:59:44 -0800 IronPort-SDR: AdKYJH34AY4CiVzOXrR15FurWGZi/qDC6z/alYko7jfVcX/SfFhaxUFqHY45DLkP4HiXq60mY4 qy4n2aJHjpVtmV4fSh3ShuNif1qvectRI2b9x90Cd2PVCzWhg42ZluTJX4mv+bwQtY61xYcAp/ v9bG8JoB/eY2HEcD52Jlws++S0SYBgnZiIiDuQlpbjK+vhOG1JlBdY+QSI5Hl4fkjAcjiES8aY m35tunBPrJVbQ/UTOrTX0lDDjwM/GyWBlapp84/HLby91yE2yFuR9fqy9YimXKC2AojA6XdL7Z KBU= 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; 27 Jan 2021 23:15:24 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:26 -0800 Message-Id: <20210128071133.60335-28-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=218 mlxlogscore=524 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=198 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 27/34] xfs: use bio_new in xfs_buf_ioapply_map 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_buf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index f8400bbd6473..3ff6235e4f94 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1507,12 +1507,10 @@ xfs_buf_ioapply_map( atomic_inc(&bp->b_io_remaining); nr_pages = min(total_nr_pages, BIO_MAX_PAGES); - bio = bio_alloc(GFP_NOIO, nr_pages); - bio_set_dev(bio, bp->b_target->bt_bdev); - bio->bi_iter.bi_sector = sector; + bio = bio_new(bp->b_target->bt_bdev, sector, op, 0, nr_pages, + GFP_NOIO); bio->bi_end_io = xfs_buf_bio_end_io; bio->bi_private = bp; - bio->bi_opf = op; for (; size && nr_pages; nr_pages--, page_index++) { int rbytes, nbytes = PAGE_SIZE - offset; From patchwork Thu Jan 28 07:11:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052949 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 1971CC433E0 for ; Thu, 28 Jan 2021 08:13:02 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 9C85A60C41 for ; Thu, 28 Jan 2021 08:13:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C85A60C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89tE8082665; Thu, 28 Jan 2021 08:13:00 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7r2uqe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:00 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8BnHU106872; Thu, 28 Jan 2021 08:13:00 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq4qq-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:00 +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 1l51hv-0003Yt-3W; Wed, 27 Jan 2021 23:27:11 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Wg-0002qk-It for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:34 -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 10S71BOi050431 for ; Thu, 28 Jan 2021 07:15:34 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserp3030.oracle.com with ESMTP id 368wcq97tw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:34 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74Jk4014006 for ; Thu, 28 Jan 2021 07:15:33 GMT Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by userp2040.oracle.com with ESMTP id 36bpgxhm4f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:33 +0000 IronPort-SDR: R9ELSnTv72d3rlEVjyANJbQorkP92s8Chm7cSEwZCatN7C+infgYPuvsp0TPKc8EjWaAHb19Cn SNSc8xNJJUPexVvZbMqVp0h2yIPsE1gikLM3YbfhKxoRj/QUxqMxeUI3dVEdMSrZzJPkL3BE+w TEv7Y2XWfliZ9t6hj1jLuFhEhfHRh3hQZxAXzSELyMrRYSVQGBAd02JYV0XYPOQ72naSdbrDNY +pW9GzAXslOUHL4OuAcPgma4A5ZMqxR2CnqmP3tTEL/9z/Bw7eTez//9dv8ao5QKZUXFnPsjnS iEo= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262549190" 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; 28 Jan 2021 15:18:33 +0800 IronPort-SDR: 34bG9dplK/X+B0isxxLMYhCN9Yy7xCPJlp0AFh2K5Yl3LsMg4PH6OJpOqOv3k9jvflev7tkMed AhFVaKJNQiJwrTVp3dlMdvvbMvszjLgHCkzJEM/zgWiAL070FYrWdAmA2DRjsLzk0vVY9xZsTV 4KmJH6CEuDrd/FPOnMaAApAoS5c8jmAbchT3awuPCMvx66MpArT+3KcZn/NhJhLkenXWnpwi5r ykFhKOKfafv37UZiADK2+ZYhmk0Hi4c6CXrYPauh5uhWwNlyee6knz40ff/9AY6w375USUGEKx zjCNQfdiFSN4xGWk9GgQIgVW 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; 27 Jan 2021 22:57:50 -0800 IronPort-SDR: m+UU9TJBIXCvSyFz/7O2vaYmlOCexk8ewW0e2kOKkWSuwpQEVFGI+DHENO7Q1Bf8IQzN352Mi5 5dDETfg3/zd0aL0yHDjcbUD/eS6byN5dveWHS0JlUn01j5YdJYnuzvRhCyGEwEvsPLeiwlo6h7 h47UPjLb7UDOPAPFC4EqcqtJYlkeHUwpVqBF6C8WUdWbiBbzIaj0jcLgB21R8kA1PJHycwAnr3 51c0CVR8EMmKQ6pEvymjZcIoINYcADZvl3xn96JSQjk6KW59eeMqwpBFLuZiCrCp4Zkdz1bD1j kZU= 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; 27 Jan 2021 23:15:32 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:27 -0800 Message-Id: <20210128071133.60335-29-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.143.124 X-ServerName: esa2.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=219 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=528 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 28/34] zonefs: use bio_new 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/zonefs/super.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index ab68e27bb322..620d67965a22 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -661,6 +661,7 @@ static const struct iomap_dio_ops zonefs_write_dio_ops = { static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from) { + unsigned int op = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE; struct inode *inode = file_inode(iocb->ki_filp); struct zonefs_inode_info *zi = ZONEFS_I(inode); struct block_device *bdev = inode->i_sb->s_bdev; @@ -678,15 +679,12 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from) if (!nr_pages) return 0; - bio = bio_alloc(GFP_NOFS, nr_pages); + bio = bio_new(bdev, zi->i_zsector, op, 0, GFP_NOFS, nr_pages); if (!bio) return -ENOMEM; - bio_set_dev(bio, bdev); - bio->bi_iter.bi_sector = zi->i_zsector; bio->bi_write_hint = iocb->ki_hint; bio->bi_ioprio = iocb->ki_ioprio; - bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE; if (iocb->ki_flags & IOCB_DSYNC) bio->bi_opf |= REQ_FUA; From patchwork Thu Jan 28 07:11:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052955 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 59FEDC433E0 for ; Thu, 28 Jan 2021 08:13:11 +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 DCE1160C41 for ; Thu, 28 Jan 2021 08:13:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCE1160C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S88fpx138695; Thu, 28 Jan 2021 08:13:09 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brktrwf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:09 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8Bnt7106889; Thu, 28 Jan 2021 08:13:08 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq4wc-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:08 +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 1l51hv-0003ZP-5p; Wed, 27 Jan 2021 23:27:11 -0800 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Wn-0002ra-Mz for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:41 -0800 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S6xmEu017709 for ; Thu, 28 Jan 2021 07:15:41 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 368wjtmr26-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:41 +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 10S74OZW040674 for ; Thu, 28 Jan 2021 07:15:40 GMT Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by userp2030.oracle.com with ESMTP id 36bqd38xu3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:40 +0000 IronPort-SDR: bZCdcy1LgnVC45cR9EUJFuEeeJwm0RTJAxvFjqam0M0sP65SliHMKib1ey0Awj55cAsnGL2GAY ELhGF7Dfq6rJG/unXNyz+fFQibdDHirvvPPdgMVcI/EZ+5qLNuxopsXWs507y6Axch2RRSyBa9 9IwaNEAxlRhCViEkPFEZ78D+u8hWEGC1t3cBWO/d2Ur+jnl0Sjn7vORU1pxg1Qo2YUXqW2Tnk7 KBfJ/FDqInHaHEWnRfPfn0UToJjQb0kTgJ6dKDCUYOT6x3htvK5DHrqFRSi2+zQZO7cpb0GehF pro= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158518433" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:39 +0800 IronPort-SDR: 7gous6jGRGwP2amum/Yv4z1KNcPH/YmaCqtr6O5WHGGzP5noQTGMxmXXWW8/jivJqFuccBijBe VT/G8DLUHtKz2Wgh6Ucl4W56ULEtUwDUpwGXQMGq3nnalsJDjmThHNylnnuSJhPoxRIQ4q6t5M GCKHcHAIL1VZriQ6mLurrcBgUUIFkRlTUr7Xc+UfZ2pf0APi+kW0B1Sfi6rnyb11t6ivVF/dT4 Bl9UpobOi9vHANvI7gg9AzmEw7PoyZdzsZGECCmJhQu/98XwRWa7PDuafmM0dSxowG3wq5PkR2 6oSHLgKGXVDEwuwQu5fPNdnz 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; 27 Jan 2021 22:57:57 -0800 IronPort-SDR: +tiKd6++/IklFSy7iDJaHbayhG5AQMYy46sQaNwq7O80dac1IZ8ZNlxjx4DxYbXvKYV6ua9+Jn RJlpIO7cWN3eoJjRXIKMWDgWPb2hxGv4A2WF6qkOCUmJWGu679NggrholDw0Y/zhUvvPmDPwT6 YMwbiHmVzfz4ihKs4Lc84G8Ml2oUugQkKwA3saHG7RouPgTCEOWIbUjZGA0E7lav6RMiRyuWgb NQVibBmtLzaPM7sNDSYSURpVt5muhPgCfKQdUKPwhH4mY9hUDkI5QyIoSDd8h2S0Ai5kAfU9pn AHM= 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; 27 Jan 2021 23:15:39 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:28 -0800 Message-Id: <20210128071133.60335-30-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.144 X-ServerName: esa5.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=662 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=162 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni --- kernel/power/swap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index c73f2e295167..e92e36c053a6 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -271,13 +271,12 @@ static int hib_submit_io(int op, int op_flags, pgoff_t page_off, void *addr, struct hib_bio_batch *hb) { struct page *page = virt_to_page(addr); + sector_t sect = page_off * (PAGE_SIZE >> 9); struct bio *bio; int error = 0; - bio = bio_alloc(GFP_NOIO | __GFP_HIGH, 1); - bio->bi_iter.bi_sector = page_off * (PAGE_SIZE >> 9); - bio_set_dev(bio, hib_resume_bdev); - bio_set_op_attrs(bio, op, op_flags); + bio = bio_new(hib_resume_bdev, sect, op, op_flags, 1, + GFP_NOIO | __GFP_HIGH); if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) { pr_err("Adding page to bio failed at %llu\n", From patchwork Thu Jan 28 07:11:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052953 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 6AD41C433DB for ; Thu, 28 Jan 2021 08:13:09 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 0340E60C41 for ; Thu, 28 Jan 2021 08:13:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0340E60C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8A5U7082903; Thu, 28 Jan 2021 08:13:08 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2ur3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:08 +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 10S8AGpr091850; Thu, 28 Jan 2021 08:13:07 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy3p7-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:07 +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 1l51hv-0003Zp-8Z; Wed, 27 Jan 2021 23:27:11 -0800 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51Ww-0002sW-P7 for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:50 -0800 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S70cSi177277 for ; Thu, 28 Jan 2021 07:15:50 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserp3020.oracle.com with ESMTP id 368wq19761-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:50 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74JNX014011 for ; Thu, 28 Jan 2021 07:15:49 GMT Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by userp2040.oracle.com with ESMTP id 36bpgxhm7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:49 +0000 IronPort-SDR: q9KE+/xYlANq95N/Nt2eaTREdjEOoLxnia1hvIrRYfuToYzCcsTHy+QJFABuzEtQjwsPYjYLM5 X/YC/b293qwLCTVU6mBzoAeEK5vso9phNBobFpgQMcMDPguQG//5kis4dqT6ebJ59p8qNDp0DU UAd/JhkWPTB+gBrqNxlucsfLleRODrzZxgShq7SNzh+8eIKI0h1AeMBpC9gCWCTwgcLgkC0Ozv ztbE7Rsq0A/rWipEjO6XtDq8QaMNZ/vEkpgzjEPFcT24HAX9mgZZLfNhVshzLZhXYcNjitD1VU 33E= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="162963480" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:48 +0800 IronPort-SDR: ZRRpeehgpObYAv9FLtOn/6G9iljyA12/SItxIVLY1RQx1Syt9LIJfdim5uvCoVcvmmsg1oWaUy YR1scTFBctM7uhmSK4HbFH70pdq+qbHKB8iRUar/D1+mH5/VFDQsQFEbOzSf98B5RUdj5a/ujU iSkn+/4Dpjeoi6Q0LLZBa0kOH9Ln3sVHeXgjZ2eA41QmAItZPmyhQ3ICECsciJrNX6FFjgiksm tE77RWi8xfmWj+1jFYq2UXk0DxJyu8Oy8v0eU4fz2t0Iep5GDljBzpZUyPneduxT+7T90Pccf7 X6ljhRm+Vwe0HnT7sOqfs5DF 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; 27 Jan 2021 22:58:06 -0800 IronPort-SDR: QLHAdyBGhpMGQ+9sBMvXF0omk88B/E7BRqUoQLtstkadK8XTqcLBOvZ/pjpZSQe5Fab6+IJLIs ck58Xl2YqFxcQH934VbGmHAxVZYNpxUZEqIAo35K+cwpiHURts0rCHDJ2TNufJwwd/0szVEfZu V2kbFpOqLyVucrhtvqpRhrkBznCSCkx3a3rZqsYu2xJ2ZrJKihugfXyvxYjD/F6eNL2QYyPhq5 GySOsYgZ6Jfrk4o/qsLABBe1b7+pVB/jDQ0aaMBZEhc+3I3KzSll4D3O/V1q5DDbYD+ht9Zxf5 kSQ= 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; 27 Jan 2021 23:15:48 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:29 -0800 Message-Id: <20210128071133.60335-31-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.141 X-ServerName: esa3.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=162 phishscore=0 spamscore=0 clxscore=233 mlxlogscore=611 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 30/34] hfsplus: use bio_new in hfsplus_submit_bio() 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/hfsplus/wrapper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 0350dc7821bf..8341ee6c9b31 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c @@ -64,10 +64,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector, offset = start & (io_size - 1); sector &= ~((io_size >> HFSPLUS_SECTOR_SHIFT) - 1); - bio = bio_alloc(GFP_NOIO, 1); - bio->bi_iter.bi_sector = sector; - bio_set_dev(bio, sb->s_bdev); - bio_set_op_attrs(bio, op, op_flags); + bio = bio_new(sb->s_bdev, sector, op, op_flags, 1, GFP_NOIO); if (op != WRITE && data) *data = (u8 *)buf + offset; From patchwork Thu Jan 28 07:11:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052959 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 CA08FC433DB for ; Thu, 28 Jan 2021 08:13:37 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 639BD6146D for ; Thu, 28 Jan 2021 08:13:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 639BD6146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89uL3082705; Thu, 28 Jan 2021 08:13:36 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2ush-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:36 +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 10S8AErW091599; Thu, 28 Jan 2021 08:13:35 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy49s-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:35 +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 1l51hv-0003aP-BU; Wed, 27 Jan 2021 23:27:11 -0800 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51X4-0002tO-8A for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:15:58 -0800 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 10S70CZA012063 for ; Thu, 28 Jan 2021 07:15:58 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3030.oracle.com with ESMTP id 368wqyvu37-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:15:57 +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 10S74Lah040557 for ; Thu, 28 Jan 2021 07:15:57 GMT Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by userp2030.oracle.com with ESMTP id 36bqd38xx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:15:57 +0000 IronPort-SDR: nD7waHmJzgaq39J7hYjGtEpItSHO8g0lHtrOubhAYsGcJqsKqx9E6uEyW9hJ633ah1WjGx+C3T KysHWDH8Gfa2uYe7DVV01gZx9dgNI8qz4odOCliaeQgrKSyY/kBRiZ4OfBR8+JLGSbyrklDXe/ ldylrILmhdqYbgczlYq5ZnDveMn5kws+1H7uHncrMkCklReLj7QTxG7iiEXQoPpdnaF118qe8h vIoR5y52wBy1zwMxYbJTkPrBGRhvAAPTgX/18fPcrxS/w8AzipIZgX0SI8if9Jc8fTRTkftAaH mgQ= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="268892714" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:56 +0800 IronPort-SDR: 3rz/Lr8Dr4dNr+2UeMKJIE6g0F1tL/+7XNsSToPNrbbau/fcb0S8YeBUfoiCYRBPu7dQY4uHcU W3U9RPIHjE1e31DEqgSMRI/zGfJQGJzQW2Z4gfbzpESHOthzDeFovfyqbd9KbfVofq4zCE0WkZ vz5yeGdpxdXfIL0AsJv5vgTojEm7HP1i1xpzzVmmN9oEPuOxPsm4Ue1n3MIzYn5N4GtFF3rtKH nW0zVh27ZpZC5XBLYRvRHA+FuJHDUjStcZqaR/yvGZiX2I0Rs80HHO8+Cymz0Qv9lJArgOcoL8 aifwMggFYCOcS2Zyznde33UY Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 23:00:16 -0800 IronPort-SDR: MJghY7CI3VIGR5/IaW1FKfL3TP8YTcGZMlKgwb78Me3B/B/3apRuuzh9zoIBvsafPZo8P1zI7O tvlMLEPWxNEsao+d+OWmeAfzkHQtyrR4CezWVDYJlrvLmf+2864qvNG9WiZqHSu38lUOwqOgWr BwUEJ5wQyzZ3OCyeIORv7uUc6VzLa9ZZ6RiC/IlKAQuXNbiGRl7btRhvnWciISjEw6c6WHvSr7 U7MWRK7LEz7DNkLYA3LIdhi5N4PJW+ftjhgTNZ5eyVeVGIhgT6If8NwOmXnpUTI7IymY6dp08v 5GE= 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; 27 Jan 2021 23:15:56 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:30 -0800 Message-Id: <20210128071133.60335-32-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.141.245 X-ServerName: esa1.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=964 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=162 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 31/34] iomap: use bio_new in iomap_readpage_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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- fs/iomap/buffered-io.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 16a1e82e3aeb..08d119b62cf5 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -241,6 +241,9 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, loff_t length, void *data, struct page *page = ctx->cur_page; struct iomap_page *iop = iomap_page_create(inode, page); bool same_page = false, is_contig = false; + struct block_device *bdev = iomap->bdev; + unsigned opf = ctx->rac ? REQ_RAHEAD : 0; + unsigned op = REQ_OP_READ; loff_t orig_pos = pos; unsigned poff, plen; sector_t sector; @@ -285,19 +288,14 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, loff_t length, void *data, if (ctx->rac) /* same as readahead_gfp_mask */ gfp |= __GFP_NORETRY | __GFP_NOWARN; - ctx->bio = bio_alloc(gfp, min(BIO_MAX_PAGES, nr_vecs)); + ctx->bio = bio_new(bdev, sector, op, opf, gfp, nr_vecs); /* * If the bio_alloc fails, try it again for a single page to * avoid having to deal with partial page reads. This emulates * what do_mpage_readpage does. */ if (!ctx->bio) - ctx->bio = bio_alloc(orig_gfp, 1); - ctx->bio->bi_opf = REQ_OP_READ; - if (ctx->rac) - ctx->bio->bi_opf |= REQ_RAHEAD; - ctx->bio->bi_iter.bi_sector = sector; - bio_set_dev(ctx->bio, iomap->bdev); + ctx->bio = bio_new(bdev, sector, op, opf, orig_gfp, 1); ctx->bio->bi_end_io = iomap_read_end_io; } From patchwork Thu Jan 28 07:11:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052965 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 25ED2C433E0 for ; Thu, 28 Jan 2021 08:15:07 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 9C9CB6146D for ; Thu, 28 Jan 2021 08:15:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C9CB6146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8AQnM083086; Thu, 28 Jan 2021 08:15:05 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2uxp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:15:05 +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 10S8AGI8091899; Thu, 28 Jan 2021 08:13:05 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy3mm-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:05 +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 1l51hv-0003av-F2; Wed, 27 Jan 2021 23:27:11 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51XD-0002uG-Cz for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:16:07 -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 10S71Anv050247 for ; Thu, 28 Jan 2021 07:16:07 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq98f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:16:07 +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 10S74X7R040813 for ; Thu, 28 Jan 2021 07:16:06 GMT Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by userp2030.oracle.com with ESMTP id 36bqd38xxy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:16:06 +0000 IronPort-SDR: keHi1gJnnRgKMxEMevfuBmDwXnkI4X/A4nPlFwpqRA+Nnl0EfLqjCyKdyK65hsXTV2Cs+JBDaM o4PRuVLO6AnRf9xfgjYHunBiRjeDmM43f7ql2oi+TU/ExcLMZIhLQagj3wZGuD9h65kMs9HLXL q+f04iFYp6kkGbZdV8gkrJxDt0ZY7Asj3xtgTTX14Ro23EudAM72ANfiBj9Egm/J+Wq55xSClG HDwUeQ/3lWxwm7F/LWZUW44nH7G2Jk9qRNOfhU8qDhsGPBuHnbq3y56dAaX2PpwNE58V2C1xKK rs8= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="268892724" 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; 28 Jan 2021 15:16:04 +0800 IronPort-SDR: trMzNP+qnr0Qgv3Yhz07nRYjIrrb6iVFfLFDJgoNQMKM2F0yiG+iGqIB1ZU5itDRTKh9s5i7AG /IZ8CusBV4hvasvyu2cuGJwS4+5OSxIAq7Rw1hyCcY/8QipXGxaiJYQ8YXc9p5rF4cz7Y7hIit u6I7B6N7RToO/D0kPEELgGnk3vX2DZe11bIyWOHJ6+0fo7frRtVT64YtvUER46s2afdyNb7Pkc n+H6i2+silzCWlQl607U9pI35JfLJtbQQzIlLHU23z1nuI/1qh2uYwYsXJCuU6VPqCRteo4XiI FABxPQf/2NILJjM8nqUd21Eq 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; 27 Jan 2021 22:58:22 -0800 IronPort-SDR: Grws0RkRukNGo7nyou8ZmIctRPf+YpsLcKEKHc3Y9j2gH1wu+DvtqTycxE/+Um75XSsvYHsJz2 XuCl7g+xJPknbJtkfE6+aL2ksGkx9esZlvJSCaOOok8lPoOpNpuMTJUvJF76PXh6twtzc4hV4l Ck271Nzyl0bN3jPxPpXSp854weGQ+wyoheQ1qJh2ewh7GEZUQlec6Cx5gMyzUS7NDfOacpsNSA i4cQzL4qbQiTmP11yVUjlWBUXU4/5eKNIGO+C/0onsAsvTsPxAAYkHYwd4fug7gJV2TpCU6JnF 3ZY= 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; 27 Jan 2021 23:16:04 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:31 -0800 Message-Id: <20210128071133.60335-33-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 68.232.141.245 X-ServerName: esa1.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=234 mlxlogscore=558 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=219 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 32/34] mm: use bio_new in __swap_writepage 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- mm/page_io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 92f7941c6d01..25b321489703 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -342,10 +342,8 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, return 0; } - bio = bio_alloc(GFP_NOIO, 1); - bio_set_dev(bio, sis->bdev); - bio->bi_iter.bi_sector = swap_page_sector(page); - bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc); + bio = bio_alloc(sis->bdev, swap_page_sector(page), REQ_OP_WRITE, + REQ_SWAP | wbc_to_write_flags(wbc), 1, GFP_NOIO); bio->bi_end_io = end_write_func; bio_add_page(bio, page, thp_size(page), 0); From patchwork Thu Jan 28 07:11:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052957 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 23D03C433E0 for ; Thu, 28 Jan 2021 08:13:20 +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 A789160C41 for ; Thu, 28 Jan 2021 08:13:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A789160C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com 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 10S89EER139046; Thu, 28 Jan 2021 08:13:18 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brktrx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:18 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8Bnf1106939; Thu, 28 Jan 2021 08:13:17 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq533-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:17 +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 1l51hv-0003bP-HK; Wed, 27 Jan 2021 23:27:11 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51XK-0002v4-Bb for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:16:14 -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 10S71Aw7050208 for ; Thu, 28 Jan 2021 07:16:14 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq98ka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:16:14 +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 10S74PD0040689 for ; Thu, 28 Jan 2021 07:16:13 GMT Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by userp2030.oracle.com with ESMTP id 36bqd38xyv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:16:13 +0000 IronPort-SDR: FsRZfSeuxwVbRkm1dV0RwVYjEOFc9X/fXNvqzjX1U3A4HFZ+zCxtdmJNX7U+iU1IVWK2+FzO2U FJVQ6VoHGrboqPu35sSX/R1z+XVQejHD2+nMyhc0Eclo2p4AwaxyYcf4jDM8QPacqLPu6yaHYh 3RBbM0oV8tH4W+zpGOPc42aV1cO1S4YMVG2wxInzJU4bTUmaOwELZQUz55ENK+dXvvkbA4+/Q1 UC4ywuMLdQzBn1C+z3ZWB31kShf0BiL9eI+IYHcMvjUtUPSNCfQZi5KHrkqRZkDIF5g62wKqct qbw= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="159694087" 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; 28 Jan 2021 15:16:11 +0800 IronPort-SDR: 46lTD0sk382ICxisWTizvgH50k/mGVfAiijjTSNYJqjn8KgXOsSXdO/YsLkdE+8NR37WXW9X/X 1Y9rUFCo+yH+cTNXfkzeZVs4+W8GRdzLHw8NAVUJ8/MFYfEObuM3/ewc7YRuPkJ9jCo34SlTZa N1T8pWwoaM1ggNBNKlbnC5KoBH63KmjjB2SDzT+5wnP0RftbBUmrX6gT0otml2zv/9Jf1Q47TM 82gyt4iKQfuqV8v9pjglfb9yt8WdVLPG2tbNbDbZiS6adT0O8uBDiQlykm4Zt76S4KU1fWNtCp 5G/HQfxi4peCON8AhcQcLIpt 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; 27 Jan 2021 22:58:29 -0800 IronPort-SDR: g9DYrZw82vrtcoqwLuT41C5LPwtay4x47njX4TQvn100PG3qzIQDYIPSbD2aKZ0nambVfkCSmu JHC6z8/1ifbcXhuz1R2nfguMjBFRQ4RaTCr3wehJDb3ERuWQ1NBrP8es0szoYDQyY3216WdfEV JcMopMzzk+/Wudlq5O10ELulyKCOeTk+PuDGw5+9rtJas4CG58lZZY6nLuQYmFyKdDpDYbQYnL x05lIaxi3M2yfAJSgs6mfnc20aeVZIpUbieSq2c4z3+si2ic8ziehclZMxZZAWaM0XsUZa2+hJ /C8= 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; 27 Jan 2021 23:16:11 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:32 -0800 Message-Id: <20210128071133.60335-34-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.154.45 X-ServerName: esa6.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=557 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=175 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 33/34] mm: use bio_new in swap_readpage 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 Signed-off-by: Chaitanya Kulkarni --- mm/page_io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 25b321489703..7579485ccb5e 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -342,7 +342,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, return 0; } - bio = bio_alloc(sis->bdev, swap_page_sector(page), REQ_OP_WRITE, + bio = bio_new(sis->bdev, swap_page_sector(page), REQ_OP_WRITE, REQ_SWAP | wbc_to_write_flags(wbc), 1, GFP_NOIO); bio->bi_end_io = end_write_func; bio_add_page(bio, page, thp_size(page), 0); @@ -406,10 +406,8 @@ int swap_readpage(struct page *page, bool synchronous) } ret = 0; - bio = bio_alloc(GFP_KERNEL, 1); - bio_set_dev(bio, sis->bdev); - bio->bi_opf = REQ_OP_READ; - bio->bi_iter.bi_sector = swap_page_sector(page); + bio = bio_new(sis->bdev, swap_page_sector(page), REQ_OP_READ, 0, 1, + GFP_KERNEL); bio->bi_end_io = end_swap_bio_read; bio_add_page(bio, page, thp_size(page), 0); From patchwork Thu Jan 28 07:11:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052951 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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 B9B0DC433E0 for ; Thu, 28 Jan 2021 08:13:05 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 4C8456146D for ; Thu, 28 Jan 2021 08:13:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C8456146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89tEA082665; Thu, 28 Jan 2021 08:13:04 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7r2uqm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:04 +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 10S8AFfR091720; Thu, 28 Jan 2021 08:13:03 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 368wqyy3ku-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:03 +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 1l51hv-0003bu-Kq; Wed, 27 Jan 2021 23:27:11 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1l51XS-0002vs-7y for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:16:22 -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 10S71BsR050497 for ; Thu, 28 Jan 2021 07:16:22 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq98r3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Jan 2021 07:16:22 +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 10S74Me0040590 for ; Thu, 28 Jan 2021 07:16:21 GMT Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by userp2030.oracle.com with ESMTP id 36bqd38y0t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Jan 2021 07:16:20 +0000 IronPort-SDR: 2YW26u6NDUeYQLmlHXjExdqJ9mF+hnwBIsuUbAEedE7bfHRaog7TTTTuLyq3h0VaPDnDr+xl88 PoXfmVyKdYzWDO47mOI0SEpsZ+ibcunGO77lSgRWI9k9PgggcH+y5zvKF7v7iF/ARo8a8vJ+uL n1wdi23i/UPnr+yWBYZ2APZZ5VCfw3cjLRtDcFHV/UqqB0V8uT2uF4NNBmNNa8dsGTrEoH9NjN Tr2TIOK6gbXGYbnw97mIiyoHvHUxcAn7Thbvl1d3aPPnyuxW2Dr2vI8QBvOq25x1Xg818txFmE 8Fs= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158518508" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:16:19 +0800 IronPort-SDR: Q5UuEKoLTmYZxaCUzMxAKFlq3YuleaqHmO28ILr3qILsiADSPlzIKxSuWZwFi4HI5f7VU/9K75 enMJqjoRs/wmPeVtDDGByY8PY4CaEMzaNs8OhANnXjscSumkGkm1xc7f96NLUS1kt3Iz8YyTIV pDkgruHjB/tS1hKyn8xOhNxafKDhnCGZrlcMPv7wgMdf1AvFT+UE88xGNKg8Y7CU3yrahAZZ2I aA4hRK8EjBPf4kAyX2DaE5+ORw/BbUjqYoYQnZDNn+ZkREuBI/TKfMRoZMWMERuxgaZj/akmCR Bxv1CMgf4ua1bhVARA6B+Iij Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 23:00:39 -0800 IronPort-SDR: e2VgktU8Igp+G/4kwCau3Wofn5lcroMY0YPC7tNcu39YNL7JBNMa1+cKXT86WcuzihvSj94J7W 8sv8AfyOojzHeLFV1vgVT8Pm71/iwcQAmabu9Ufd/jwBkzWKoKpTzhJn2DWIwNp2e8mqIx3G5A LS7tN5JWZnYOGTkwZ/LMhdAEhsm6g9R10Edu6WiLHx+xz1R0nO/OSJcMH5j4uo+XVYn8ORNhbv mynrcW4WJ2Z8dThUFTylCCg25lF4TIegFSZNE+eSh2Iz0rquG/Dk4lImC2ZggxF5isWDJ8MWSG Bw0= 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; 27 Jan 2021 23:16:19 -0800 From: Chaitanya Kulkarni To: 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 Date: Wed, 27 Jan 2021 23:11:33 -0800 Message-Id: <20210128071133.60335-35-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-PDR: PASS X-Source-IP: 216.71.153.144 X-ServerName: esa5.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=794 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=175 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, 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, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 34/34] mm: add swap_bio_new common bio helper 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: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 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-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 Signed-off-by: Chaitanya Kulkarni --- mm/page_io.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 7579485ccb5e..cc30c9a0b0a7 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -287,6 +287,17 @@ static void bio_associate_blkg_from_page(struct bio *bio, struct page *page) #define bio_associate_blkg_from_page(bio, page) do { } while (0) #endif /* CONFIG_MEMCG && CONFIG_BLK_CGROUP */ +static inline struct bio *swap_bio_new(struct block_device *dev, + unsigned op, unsigned opf, gfp_t gfp, struct page *p, + bio_end_io_t *end_io) +{ + struct bio *bio = bio_new(dev, swap_page_sector(p), op, opf, 1, gfp); + + bio->bi_end_io = end_io; + bio_add_page(bio, p, thp_size(p), 0); + return bio; +} + int __swap_writepage(struct page *page, struct writeback_control *wbc, bio_end_io_t end_write_func) { @@ -342,11 +353,9 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, return 0; } - bio = bio_new(sis->bdev, swap_page_sector(page), REQ_OP_WRITE, - REQ_SWAP | wbc_to_write_flags(wbc), 1, GFP_NOIO); - bio->bi_end_io = end_write_func; - bio_add_page(bio, page, thp_size(page), 0); - + bio = swap_bio_new(sis->bdev, REQ_OP_WRITE, + REQ_SWAP | wbc_to_write_flags(wbc), GFP_KERNEL, + page, end_write_func); bio_associate_blkg_from_page(bio, page); count_swpout_vm_event(page); set_page_writeback(page); @@ -406,11 +415,8 @@ int swap_readpage(struct page *page, bool synchronous) } ret = 0; - bio = bio_new(sis->bdev, swap_page_sector(page), REQ_OP_READ, 0, 1, - GFP_KERNEL); - bio->bi_end_io = end_swap_bio_read; - bio_add_page(bio, page, thp_size(page), 0); - + bio = swap_bio_new(sis->bdev, REQ_OP_READ, 0, GFP_KERNEL, page, + end_swap_bio_read); disk = bio->bi_bdev->bd_disk; /* * Keep this task valid during swap readpage because the oom killer may