* [PATCH] f2fs: prevent setting ioprio of thread not in merge mode
@ 2021-02-01 0:57 ` Daeho Jeong
0 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2021-02-01 0:57 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Daeho Jeong
From: Daeho Jeong <daehojeong@google.com>
It causes a crash to change the ioprio of checkpoint thread not in
checkpoint=merge. I fixed that to prevent setting the ioprio of the
thread when checkpoint=merge is not enabled.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
fs/f2fs/sysfs.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 100608bcd517..e38a7f6921dd 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -357,8 +357,12 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
return -EINVAL;
cprc->ckpt_thread_ioprio = IOPRIO_PRIO_VALUE(class, data);
- ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
- cprc->ckpt_thread_ioprio);
+ if (test_opt(sbi, MERGE_CHECKPOINT)) {
+ ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
+ cprc->ckpt_thread_ioprio);
+ if (ret)
+ return ret;
+ }
return count;
}
--
2.30.0.365.g02bc693789-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [f2fs-dev] [PATCH] f2fs: prevent setting ioprio of thread not in merge mode
@ 2021-02-01 0:57 ` Daeho Jeong
0 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2021-02-01 0:57 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Daeho Jeong
From: Daeho Jeong <daehojeong@google.com>
It causes a crash to change the ioprio of checkpoint thread not in
checkpoint=merge. I fixed that to prevent setting the ioprio of the
thread when checkpoint=merge is not enabled.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
fs/f2fs/sysfs.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 100608bcd517..e38a7f6921dd 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -357,8 +357,12 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
return -EINVAL;
cprc->ckpt_thread_ioprio = IOPRIO_PRIO_VALUE(class, data);
- ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
- cprc->ckpt_thread_ioprio);
+ if (test_opt(sbi, MERGE_CHECKPOINT)) {
+ ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
+ cprc->ckpt_thread_ioprio);
+ if (ret)
+ return ret;
+ }
return count;
}
--
2.30.0.365.g02bc693789-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: prevent setting ioprio of thread not in merge mode
2021-02-01 0:57 ` [f2fs-dev] " Daeho Jeong
@ 2021-02-01 22:33 ` Jaegeuk Kim
-1 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2021-02-01 22:33 UTC (permalink / raw)
To: Daeho Jeong; +Cc: linux-kernel, linux-f2fs-devel, kernel-team, Daeho Jeong
Thanks.
Merged into the original patch.
On 02/01, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> It causes a crash to change the ioprio of checkpoint thread not in
> checkpoint=merge. I fixed that to prevent setting the ioprio of the
> thread when checkpoint=merge is not enabled.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
> fs/f2fs/sysfs.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 100608bcd517..e38a7f6921dd 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -357,8 +357,12 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
> return -EINVAL;
>
> cprc->ckpt_thread_ioprio = IOPRIO_PRIO_VALUE(class, data);
> - ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
> - cprc->ckpt_thread_ioprio);
> + if (test_opt(sbi, MERGE_CHECKPOINT)) {
> + ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
> + cprc->ckpt_thread_ioprio);
> + if (ret)
> + return ret;
> + }
>
> return count;
> }
> --
> 2.30.0.365.g02bc693789-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: prevent setting ioprio of thread not in merge mode
@ 2021-02-01 22:33 ` Jaegeuk Kim
0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2021-02-01 22:33 UTC (permalink / raw)
To: Daeho Jeong; +Cc: Daeho Jeong, kernel-team, linux-kernel, linux-f2fs-devel
Thanks.
Merged into the original patch.
On 02/01, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> It causes a crash to change the ioprio of checkpoint thread not in
> checkpoint=merge. I fixed that to prevent setting the ioprio of the
> thread when checkpoint=merge is not enabled.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
> fs/f2fs/sysfs.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 100608bcd517..e38a7f6921dd 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -357,8 +357,12 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
> return -EINVAL;
>
> cprc->ckpt_thread_ioprio = IOPRIO_PRIO_VALUE(class, data);
> - ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
> - cprc->ckpt_thread_ioprio);
> + if (test_opt(sbi, MERGE_CHECKPOINT)) {
> + ret = set_task_ioprio(cprc->f2fs_issue_ckpt,
> + cprc->ckpt_thread_ioprio);
> + if (ret)
> + return ret;
> + }
>
> return count;
> }
> --
> 2.30.0.365.g02bc693789-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-01 22:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 0:57 [PATCH] f2fs: prevent setting ioprio of thread not in merge mode Daeho Jeong
2021-02-01 0:57 ` [f2fs-dev] " Daeho Jeong
2021-02-01 22:33 ` Jaegeuk Kim
2021-02-01 22:33 ` [f2fs-dev] " Jaegeuk Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.