From patchwork Wed Aug 21 06:14:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11105529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56483112C for ; Wed, 21 Aug 2019 06:16:19 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 3228A216F4 for ; Wed, 21 Aug 2019 06:16:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="NuYxSd83" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3228A216F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0Jtm-00047Z-49; Wed, 21 Aug 2019 06:15:10 +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 1i0Jtl-000474-AX for xen-devel@lists.xenproject.org; Wed, 21 Aug 2019 06:15:09 +0000 X-Inumbo-ID: 0568cdda-c3db-11e9-adc0-12813bfff9fa Received: from esa5.hgst.iphmx.com (unknown [216.71.153.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0568cdda-c3db-11e9-adc0-12813bfff9fa; Wed, 21 Aug 2019 06:15:07 +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=1566368108; x=1597904108; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=PRIc+qImYQi0sq4kI43ZLo0IJMblnfPTP0QUTy0nhdQ=; b=NuYxSd83Sg/Ct074JSbtGgQg+5NpTGJc/XfETWuBInv/oibqWejIlZ2L Fr/BWbPjjNv+iQM93DY0ivM9WALdnaSdnV202PXvxR8XharPnfzAdmocc gw7i+pQ/hK2ZeBgnQvNcpkEY34cKOluQyDyxyoikcfKcz4R+gnenKhVhx M/44RbagdsQq6O2b70HN+/IQ6EXxeB2e2v+ojJMr13iFxvLzkiwFLSt8O bkiQndprvGpo4iKe3vlvHifj/KJX7dbtJ6fmjikJOfslfXhm2BoLFYSEh 4c2t16+c4bn4P2BaHU+XsU7LDdzcSI0bDCzCpETo6Gg+qHlFAHgEWdi4j Q==; IronPort-SDR: mi7cpFVYmr5t4XAxpU5sUSy+w/1dWUbBk0BHGSff4aKQ78H0sO+5Gvb+Ijqz26Jo1rFxUcIM4c UCzQP+Fub3v3YlgXH7UC/aQRlRVk43GQzW6q8kcPJaauoBuAoi2pGL/uBQ2uoAVQA82Bq0GTLp wULr0cpaG1XeyAWdWejSEd/w0+AuJzkO1tLI6C/QqwIWzAQC3wGEvolQpTMPmGFGMAQmpwR+J8 +AhD3+yNFsnNEwb/QJKIZe1f914rYGBI3nnaCjiwzYwr9SdTjYXwkiPG3/CaMHX5/4dyy4pqmS N00= X-IronPort-AV: E=Sophos;i="5.64,411,1559491200"; d="scan'208";a="117239090" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Aug 2019 14:15:07 +0800 IronPort-SDR: 39Ey0NAQwuaSLAJEzA5u8xPkoSqztuovmx79SvlP3v+o/sHO/Cm8bRL4OT/YypijwMvzD/o0Mk MUOt6+uCVVh4EUgJZenUfrpJPeljUyfLdcrkOjyO5LcG+SV4PtfpNcajWxbFM5PNpe20hoPOG9 6HjN+EyANTz5bTUDd6O2v97toPpX84Cn4sOzNoEh2KY9ptiWVWDeA2nI72jw+KJ8/DBeVhSlhd 1f+j5NKvVjlD3aFYEg7DWY/+ccVgOx1ddVfAJ6p0QDbvtkRxL4hCBMmQdJV+s0NLI1fUKxwEQ0 TKHFASIiFfLo5qIte8BiUcg0 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2019 23:12:28 -0700 IronPort-SDR: 5OITIcW+05bA5Z40gygWOJU1w9CIPQ11BCkLaBNmFn3P/VNeT0sYheeUS/i1HqpgVD2aksn/0T 0jmTG7ojAxndIs1tRyw00R3Gt8qcdicEt+6yTPu8vzUU0i4fpKYySbuvVoWZd8g+Abko1qujuu j4MC7leRfkA7azGPBOWylw7p7ZKglYFk9SHsW8rLlacSj/f7OCusSE3BCYeePrmX6TOsUVfbkX bPUoBBhF6ojUMTV6YAgSaZKf0Yh8+8iUQCm0hYI5wPdi5onYmHP4f2i3PqgeIT3YLVaSFNafh4 3zA= WDCIronportException: Internal Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip01.wdc.com with ESMTP; 20 Aug 2019 23:15:06 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Date: Tue, 20 Aug 2019 23:14:20 -0700 Message-Id: <20190821061423.3408-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190821061423.3408-1-chaitanya.kulkarni@wdc.com> References: <20190821061423.3408-1-chaitanya.kulkarni@wdc.com> Subject: [Xen-devel] [PATCH V5 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" 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 78a1b873e48a..78f8f834aa44 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2775,7 +2775,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;