Lines Matching refs:a
65 static ssize_t dirty_segments_show(struct f2fs_attr *a, in dirty_segments_show() argument
72 static ssize_t unusable_show(struct f2fs_attr *a, in unusable_show() argument
85 static ssize_t encoding_show(struct f2fs_attr *a, in encoding_show() argument
99 static ssize_t lifetime_write_kbytes_show(struct f2fs_attr *a, in lifetime_write_kbytes_show() argument
112 static ssize_t features_show(struct f2fs_attr *a, in features_show() argument
163 static ssize_t current_reserved_blocks_show(struct f2fs_attr *a, in current_reserved_blocks_show() argument
169 static ssize_t f2fs_sbi_show(struct f2fs_attr *a, in f2fs_sbi_show() argument
175 ptr = __struct_ptr(sbi, a->struct_type); in f2fs_sbi_show()
179 if (!strcmp(a->attr.name, "extension_list")) { in f2fs_sbi_show()
200 ui = (unsigned int *)(ptr + a->offset); in f2fs_sbi_show()
205 static ssize_t __sbi_store(struct f2fs_attr *a, in __sbi_store() argument
214 ptr = __struct_ptr(sbi, a->struct_type); in __sbi_store()
218 if (!strcmp(a->attr.name, "extension_list")) { in __sbi_store()
253 ui = (unsigned int *)(ptr + a->offset); in __sbi_store()
259 if (a->struct_type == FAULT_INFO_TYPE && t >= (1 << FAULT_MAX)) in __sbi_store()
261 if (a->struct_type == FAULT_INFO_RATE && t >= UINT_MAX) in __sbi_store()
264 if (a->struct_type == RESERVED_BLOCKS) { in __sbi_store()
278 if (!strcmp(a->attr.name, "discard_granularity")) { in __sbi_store()
287 if (!strcmp(a->attr.name, "migration_granularity")) { in __sbi_store()
292 if (!strcmp(a->attr.name, "trim_sections")) in __sbi_store()
295 if (!strcmp(a->attr.name, "gc_urgent")) { in __sbi_store()
309 if (!strcmp(a->attr.name, "gc_idle")) { in __sbi_store()
320 if (!strcmp(a->attr.name, "iostat_enable")) { in __sbi_store()
332 static ssize_t f2fs_sbi_store(struct f2fs_attr *a, in f2fs_sbi_store() argument
337 bool gc_entry = (!strcmp(a->attr.name, "gc_urgent") || in f2fs_sbi_store()
338 a->struct_type == GC_THREAD); in f2fs_sbi_store()
344 ret = __sbi_store(a, sbi, buf, count); in f2fs_sbi_store()
356 struct f2fs_attr *a = container_of(attr, struct f2fs_attr, attr); in f2fs_attr_show() local
358 return a->show ? a->show(a, sbi, buf) : 0; in f2fs_attr_show()
366 struct f2fs_attr *a = container_of(attr, struct f2fs_attr, attr); in f2fs_attr_store() local
368 return a->store ? a->store(a, sbi, buf, len) : 0; in f2fs_attr_store()
394 static ssize_t f2fs_feature_show(struct f2fs_attr *a, in f2fs_feature_show() argument
397 switch (a->id) { in f2fs_feature_show()