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: 12052297 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 D66A8C433E0 for ; Thu, 28 Jan 2021 07:15:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 727A264DCE for ; Thu, 28 Jan 2021 07:15:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 727A264DCE 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 0AF356B0085; Thu, 28 Jan 2021 02:15:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 086716B0092; Thu, 28 Jan 2021 02:15:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE42B6B0093; Thu, 28 Jan 2021 02:15:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id D8B126B0085 for ; Thu, 28 Jan 2021 02:15:18 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 99EBF180AD830 for ; Thu, 28 Jan 2021 07:15:18 +0000 (UTC) X-FDA: 77754322716.13.kiss86_5f012d82759d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 7B93F18140B60 for ; Thu, 28 Jan 2021 07:15:18 +0000 (UTC) X-HE-Tag: kiss86_5f012d82759d X-Filterd-Recvd-Size: 5120 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Jan 2021 07:15:17 +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=1611818117; x=1643354117; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oh6V4IvaBATnJjcr0mcg+O0k1fwwkwTxUMEnAmiYk7w=; b=N/9xsZ4vaUqT4FOnsamVd0tO/aQtqkb2SkD9Lqw5RnvjLL3jaD5MzkR5 +Kke1qnUFvRlpJzQI+sSe6H6sUN6iGFdjl9jqpGX2mjPG6wZ1jk7n6+Tt 4QyAlu2458qBnQqPRGCFSYmi6NLhhDeBHtSjX68uOIf1Un/z8/FkLlu1q h7Ecg9AsPAKbYSY8QsKN32WQyr2E2duO2g0plsYxJSpyrpcthtYPbHtpv HAZWy6aj72kMtxTeXIXumTxoxrKZZjNitFc7fFtBJJdZdeWfcrVBvgeAb X6kYsiK11Dw0t5Bf77LLh0vlmjjFLh3+8h01K7b8QsCM6uC7ZymXjU33t A==; IronPort-SDR: /8wVczywg9JIdU0fb6uCfnm8SpfaWQ7VKiZlZCrXPWxPQWhdHqRuK5WyIZEF9768UzDRvWXiry OAr5BAGqe++ocNuDXu2rtfVHSlhaWJ5ZpKfFdiVYbKCvhvQh2fqgKOJox8TT+LmhtZz/qfsx8G DiuCwST7QGraF9qaMBWrOFim27SCHaMy4zAFJ1gpmRK7ByFfkBvE7O432Yz5C3kdI9vl3RdeCD 0aK9X1oA+l0nLONLaD0OsKaWGLGVGLtrXqtYtI0iB0BcptTO0KE0j1j5iCBAw+0Xti7PFUbo/1 zoQ= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="159693997" 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: dK0OzsoYDvKxPW03TjX0JjJ5CsNjrQ2lGnGs6UIpbvCtlkQY6k3hEwscimQHJXub/RXVml1h9E NMXcEPUkGQ96jm/3o8HwlN+klP9E7GjnyuvmcUasU9IORenslnnvjDQrq9Vmq8BxCLLGl+7BdP 6BaYiKlx3uQWHhdSqXGLfIQCurYOv3QqBgqi0QrHwF/bYzQ/v7Tdf6awWvfO8kk8krvF0pWkvf ewuv8bDuYsGTapnAafidAhmUxV/e6AhzkQyu9LJBUlqZFAm7JUeZqkJcwFhKSZaeKExb758eF1 OsZfbVqO2/oRDs1Pt5AYJ8ot 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 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 26/34] xfs: use bio_new in xfs_rw_bdev 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-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_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);