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: 12052299 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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 9B470C433DB for ; Thu, 28 Jan 2021 07:15:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A69464DD8 for ; Thu, 28 Jan 2021 07:15:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A69464DD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A73AC6B0078; Thu, 28 Jan 2021 02:15:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A491B6B0092; Thu, 28 Jan 2021 02:15:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 911726B0093; Thu, 28 Jan 2021 02:15:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id 6B54F6B0078 for ; Thu, 28 Jan 2021 02:15:26 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 311B4181AC9BF for ; Thu, 28 Jan 2021 07:15:26 +0000 (UTC) X-FDA: 77754323052.18.crack99_470f0f92759d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 057AB100ED0FD for ; Thu, 28 Jan 2021 07:15:26 +0000 (UTC) X-HE-Tag: crack99_470f0f92759d X-Filterd-Recvd-Size: 5168 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Jan 2021 07:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1611818303; x=1643354303; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OE6wZQGKF5NjVuNViqgkr5UqZUb/ZMMrnmgRjBTexFA=; b=GNh5UCuVhfvgn4mpXDqE7B1MPr9Ikhn8DvGbixHDDKgTNcKIFv02ylWr QPrxOP43FUTJBWeay0zCxn6CT81j3Bk3conyeZ1elcI4qPcq5lUzEq2uF jzMxGw2DEgObMGr3Q95KxpYrVaxbnnPxFVn9nVDqpMEtSzDVI/o/twR30 xISUXs+j0iqNVB+F1IL9B1yCNQJz8hfrjBhCgMLSifduAZoGGLpshnvUk jk03IUY8leKu9nA27p5Vi3uDALfHu2zhq75il4o0Hf6z5Q6jwn3puGHKd fbMY1Y00IMF/fBgd/S02VrZvQRDtWRu4kaSBSam0N26oT5ngad5rCAMoY A==; IronPort-SDR: KL7RRfLnqkVuF7oD7MCtqlpCksu0xH/9KW2ta4n7WvUfZRgabvWr2MmjmSR5YwitipW9Pttb09 HrG1LUXCClbtLNUphDz9R49dzifLZsU7u0IyS2sEJRDd3QFsI7I4IiDmYsrKm70sHmQKLknbLh kfK/mSIK0L2FfOFO/hnPdHIqE3mVhGkgwOR8jdv+8HK6wpHsjM0j0RtYp4jhtIWgdqZXj5jw2V x1iFb73F6f7jS5HTxus1D1KNWK8dWjNoc6hTchuVYnRwgFgWsWcULxVtJi8i+QTOgbDuLWLWRK ip8= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="262549175" 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:21 +0800 IronPort-SDR: RHYfjmiErM4Pu48hEb+o5dtxyQdfCNjY5am6vKOivqn2VbmjB0kGizGPCsOEppNlK3vmYcuauh f5fPytP9YSKzhAsMVyGHEO/vDsucnGX9Gqta5H+9WPetv36TlrY6Fu69XQdqxB/UJj9ENzreAh wMXINKuDy/bEhuYzuy283nSFVfsNBglSqhn45rBMGewHb2EwtPgk+jCCYjiVCv0YUNrQtp6qVx MUhl1QtnspczqdUrsE8CFc2l/RTrhcCrjYe+jU1qfG6oluWh1zNZBmbVIl8+qehdto6y55cyEh 9FEQ57UmdqTCIkBWVP178EwE 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:42 -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 Cc: axboe@kernel.dk, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, konrad.wilk@oracle.com, roger.pau@citrix.com, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, agk@redhat.com, snitzer@redhat.com, hch@lst.de, sagi@grimberg.me, chaitanya.kulkarni@wdc.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, tytso@mit.edu, jaegeuk@kernel.org, ebiggers@kernel.org, djwong@kernel.org, shaggy@kernel.org, konishi.ryusuke@gmail.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org, rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, akpm@linux-foundation.org, hare@suse.de, gustavoars@kernel.org, tiwai@suse.de, alex.shi@linux.alibaba.com, asml.silence@gmail.com, ming.lei@redhat.com, tj@kernel.org, osandov@fb.com, bvanassche@acm.org, jefflexu@linux.alibaba.com Subject: [RFC PATCH 27/34] xfs: use bio_new in xfs_buf_ioapply_map 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-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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;