Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3729279yba; Tue, 9 Apr 2019 03:39:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5waJqrJhwtaQSm4WMOtxHradvpXt1tLk3I430Csm6pVYomaaR7tbbKK5KE3ajqSlB77jq X-Received: by 2002:a17:902:167:: with SMTP id 94mr7343178plb.108.1554806341096; Tue, 09 Apr 2019 03:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554806341; cv=none; d=google.com; s=arc-20160816; b=U/+fMEAZsoF/N9L/cihgk1NOSSTFIlCfPRtUKoeErRDgoLoXnWWajt2DuBYVS/HulG q4syiKTXeyCnhANOJbITi/Pj1vMy4Nr3jYgXIa6tLonwHbYE3UWD6kfK2c5C/vz8U9ae h3zMKz6weGHe9UafkjiCBLtoQOUhui+NkUcSaS5fHdk353BHCq4dDdLnOpmoUJi6C+o5 4jFVs2TrP5wz5U017bCDlbc33gzKDauUrJqXD/XyI1ki22r5En77vGRzzcqpo9u3a4hG xjFrvrE3AtJU2myI6oC4nM8eplqbe5UtEvyJJ9R3dBJGMw5p4yGnPPzPnd0COxht/5SB bM/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature; bh=ftNj2mbmLebpKEtTDn2N9UQh+/5MtwtavyV5l2/U0q4=; b=twRladZTd++5j+jB1yS1fkm+9oo3+Pxn195H5FW+OsK5leU8mvhyoyZiT2mnGRRm5b jOA5mvT0jcWIyc7hpk9Z9np7kunLvEN5SMDH2M15Ix6JsyeLzdLmixEE5lqB5euhtUu1 ru5Z5NV3A6Y4D58VfUi6zysu8U9PQQb2PeipqH0Go9J1MGhhFfVSXQkaayrhqjBz9xuc VaiHqBIFVR/gPbJXeuefanpwY/ELoPy6lLPyCCr0JNCg9Wz4huMTQXgTrwFOHorLVJJk g/GYQYKWyM+8ufaMmx9ZyhwBibfoUJY6g86DxD0X9xUOO49uVMyD7fIR20DBDWf5LPg6 a1Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Bjyn2jUC; dkim=pass header.i=@codeaurora.org header.s=default header.b=fPQp1xo6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si3380624pgf.519.2019.04.09.03.38.45; Tue, 09 Apr 2019 03:39:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Bjyn2jUC; dkim=pass header.i=@codeaurora.org header.s=default header.b=fPQp1xo6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbfDIKgv (ORCPT + 99 others); Tue, 9 Apr 2019 06:36:51 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36938 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfDIKgu (ORCPT ); Tue, 9 Apr 2019 06:36:50 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 600F861196; Tue, 9 Apr 2019 10:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554806209; bh=o9CnlLwBhIOwI3R+fnRkUEEfNfLOW+j1FOo4ovAFYFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bjyn2jUCJ4pTO1P3s480yVu8tPZNnaQbd2YNQc7VYjxABAPTZpltXmIXNDAvW5Kk+ 5DGiDSkvsxKuiOWQInsKOkKMtNaMPiulgCmUVa6BiiWSONsdvdbQRYkQLZ35R7c40U ZmcSQChacVNp8BF595NlPGWAWadjV46O97z+gCVI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 327056115A; Tue, 9 Apr 2019 10:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554806207; bh=o9CnlLwBhIOwI3R+fnRkUEEfNfLOW+j1FOo4ovAFYFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPQp1xo6n6uXbx81bUc9F6xig+t8mgwWYrOUGSxTrIDq9Sv+6se/fo2StJPduAGAf 2ltOfxEGNAwSPe7SFrcP03QmtMQt8L6hcXp+NtdEZ1pbRNaJFKpVB1K9ME4Wwu9KbC HvmRF8WaT3ARZRRv/56jBoH2FZi0RilpQylEE46g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 327056115A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=stummala@codeaurora.org From: Sahitya Tummala To: Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Cc: Sahitya Tummala , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] f2fs: fix debugfs status to reflect the online resize changes Date: Tue, 9 Apr 2019 16:06:16 +0530 Message-Id: <1554806178-32728-2-git-send-email-stummala@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1554806178-32728-1-git-send-email-stummala@codeaurora.org> References: <1554806178-32728-1-git-send-email-stummala@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The main area segs/secs/zones will be updated/changed after an online resize. Hence, update the struct f2fs_stat_info as well accordingly to show correct status in debugfs. Signed-off-by: Sahitya Tummala --- fs/f2fs/debug.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 99e9a5c..7706049 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -27,8 +27,15 @@ static void update_general_status(struct f2fs_sb_info *sbi) { struct f2fs_stat_info *si = F2FS_STAT(sbi); + struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi); int i; + /* these will be changed if online resize is done */ + si->main_area_segs = le32_to_cpu(raw_super->segment_count_main); + si->main_area_sections = le32_to_cpu(raw_super->section_count); + si->main_area_zones = si->main_area_sections / + le32_to_cpu(raw_super->secs_per_zone); + /* validation check of the segment numbers */ si->hit_largest = atomic64_read(&sbi->read_hit_largest); si->hit_cached = atomic64_read(&sbi->read_hit_cached); -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.