sysfs.c (c6d5789bea5187c2716959f8954a1e00b8a7835d) | sysfs.c (a7e679b53393c76d4427f4085ec9d114f06cac5a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * f2fs sysfs interface 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 * Copyright (c) 2017 Chao Yu <chao@kernel.org> 8 */ --- 171 unchanged lines hidden (view full) --- 180 sbi->s_encoding->charset, 181 (sbi->s_encoding->version >> 16) & 0xff, 182 (sbi->s_encoding->version >> 8) & 0xff, 183 sbi->s_encoding->version & 0xff); 184#endif 185 return sprintf(buf, "(none)"); 186} 187 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * f2fs sysfs interface 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 * Copyright (c) 2017 Chao Yu <chao@kernel.org> 8 */ --- 171 unchanged lines hidden (view full) --- 180 sbi->s_encoding->charset, 181 (sbi->s_encoding->version >> 16) & 0xff, 182 (sbi->s_encoding->version >> 8) & 0xff, 183 sbi->s_encoding->version & 0xff); 184#endif 185 return sprintf(buf, "(none)"); 186} 187 |
188static ssize_t mounted_time_sec_show(struct f2fs_attr *a, 189 struct f2fs_sb_info *sbi, char *buf) 190{ 191 return sprintf(buf, "%llu", SIT_I(sbi)->mounted_time); 192} 193 |
|
188#ifdef CONFIG_F2FS_STAT_FS 189static ssize_t moved_blocks_foreground_show(struct f2fs_attr *a, 190 struct f2fs_sb_info *sbi, char *buf) 191{ 192 struct f2fs_stat_info *si = F2FS_STAT(sbi); 193 194 return sprintf(buf, "%llu\n", 195 (unsigned long long)(si->tot_blks - --- 343 unchanged lines hidden (view full) --- 539#endif 540F2FS_GENERAL_RO_ATTR(dirty_segments); 541F2FS_GENERAL_RO_ATTR(free_segments); 542F2FS_GENERAL_RO_ATTR(lifetime_write_kbytes); 543F2FS_GENERAL_RO_ATTR(features); 544F2FS_GENERAL_RO_ATTR(current_reserved_blocks); 545F2FS_GENERAL_RO_ATTR(unusable); 546F2FS_GENERAL_RO_ATTR(encoding); | 194#ifdef CONFIG_F2FS_STAT_FS 195static ssize_t moved_blocks_foreground_show(struct f2fs_attr *a, 196 struct f2fs_sb_info *sbi, char *buf) 197{ 198 struct f2fs_stat_info *si = F2FS_STAT(sbi); 199 200 return sprintf(buf, "%llu\n", 201 (unsigned long long)(si->tot_blks - --- 343 unchanged lines hidden (view full) --- 545#endif 546F2FS_GENERAL_RO_ATTR(dirty_segments); 547F2FS_GENERAL_RO_ATTR(free_segments); 548F2FS_GENERAL_RO_ATTR(lifetime_write_kbytes); 549F2FS_GENERAL_RO_ATTR(features); 550F2FS_GENERAL_RO_ATTR(current_reserved_blocks); 551F2FS_GENERAL_RO_ATTR(unusable); 552F2FS_GENERAL_RO_ATTR(encoding); |
553F2FS_GENERAL_RO_ATTR(mounted_time_sec); |
|
547#ifdef CONFIG_F2FS_STAT_FS 548F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_foreground_calls, cp_count); 549F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_background_calls, bg_cp_count); 550F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_foreground_calls, call_count); 551F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_background_calls, bg_gc); 552F2FS_GENERAL_RO_ATTR(moved_blocks_background); 553F2FS_GENERAL_RO_ATTR(moved_blocks_foreground); 554F2FS_GENERAL_RO_ATTR(avg_vblocks); --- 61 unchanged lines hidden (view full) --- 616 ATTR_LIST(dirty_segments), 617 ATTR_LIST(free_segments), 618 ATTR_LIST(unusable), 619 ATTR_LIST(lifetime_write_kbytes), 620 ATTR_LIST(features), 621 ATTR_LIST(reserved_blocks), 622 ATTR_LIST(current_reserved_blocks), 623 ATTR_LIST(encoding), | 554#ifdef CONFIG_F2FS_STAT_FS 555F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_foreground_calls, cp_count); 556F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_background_calls, bg_cp_count); 557F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_foreground_calls, call_count); 558F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, gc_background_calls, bg_gc); 559F2FS_GENERAL_RO_ATTR(moved_blocks_background); 560F2FS_GENERAL_RO_ATTR(moved_blocks_foreground); 561F2FS_GENERAL_RO_ATTR(avg_vblocks); --- 61 unchanged lines hidden (view full) --- 623 ATTR_LIST(dirty_segments), 624 ATTR_LIST(free_segments), 625 ATTR_LIST(unusable), 626 ATTR_LIST(lifetime_write_kbytes), 627 ATTR_LIST(features), 628 ATTR_LIST(reserved_blocks), 629 ATTR_LIST(current_reserved_blocks), 630 ATTR_LIST(encoding), |
631 ATTR_LIST(mounted_time_sec), |
|
624#ifdef CONFIG_F2FS_STAT_FS 625 ATTR_LIST(cp_foreground_calls), 626 ATTR_LIST(cp_background_calls), 627 ATTR_LIST(gc_foreground_calls), 628 ATTR_LIST(gc_background_calls), 629 ATTR_LIST(moved_blocks_foreground), 630 ATTR_LIST(moved_blocks_background), 631 ATTR_LIST(avg_vblocks), --- 246 unchanged lines hidden --- | 632#ifdef CONFIG_F2FS_STAT_FS 633 ATTR_LIST(cp_foreground_calls), 634 ATTR_LIST(cp_background_calls), 635 ATTR_LIST(gc_foreground_calls), 636 ATTR_LIST(gc_background_calls), 637 ATTR_LIST(moved_blocks_foreground), 638 ATTR_LIST(moved_blocks_background), 639 ATTR_LIST(avg_vblocks), --- 246 unchanged lines hidden --- |