Re: [PATCH] f2fs: introduce a new per-sb directory in sysfs

From: Jaegeuk Kim
Date: Sat Dec 05 2020 - 15:43:30 EST


On 12/05, Chao Yu wrote:
> On 2020/12/5 2:23, Jaegeuk Kim wrote:
> > On 12/03, Chao Yu wrote:
> > > Jaegeuk,
> > >
> > > Can you comment on this patch?
> >
> > Waiting for use-case? :)
>
> How do you think of duplicating below stats into /sys/fs/f2fs/<devname>/stat/

We can't move them to /stat, since it requires lots of mess. Let's think
about new ones only.

>
> F2FS_GENERAL_RO_ATTR(dirty_segments);
> F2FS_GENERAL_RO_ATTR(free_segments);
> F2FS_GENERAL_RO_ATTR(lifetime_write_kbytes);
> F2FS_GENERAL_RO_ATTR(features);
> F2FS_GENERAL_RO_ATTR(current_reserved_blocks);
> F2FS_GENERAL_RO_ATTR(unusable);
> F2FS_GENERAL_RO_ATTR(encoding);
> F2FS_GENERAL_RO_ATTR(mounted_time_sec);
> F2FS_GENERAL_RO_ATTR(main_blkaddr);
> #ifdef CONFIG_F2FS_STAT_FS
> F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_foreground_calls, cp_count);
> F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_background_calls, bg_cp_count);
> F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_foreground_calls, call_count);
> F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_background_calls, bg_gc);
> F2FS_GENERAL_RO_ATTR(moved_blocks_background);
> F2FS_GENERAL_RO_ATTR(moved_blocks_foreground);
> F2FS_GENERAL_RO_ATTR(avg_vblocks);
> #endif
>
> Thanks,