Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp7188592pxv; Fri, 30 Jul 2021 12:11:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoQ0g/V1/ATb49IxjxDh8/pfrMFYjEefR3rBQ8i8wyUAkHeHe8QdU7CAIfU7p3Ujj3SqtP X-Received: by 2002:a17:906:4f01:: with SMTP id t1mr4306142eju.388.1627672262033; Fri, 30 Jul 2021 12:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627672262; cv=none; d=google.com; s=arc-20160816; b=BnRcNztsvxEEl/E9pIeBm6egEk8F0hXbboQ6TIRFEm7ZXqqdzwWxYDTMHXTXmGfpOX IpfBbW4ZzkBJJ4fQB/bTHM+2Iy7/pg4GgFRm4wg5aGaUvtUtEy/S2Eb6EyWL+eIivWWm a3gNxVHezTRvWaJsP+/rvofUgVuHGK9sNF0kAiBP4/LFS9Gl6xnxQ3/5ntXUc/qvqXdh ntPgLQVfPfv2NUiflR31SP6BncMHOpCGq+HK8AuXHXcn7SLVRmHACnaNPXrx18gQIIJD JEXjTNGNcl87c/kArbpAyL6vX23tBEbCzhqhkUZPW1ECyfJow0L0OTkYs75+tjV6jnPs 9JaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ibZIgIehqEN/SPXOKoquoiRsI2KpGmXiLdZkpl8MuEM=; b=RgyNV/NdyF+i59TY4qQ8iMu/83ynwFmWMn4Mv948/DZzZylOQxaxH14cyVOzr85+uR 9DvCXlx6YqtIa4KoS8rSaU1n73GbbVsK8MfLI1NG7n0Hj6bv31yzUdMMqkAkZRo0u15t NpZmyghr2dUrW3Y5y8g700gG4ZdEBzu1Y0NpdqYHsu6Jnn8cZL/PnvvDo4dE9FvDo+e3 tuaFoeWq07YXJZyoC9WJdNEwYYU7i5xQn6sV/Rra/2ABGuTHYpfueMkJFws8OPeGD0It cfNoa0e4o3V/C6SeDfdC+LR1JlhKwYog+vCBeTM/xqfhsR4mCiZfgkdI+M9wScBWT1bg 4upQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tgKBp5fC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op26si2912212ejb.103.2021.07.30.12.10.38; Fri, 30 Jul 2021 12:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tgKBp5fC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbhG3TJR (ORCPT + 99 others); Fri, 30 Jul 2021 15:09:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:46148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbhG3TJR (ORCPT ); Fri, 30 Jul 2021 15:09:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F30A360F00; Fri, 30 Jul 2021 19:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627672152; bh=00uKcfkCA0b/QBJBHFd/NCx0VSTJMUeiq41umtW8K/o=; h=From:To:Cc:Subject:Date:From; b=tgKBp5fC17GSQ9dnb6fsykoMRDRPkNPxQTRdLSmyvpP8lRnOSwTXiMP1ScyMpVPd3 q+QQ/4/Te76EHAG/7DWuwPCCI+8Wwm1ykpVd8WprTuR0FJwYULb6DXaEz1lok9KcOd hXXMbwwyTH5B9WjOE1M+BzBhO4Pylz57h0ajj01Lpz1xEatNvw9arBq/8xeJifrbQu HeMy59T7kSH8HuLIyWAG0zip7dD+AAnwm/vn+2Vpey4XYhZBpjdFO0xC2bKTrnS80y PpF6mkC62NXr+0+EHZlBbd4lF8Yq765l5EEv6vT0oBrFTuHw77IKsuYXrG+BhjA0fj aNPbfbJdeRDSA== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH] f2fs: show sbi status in debugfs/f2f/sstatus Date: Fri, 30 Jul 2021 12:09:07 -0700 Message-Id: <20210730190907.2072122-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to get sbi->s_flag to understand the current f2fs status as well. One example is SBI_NEED_FSCK. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 53ed1e9191f0..473ad04d1891 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -333,11 +333,12 @@ static int stat_show(struct seq_file *s, void *v) list_for_each_entry(si, &f2fs_stat_list, stat_list) { update_general_status(si->sbi); - seq_printf(s, "\n=====[ partition info(%pg). #%d, %s, CP: %s]=====\n", + seq_printf(s, "\n=====[ partition info(%pg). #%d, %s, CP: %s (sbi: 0x%lx)]=====\n", si->sbi->sb->s_bdev, i++, f2fs_readonly(si->sbi->sb) ? "RO": "RW", is_set_ckpt_flags(si->sbi, CP_DISABLED_FLAG) ? - "Disabled": (f2fs_cp_error(si->sbi) ? "Error": "Good")); + "Disabled": (f2fs_cp_error(si->sbi) ? "Error": "Good"), + si->sbi->s_flag); seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ", si->sit_area_segs, si->nat_area_segs); seq_printf(s, "[SSA: %d] [MAIN: %d", -- 2.32.0.554.ge1b32706d8-goog