Lines Matching refs:buf

65 static ssize_t session_write_kbytes_show(struct ext4_sb_info *sbi, char *buf)  in session_write_kbytes_show()  argument
69 return sysfs_emit(buf, "%lu\n", in session_write_kbytes_show()
74 static ssize_t lifetime_write_kbytes_show(struct ext4_sb_info *sbi, char *buf) in lifetime_write_kbytes_show() argument
78 return sysfs_emit(buf, "%llu\n", in lifetime_write_kbytes_show()
85 const char *buf, size_t count) in inode_readahead_blks_store() argument
90 ret = kstrtoul(skip_spaces(buf), 0, &t); in inode_readahead_blks_store()
102 const char *buf, size_t count) in reserved_clusters_store() argument
109 ret = kstrtoull(skip_spaces(buf), 0, &val); in reserved_clusters_store()
118 const char *buf, size_t count) in trigger_test_error() argument
125 if (len && buf[len-1] == '\n') in trigger_test_error()
129 ext4_error(sbi->s_sb, "%.*s", len, buf); in trigger_test_error()
133 static ssize_t journal_task_show(struct ext4_sb_info *sbi, char *buf) in journal_task_show() argument
136 return sysfs_emit(buf, "<none>\n"); in journal_task_show()
137 return sysfs_emit(buf, "%d\n", in journal_task_show()
372 static ssize_t __print_tstamp(char *buf, __le32 lo, __u8 hi) in __print_tstamp() argument
374 return sysfs_emit(buf, "%lld\n", in __print_tstamp()
378 #define print_tstamp(buf, es, tstamp) \ argument
379 __print_tstamp(buf, (es)->tstamp, (es)->tstamp ## _hi)
382 struct ext4_sb_info *sbi, char *buf) in ext4_generic_attr_show() argument
396 return sysfs_emit(buf, "%u\n", le32_to_cpup(ptr)); in ext4_generic_attr_show()
397 return sysfs_emit(buf, "%u\n", *((unsigned int *) ptr)); in ext4_generic_attr_show()
399 return sysfs_emit(buf, "%lu\n", *((unsigned long *) ptr)); in ext4_generic_attr_show()
401 return sysfs_emit(buf, "%u\n", *((unsigned char *) ptr)); in ext4_generic_attr_show()
404 return sysfs_emit(buf, "%llu\n", le64_to_cpup(ptr)); in ext4_generic_attr_show()
405 return sysfs_emit(buf, "%llu\n", *((unsigned long long *) ptr)); in ext4_generic_attr_show()
407 return sysfs_emit(buf, "%.*s\n", a->attr_size, (char *) ptr); in ext4_generic_attr_show()
409 return sysfs_emit(buf, "%d\n", atomic_read((atomic_t *) ptr)); in ext4_generic_attr_show()
415 struct attribute *attr, char *buf) in ext4_attr_show() argument
423 return sysfs_emit(buf, "%llu\n", in ext4_attr_show()
427 return session_write_kbytes_show(sbi, buf); in ext4_attr_show()
429 return lifetime_write_kbytes_show(sbi, buf); in ext4_attr_show()
431 return sysfs_emit(buf, "%llu\n", in ext4_attr_show()
435 return sysfs_emit(buf, "%llu\n", in ext4_attr_show()
439 return sysfs_emit(buf, "supported\n"); in ext4_attr_show()
441 return print_tstamp(buf, sbi->s_es, s_first_error_time); in ext4_attr_show()
443 return print_tstamp(buf, sbi->s_es, s_last_error_time); in ext4_attr_show()
445 return journal_task_show(sbi, buf); in ext4_attr_show()
447 return ext4_generic_attr_show(a, sbi, buf); in ext4_attr_show()
453 const char *buf, size_t len) in ext4_generic_attr_store() argument
465 ret = kstrtouint(skip_spaces(buf), 0, &t); in ext4_generic_attr_store()
473 ret = kstrtouint(skip_spaces(buf), 0, &t); in ext4_generic_attr_store()
482 ret = kstrtouint(skip_spaces(buf), 0, &t); in ext4_generic_attr_store()
490 ret = kstrtouint(skip_spaces(buf), 0, &t); in ext4_generic_attr_store()
498 ret = kstrtoul(skip_spaces(buf), 0, &lt); in ext4_generic_attr_store()
509 const char *buf, size_t len) in ext4_attr_store() argument
517 return reserved_clusters_store(sbi, buf, len); in ext4_attr_store()
519 return inode_readahead_blks_store(sbi, buf, len); in ext4_attr_store()
521 return trigger_test_error(sbi, buf, len); in ext4_attr_store()
523 return ext4_generic_attr_store(a, sbi, buf, len); in ext4_attr_store()