From patchwork Mon Jul 8 18:47:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11035647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F6A714E5 for ; Mon, 8 Jul 2019 18:49:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 710D5285B3 for ; Mon, 8 Jul 2019 18:49:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64BE7285E2; Mon, 8 Jul 2019 18:49:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12492285B3 for ; Mon, 8 Jul 2019 18:49:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hkYg8-0005Dd-Qt; Mon, 08 Jul 2019 18:47:56 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hkYg7-0005D0-AF for xen-devel@lists.xenproject.org; Mon, 08 Jul 2019 18:47:55 +0000 X-Inumbo-ID: e3bea818-a1b0-11e9-97c6-dbe974784ae7 Received: from esa2.hgst.iphmx.com (unknown [68.232.143.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e3bea818-a1b0-11e9-97c6-dbe974784ae7; Mon, 08 Jul 2019 18:47:52 +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=1562611704; x=1594147704; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ZoXNFKbL1AElJNl2xVVOKPlcS+hzkE1sUFGwmoc7aEE=; b=aA2F8Gnw9G7nhLS8KsCjtw/FhQUFG8HHDMWIkSsEYBIkjqqDf6zABx5E VyPx5Bk0UpFALrr7843oCRdCXgPS4ZvdiQMn+9o8WQzEra13nGqKmRmWg DRNunsGBI39tklEnihWWMjwdLqOuj5f5ALbRo4waJ8iDSgWRbnpa/RfEj Jg2BfqC4XaHlBANN9Bj0gzwnxDcuYh2mzGzXuAF/LHOBrzhJSzaYSKjFN BevS2ZvPFUNoCqhtOOw25d/QeiyObIhZd6h1zvOLqQkao/HR6aMWhYHTJ 0cNEYn7VlL/q+6jkPOfty9caTo0b7/Uiv1ZpP5T+byfd2yeQuZaDt0SJV w==; IronPort-SDR: zza823IYodbth4Zo4zqOMd8Mr7lqhYcH7BPFSHcsKWTO2+J8kUI2eIqh74Wg/3DMXKzKNZB+kz FSWWd5IjUlxF55YXU6dUpWHUjuGkEDVFc0lBa3UcVuxy+BRzIe1XS87adP6YbfRgQp95KE81Dk mEHA+THbEPhLBn5fVS33ht6bGIgMNijAmtr1qEmii1JnHuYk9Zrw/1BK0T8sdG+h/BK+9mKgHH 9Oy46tKYomfYnnObRkfR1q7t6G5l1od9Il1P6NOVzmgJvXNlP3tbYfs4u/VI2nxiiTiRkIfL92 Rlc= X-IronPort-AV: E=Sophos;i="5.63,466,1557158400"; d="scan'208";a="212364746" 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; 09 Jul 2019 02:48:23 +0800 IronPort-SDR: 22m1an4HIx4t8fV7U5cHtCGCoMIcdkKpr5VLEJCWA6OypPRBr2lSd8lthwNDjp9BK5Y0FGB5s2 hJ93Wt602TEzrZgCiYoEub1bmZ/oopK6xC7kSyyVTuagydh2m83cug59NM1o1t+zdBN9YncR54 4S/cw9EEv2mmoKkq5vKYIClnQVAk/kmhOid9t70hkwhC1WeVR50AjJnVcqIUdIvGCV6d8qeU1p K5yGtRCYQ6RYgkE4BTIVdyN8lsbhpve3mPmJAB1eo2/tefGHko3TsrRS3ckBfKX6eW++LiDg9N ypLmQtFDyy9yJpaSGgS/nICG Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 08 Jul 2019 11:46:40 -0700 IronPort-SDR: kecyraaTh4dfkJYr6JIVW0Suuw0udo/w+uOixco2i06qP7L/SWcmvqt/OPQcFYibEwQdrOi0nK enRpRX7ANej55ctxwPbFJYb7fqRPzb9iUsQ+X5ZNEUrTgNq9FFFFtCk8Uw0GOXwADBWlxronSY Svt1NhhCrvFTzjTb0NAJyLkYX8DO4fah1yOc1ieVyunDXipVwQlvdQUxQXLaXQ7YfMQ8I6zuux LMBm49s+scu5jetOVTy2vWOk4WWISLi0ojSm1PhlAA0xRc/M8yQejIviSzITpm3H1FBND+zGZZ tNo= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 08 Jul 2019 11:47:51 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Date: Mon, 8 Jul 2019 11:47:08 -0700 Message-Id: <20190708184711.2984-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190708184711.2984-1-chaitanya.kulkarni@wdc.com> References: <20190708184711.2984-1-chaitanya.kulkarni@wdc.com> Subject: [Xen-devel] [PATCH V4 6/9] f2fs: use helper in init_blkz_info() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: damien.lemoal@wdc.com, linux-btrace@vger.kernel.org, bvanassche@acm.org, linux-scsi@vger.kernel.org, konrad.wilk@oracle.com, Chaitanya Kulkarni , yuchao0@huawei.com, colyli@suse.de, linux-bcache@vger.kernel.org, jaegeuk@kernel.org, xen-devel@lists.xenproject.org, kent.overstreet@gmail.com, roger.pau@citrix.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch updates the init_blkz_info() with newly introduced helper function to read the nr_sects from block device's hd_parts with the help of part_nr_sects_read(). Signed-off-by: Chaitanya Kulkarni --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 6b959bbb336a..24e2848afcf5 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2798,7 +2798,7 @@ static int init_percpu_info(struct f2fs_sb_info *sbi) static int init_blkz_info(struct f2fs_sb_info *sbi, int devi) { struct block_device *bdev = FDEV(devi).bdev; - sector_t nr_sectors = bdev->bd_part->nr_sects; + sector_t nr_sectors = bdev_nr_sects(bdev); sector_t sector = 0; struct blk_zone *zones; unsigned int i, nr_zones;