linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: show sbi status in debugfs/f2f/sstatus
@ 2021-07-30 19:09 Jaegeuk Kim
  2021-07-30 23:45 ` [f2fs-dev] " Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2021-07-30 19:09 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

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 <jaegeuk@kernel.org>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: show sbi status in debugfs/f2f/sstatus
  2021-07-30 19:09 [PATCH] f2fs: show sbi status in debugfs/f2f/sstatus Jaegeuk Kim
@ 2021-07-30 23:45 ` Chao Yu
  2021-07-31  0:44   ` Jaegeuk Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2021-07-30 23:45 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel

On 2021/7/31 3:09, Jaegeuk Kim wrote:
> We need to get sbi->s_flag to understand the current f2fs status as well.
> One example is SBI_NEED_FSCK.

Typo in patch title: "f2f/sstatus".

Please note that there is a sysfs entry /sys/fs/f2fs/<devname/stat/sb_status.

> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: show sbi status in debugfs/f2f/sstatus
  2021-07-30 23:45 ` [f2fs-dev] " Chao Yu
@ 2021-07-31  0:44   ` Jaegeuk Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Jaegeuk Kim @ 2021-07-31  0:44 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel

On 07/31, Chao Yu wrote:
> On 2021/7/31 3:09, Jaegeuk Kim wrote:
> > We need to get sbi->s_flag to understand the current f2fs status as well.
> > One example is SBI_NEED_FSCK.
> 
> Typo in patch title: "f2f/sstatus".
> 
> Please note that there is a sysfs entry /sys/fs/f2fs/<devname/stat/sb_status.

Sure. Thanks.

> 
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> 
> Reviewed-by: Chao Yu <chao@kernel.org>
> 
> Thanks,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-31  0:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 19:09 [PATCH] f2fs: show sbi status in debugfs/f2f/sstatus Jaegeuk Kim
2021-07-30 23:45 ` [f2fs-dev] " Chao Yu
2021-07-31  0:44   ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).