2021-09-30 01:09:36

by Keoseong Park

[permalink] [raw]
Subject: [PATCH v2] f2fs: fix to use WHINT_MODE

Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6),
it cannot be set to NR_CURSEG_TYPE(8).
That is, whint_mode is always off.

Therefore, the condition is changed from NR_CURSEG_TYPE to NR_CURSEG_PERSIST_TYPE.

Cc: Chao Yu <[email protected]>
Reported-by: Huan Tang <[email protected]>
Signed-off-by: Fengnan Chang <[email protected]>
Signed-off-by: Keoseong Park <[email protected]>
---
v1 -> v2:
* Merge Signed-off and Reported tags for the same fix patch.

fs/f2fs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 78ebc306ee2b..86eeb019cc52 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1292,7 +1292,7 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
/* Not pass down write hints if the number of active logs is lesser
* than NR_CURSEG_PERSIST_TYPE.
*/
- if (F2FS_OPTION(sbi).active_logs != NR_CURSEG_TYPE)
+ if (F2FS_OPTION(sbi).active_logs != NR_CURSEG_PERSIST_TYPE)
F2FS_OPTION(sbi).whint_mode = WHINT_MODE_OFF;

if (f2fs_sb_has_readonly(sbi) && !f2fs_readonly(sbi->sb)) {
--
2.17.1


2021-10-09 04:25:33

by Chao Yu

[permalink] [raw]
Subject: Re: [PATCH v2] f2fs: fix to use WHINT_MODE

On 2021/9/30 8:59, Keoseong Park wrote:
> Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6),
> it cannot be set to NR_CURSEG_TYPE(8).
> That is, whint_mode is always off.
>
> Therefore, the condition is changed from NR_CURSEG_TYPE to NR_CURSEG_PERSIST_TYPE.
>

Fixes: d0b9e42ab615 (f2fs: introduce inmem curseg)

> Cc: Chao Yu <[email protected]>
> Reported-by: Huan Tang <[email protected]>
> Signed-off-by: Fengnan Chang <[email protected]>
> Signed-off-by: Keoseong Park <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,

2021-10-12 02:21:25

by Keoseong Park

[permalink] [raw]
Subject: RE: Re: [PATCH v2] f2fs: fix to use WHINT_MODE

Hi Chao,

>On 2021/9/30 8:59, Keoseong Park wrote:
>> Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6),
>> it cannot be set to NR_CURSEG_TYPE(8).
>> That is, whint_mode is always off.
>>
>> Therefore, the condition is changed from NR_CURSEG_TYPE to NR_CURSEG_PERSIST_TYPE.
>>
>
>Fixes: d0b9e42ab615 (f2fs: introduce inmem curseg)
>
>> Cc: Chao Yu <[email protected]>
>> Reported-by: Huan Tang <[email protected]>
>> Signed-off-by: Fengnan Chang <[email protected]>
>> Signed-off-by: Keoseong Park <[email protected]>
>
>Reviewed-by: Chao Yu <[email protected]>

Thank you for your review.

Best Regards,
Keoseong

>
>Thanks,
>