f2fs: update changes in upstream on GC_URGENT_HIGH
This fixes the missing change.
Note that, the below commit id is from mainline, original patch to catch up.
Fixes: 0e5e81114de1 ("f2fs: add GC_URGENT_LOW mode in gc_urgent")
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This commit is contained in:
@@ -357,7 +357,9 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!strcmp(a->attr.name, "gc_urgent")) {
|
if (!strcmp(a->attr.name, "gc_urgent")) {
|
||||||
if (t == 1) {
|
if (t == 0) {
|
||||||
|
sbi->gc_mode = GC_NORMAL;
|
||||||
|
} else if (t == 1) {
|
||||||
sbi->gc_mode = GC_URGENT_HIGH;
|
sbi->gc_mode = GC_URGENT_HIGH;
|
||||||
if (sbi->gc_thread) {
|
if (sbi->gc_thread) {
|
||||||
sbi->gc_thread->gc_wake = 1;
|
sbi->gc_thread->gc_wake = 1;
|
||||||
@@ -368,7 +370,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
|
|||||||
} else if (t == 2) {
|
} else if (t == 2) {
|
||||||
sbi->gc_mode = GC_URGENT_LOW;
|
sbi->gc_mode = GC_URGENT_LOW;
|
||||||
} else {
|
} else {
|
||||||
sbi->gc_mode = GC_NORMAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user