Lines Matching refs:buf
62 static ssize_t session_write_kbytes_show(struct ext4_sb_info *sbi, char *buf) in session_write_kbytes_show() argument
66 return snprintf(buf, PAGE_SIZE, "%lu\n", in session_write_kbytes_show()
71 static ssize_t lifetime_write_kbytes_show(struct ext4_sb_info *sbi, char *buf) in lifetime_write_kbytes_show() argument
75 return snprintf(buf, PAGE_SIZE, "%llu\n", in lifetime_write_kbytes_show()
82 const char *buf, size_t count) in inode_readahead_blks_store() argument
87 ret = kstrtoul(skip_spaces(buf), 0, &t); in inode_readahead_blks_store()
99 const char *buf, size_t count) in reserved_clusters_store() argument
106 ret = kstrtoull(skip_spaces(buf), 0, &val); in reserved_clusters_store()
115 const char *buf, size_t count) in trigger_test_error() argument
122 if (len && buf[len-1] == '\n') in trigger_test_error()
126 ext4_error(sbi->s_sb, "%.*s", len, buf); in trigger_test_error()
130 static ssize_t journal_task_show(struct ext4_sb_info *sbi, char *buf) in journal_task_show() argument
133 return snprintf(buf, PAGE_SIZE, "<none>\n"); in journal_task_show()
134 return snprintf(buf, PAGE_SIZE, "%d\n", in journal_task_show()
358 static ssize_t __print_tstamp(char *buf, __le32 lo, __u8 hi) in __print_tstamp() argument
360 return snprintf(buf, PAGE_SIZE, "%lld\n", in __print_tstamp()
364 #define print_tstamp(buf, es, tstamp) \ argument
365 __print_tstamp(buf, (es)->tstamp, (es)->tstamp ## _hi)
368 struct attribute *attr, char *buf) in ext4_attr_show() argument
377 return snprintf(buf, PAGE_SIZE, "%llu\n", in ext4_attr_show()
381 return session_write_kbytes_show(sbi, buf); in ext4_attr_show()
383 return lifetime_write_kbytes_show(sbi, buf); in ext4_attr_show()
385 return snprintf(buf, PAGE_SIZE, "%llu\n", in ext4_attr_show()
389 return snprintf(buf, PAGE_SIZE, "%llu\n", in ext4_attr_show()
397 return snprintf(buf, PAGE_SIZE, "%u\n", in ext4_attr_show()
400 return snprintf(buf, PAGE_SIZE, "%u\n", in ext4_attr_show()
405 return snprintf(buf, PAGE_SIZE, "%lu\n", in ext4_attr_show()
410 return snprintf(buf, PAGE_SIZE, "%u\n", in ext4_attr_show()
416 return snprintf(buf, PAGE_SIZE, "%llu\n", in ext4_attr_show()
419 return snprintf(buf, PAGE_SIZE, "%llu\n", in ext4_attr_show()
424 return snprintf(buf, PAGE_SIZE, "%.*s\n", a->attr_size, in ext4_attr_show()
429 return snprintf(buf, PAGE_SIZE, "%d\n", in ext4_attr_show()
432 return snprintf(buf, PAGE_SIZE, "supported\n"); in ext4_attr_show()
434 return print_tstamp(buf, sbi->s_es, s_first_error_time); in ext4_attr_show()
436 return print_tstamp(buf, sbi->s_es, s_last_error_time); in ext4_attr_show()
438 return journal_task_show(sbi, buf); in ext4_attr_show()
446 const char *buf, size_t len) in ext4_attr_store() argument
457 return reserved_clusters_store(sbi, buf, len); in ext4_attr_store()
461 ret = kstrtoul(skip_spaces(buf), 0, &t); in ext4_attr_store()
472 ret = kstrtoul(skip_spaces(buf), 0, &t); in ext4_attr_store()
478 return inode_readahead_blks_store(sbi, buf, len); in ext4_attr_store()
480 return trigger_test_error(sbi, buf, len); in ext4_attr_store()