linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: no need to create issue_discard_thread if it exists
@ 2017-07-06 11:05 Yunlong Song
  2017-07-06 13:16 ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Yunlong Song @ 2017-07-06 11:05 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, sylinux, yunlong.song
  Cc: miaoxie, bintian.wang, linux-fsdevel, linux-f2fs-devel,
	linux-kernel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists
  2017-07-06 11:05 [PATCH] f2fs: no need to create issue_discard_thread if it exists Yunlong Song
@ 2017-07-06 13:16 ` Chao Yu
  2017-07-07  2:02   ` Yunlong Song
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2017-07-06 13:16 UTC (permalink / raw)
  To: Yunlong Song, jaegeuk, yuchao0, sylinux
  Cc: miaoxie, bintian.wang, linux-fsdevel, linux-f2fs-devel,
	linux-kernel

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;
>  	}
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists
  2017-07-06 13:16 ` Chao Yu
@ 2017-07-07  2:02   ` Yunlong Song
  0 siblings, 0 replies; 3+ messages in thread
From: Yunlong Song @ 2017-07-07  2:02 UTC (permalink / raw)
  To: Chao Yu, jaegeuk, yuchao0, sylinux
  Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel

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



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-07  2:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-06 11:05 [PATCH] f2fs: no need to create issue_discard_thread if it exists Yunlong Song
2017-07-06 13:16 ` Chao Yu
2017-07-07  2:02   ` Yunlong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).