Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682355 > unrolled thread

[PATCH] f2fs: no need to create issue_discard_thread if it exists

Started byYunlong Song <yunlong.song@huawei.com>
First post2017-07-06 13:10 +0200
Last post2017-07-07 04:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] f2fs: no need to create issue_discard_thread if it exists Yunlong Song <yunlong.song@huawei.com> - 2017-07-06 13:10 +0200
    Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists Chao Yu <chao@kernel.org> - 2017-07-06 15:20 +0200
      Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists Yunlong Song <yunlong.song@huawei.com> - 2017-07-07 04:10 +0200

#1682355 — [PATCH] f2fs: no need to create issue_discard_thread if it exists

FromYunlong Song <yunlong.song@huawei.com>
Date2017-07-06 13:10 +0200
Subject[PATCH] f2fs: no need to create issue_discard_thread if it exists
Message-ID<u0cPv-3uf-3@gated-at.bofh.it>
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 4c246e3..b48d004 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1417,6 +1417,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi)
 
 	if (SM_I(sbi)->dcc_info) {
 		dcc = SM_I(sbi)->dcc_info;
+		if (dcc->f2fs_issue_discard)
+			return err;
 		goto init_thread;
 	}
 
-- 
1.8.5.2

[toc] | [next] | [standalone]


#1682423

FromChao Yu <chao@kernel.org>
Date2017-07-06 15:20 +0200
Message-ID<u0eRj-4MZ-15@gated-at.bofh.it>
In reply to#1682355
Hi Yunlong,

It looks there is no way to create discard thread redundantly,
so here we don't need to check this?

Thanks,

On 2017/7/6 19:05, Yunlong Song wrote:
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>  fs/f2fs/segment.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 4c246e3..b48d004 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -1417,6 +1417,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi)
>  
>  	if (SM_I(sbi)->dcc_info) {
>  		dcc = SM_I(sbi)->dcc_info;
> +		if (dcc->f2fs_issue_discard)
> +			return err;
>  		goto init_thread;
>  	}
>  
> 

[toc] | [prev] | [next] | [standalone]


#1682873

FromYunlong Song <yunlong.song@huawei.com>
Date2017-07-07 04:10 +0200
Message-ID<u0qSt-5wZ-3@gated-at.bofh.it>
In reply to#1682423
It's fine unless create_discard_cmd_control is used in remount flow in the future.

On 2017/7/6 21:16, Chao Yu wrote:
> Hi Yunlong,
>
> It looks there is no way to create discard thread redundantly,
> so here we don't need to check this?
>
> Thanks,
>
> On 2017/7/6 19:05, Yunlong Song wrote:
>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>> ---
>>  fs/f2fs/segment.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
>> index 4c246e3..b48d004 100644
>> --- a/fs/f2fs/segment.c
>> +++ b/fs/f2fs/segment.c
>> @@ -1417,6 +1417,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi)
>>  
>>  	if (SM_I(sbi)->dcc_info) {
>>  		dcc = SM_I(sbi)->dcc_info;
>> +		if (dcc->f2fs_issue_discard)
>> +			return err;
>>  		goto init_thread;
>>  	}
>>  
>>
> .
>


-- 
Thanks,
Yunlong Song

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web