File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ enum {
41
41
ATGC_INFO , /* struct atgc_management */
42
42
};
43
43
44
+ static const char * gc_mode_names [MAX_GC_MODE ] = {
45
+ "GC_NORMAL" ,
46
+ "GC_IDLE_CB" ,
47
+ "GC_IDLE_GREEDY" ,
48
+ "GC_IDLE_AT" ,
49
+ "GC_URGENT_HIGH" ,
50
+ "GC_URGENT_LOW" ,
51
+ "GC_URGENT_MID"
52
+ };
53
+
44
54
struct f2fs_attr {
45
55
struct attribute attr ;
46
56
ssize_t (* show )(struct f2fs_attr * , struct f2fs_sb_info * , char * );
@@ -316,8 +326,13 @@ static ssize_t f2fs_sbi_show(struct f2fs_attr *a,
316
326
return sysfs_emit (buf , "%u\n" , sbi -> compr_new_inode );
317
327
#endif
318
328
329
+ if (!strcmp (a -> attr .name , "gc_urgent" ))
330
+ return sysfs_emit (buf , "%s\n" ,
331
+ gc_mode_names [sbi -> gc_mode ]);
332
+
319
333
if (!strcmp (a -> attr .name , "gc_segment_mode" ))
320
- return sysfs_emit (buf , "%u\n" , sbi -> gc_segment_mode );
334
+ return sysfs_emit (buf , "%s\n" ,
335
+ gc_mode_names [sbi -> gc_segment_mode ]);
321
336
322
337
if (!strcmp (a -> attr .name , "gc_reclaimed_segments" )) {
323
338
return sysfs_emit (buf , "%u\n" ,
You can’t perform that action at this time.
0 commit comments