Lines Matching refs:buf
56 ssize_t (*show)(struct f2fs_attr *a, struct f2fs_sb_info *sbi, char *buf);
58 const char *buf, size_t len);
65 struct f2fs_sb_info *sbi, char *buf);
96 struct f2fs_sb_info *sbi, char *buf) in dirty_segments_show() argument
98 return sysfs_emit(buf, "%llu\n", in dirty_segments_show()
103 struct f2fs_sb_info *sbi, char *buf) in free_segments_show() argument
105 return sysfs_emit(buf, "%llu\n", in free_segments_show()
110 struct f2fs_sb_info *sbi, char *buf) in ovp_segments_show() argument
112 return sysfs_emit(buf, "%llu\n", in ovp_segments_show()
117 struct f2fs_sb_info *sbi, char *buf) in lifetime_write_kbytes_show() argument
119 return sysfs_emit(buf, "%llu\n", in lifetime_write_kbytes_show()
126 struct f2fs_sb_info *sbi, char *buf) in sb_status_show() argument
128 return sysfs_emit(buf, "%lx\n", sbi->s_flag); in sb_status_show()
132 struct f2fs_sb_info *sbi, char *buf) in cp_status_show() argument
134 return sysfs_emit(buf, "%x\n", le32_to_cpu(F2FS_CKPT(sbi)->ckpt_flags)); in cp_status_show()
138 struct f2fs_sb_info *sbi, char *buf) in pending_discard_show() argument
142 return sysfs_emit(buf, "%llu\n", (unsigned long long)atomic_read( in pending_discard_show()
147 struct f2fs_sb_info *sbi, char *buf) in gc_mode_show() argument
149 return sysfs_emit(buf, "%s\n", gc_mode_names[sbi->gc_mode]); in gc_mode_show()
153 struct f2fs_sb_info *sbi, char *buf) in features_show() argument
158 len += scnprintf(buf, PAGE_SIZE - len, "%s", in features_show()
161 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
164 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
167 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
170 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
173 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
176 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
179 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
182 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
185 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
188 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
191 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
194 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
197 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
199 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
201 len += scnprintf(buf + len, PAGE_SIZE - len, "\n"); in features_show()
206 struct f2fs_sb_info *sbi, char *buf) in current_reserved_blocks_show() argument
208 return sysfs_emit(buf, "%u\n", sbi->current_reserved_blocks); in current_reserved_blocks_show()
212 struct f2fs_sb_info *sbi, char *buf) in unusable_show() argument
220 return sysfs_emit(buf, "%llu\n", (unsigned long long)unusable); in unusable_show()
224 struct f2fs_sb_info *sbi, char *buf) in encoding_show() argument
230 return sysfs_emit(buf, "%s (%d.%d.%d)\n", in encoding_show()
236 return sysfs_emit(buf, "(none)\n"); in encoding_show()
240 struct f2fs_sb_info *sbi, char *buf) in mounted_time_sec_show() argument
242 return sysfs_emit(buf, "%llu\n", SIT_I(sbi)->mounted_time); in mounted_time_sec_show()
247 struct f2fs_sb_info *sbi, char *buf) in moved_blocks_foreground_show() argument
251 return sysfs_emit(buf, "%llu\n", in moved_blocks_foreground_show()
257 struct f2fs_sb_info *sbi, char *buf) in moved_blocks_background_show() argument
261 return sysfs_emit(buf, "%llu\n", in moved_blocks_background_show()
266 struct f2fs_sb_info *sbi, char *buf) in avg_vblocks_show() argument
272 return sysfs_emit(buf, "%llu\n", (unsigned long long)(si->avg_vblocks)); in avg_vblocks_show()
277 struct f2fs_sb_info *sbi, char *buf) in main_blkaddr_show() argument
279 return sysfs_emit(buf, "%llu\n", in main_blkaddr_show()
284 struct f2fs_sb_info *sbi, char *buf) in f2fs_sbi_show() argument
300 len += scnprintf(buf + len, PAGE_SIZE - len, in f2fs_sbi_show()
303 len += scnprintf(buf + len, PAGE_SIZE - len, "%s\n", in f2fs_sbi_show()
306 len += scnprintf(buf + len, PAGE_SIZE - len, in f2fs_sbi_show()
309 len += scnprintf(buf + len, PAGE_SIZE - len, "%s\n", in f2fs_sbi_show()
322 return sysfs_emit(buf, "%s,%d\n", in f2fs_sbi_show()
328 return sysfs_emit(buf, "%llu\n", sbi->compr_written_block); in f2fs_sbi_show()
331 return sysfs_emit(buf, "%llu\n", sbi->compr_saved_block); in f2fs_sbi_show()
334 return sysfs_emit(buf, "%u\n", sbi->compr_new_inode); in f2fs_sbi_show()
338 return sysfs_emit(buf, "%u\n", sbi->gc_segment_mode); in f2fs_sbi_show()
341 return sysfs_emit(buf, "%u\n", in f2fs_sbi_show()
348 return sysfs_emit(buf, "%lld\n", current_write); in f2fs_sbi_show()
352 return sysfs_emit(buf, "%lld\n", sbi->peak_atomic_write); in f2fs_sbi_show()
355 return sysfs_emit(buf, "%llu\n", sbi->committed_atomic_block); in f2fs_sbi_show()
358 return sysfs_emit(buf, "%llu\n", sbi->revoked_atomic_block); in f2fs_sbi_show()
362 return sysfs_emit(buf, "%u\n", *ui); in f2fs_sbi_show()
367 const char *buf, size_t count) in __sbi_store() argument
379 const char *name = strim((char *)buf); in __sbi_store()
414 const char *name = strim((char *)buf); in __sbi_store()
447 ret = kstrtoul(skip_spaces(buf), 0, &t); in __sbi_store()
735 const char *buf, size_t count) in f2fs_sbi_store() argument
745 ret = __sbi_store(a, sbi, buf, count); in f2fs_sbi_store()
753 struct attribute *attr, char *buf) in f2fs_attr_show() argument
759 return a->show ? a->show(a, sbi, buf) : 0; in f2fs_attr_show()
763 const char *buf, size_t len) in f2fs_attr_store() argument
769 return a->store ? a->store(a, sbi, buf, len) : 0; in f2fs_attr_store()
798 struct f2fs_sb_info *sbi, char *buf) in f2fs_feature_show() argument
800 return sysfs_emit(buf, "supported\n"); in f2fs_feature_show()
810 struct f2fs_sb_info *sbi, char *buf) in f2fs_sb_feature_show() argument
813 return sysfs_emit(buf, "supported\n"); in f2fs_sb_feature_show()
814 return sysfs_emit(buf, "unsupported\n"); in f2fs_sb_feature_show()
1203 struct attribute *attr, char *buf) in f2fs_stat_attr_show() argument
1209 return a->show ? a->show(a, sbi, buf) : 0; in f2fs_stat_attr_show()
1213 const char *buf, size_t len) in f2fs_stat_attr_store() argument
1219 return a->store ? a->store(a, sbi, buf, len) : 0; in f2fs_stat_attr_store()
1241 struct attribute *attr, char *buf) in f2fs_sb_feat_attr_show() argument
1247 return a->show ? a->show(a, sbi, buf) : 0; in f2fs_sb_feat_attr_show()