All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix the way to wake up issue_flush thread
@ 2018-05-03  7:45 ` Yunlong Song
  0 siblings, 0 replies; 4+ messages in thread
From: Yunlong Song @ 2018-05-03  7:45 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush")
uses waitqueue_active to wake up issue_flush thread, but there is no
wait entry to wake in this queue, so change it back to use the original
fcc->dispatch_list to wake up issue_flush thread.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 503a98a..5aa5ee4e 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -612,7 +612,7 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
 	/* update issue_list before we wake up issue_flush thread */
 	smp_mb();
 
-	if (waitqueue_active(&fcc->flush_wait_queue))
+	if (!fcc->dispatch_list)
 		wake_up(&fcc->flush_wait_queue);
 
 	if (fcc->f2fs_issue_flush) {
-- 
1.8.5.2

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

* [PATCH] f2fs: fix the way to wake up issue_flush thread
@ 2018-05-03  7:45 ` Yunlong Song
  0 siblings, 0 replies; 4+ messages in thread
From: Yunlong Song @ 2018-05-03  7:45 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush")
uses waitqueue_active to wake up issue_flush thread, but there is no
wait entry to wake in this queue, so change it back to use the original
fcc->dispatch_list to wake up issue_flush thread.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 503a98a..5aa5ee4e 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -612,7 +612,7 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
 	/* update issue_list before we wake up issue_flush thread */
 	smp_mb();
 
-	if (waitqueue_active(&fcc->flush_wait_queue))
+	if (!fcc->dispatch_list)
 		wake_up(&fcc->flush_wait_queue);
 
 	if (fcc->f2fs_issue_flush) {
-- 
1.8.5.2

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

* Re: [PATCH] f2fs: fix the way to wake up issue_flush thread
  2018-05-03  7:45 ` Yunlong Song
@ 2018-05-03  7:57   ` Yunlong Song
  -1 siblings, 0 replies; 4+ messages in thread
From: Yunlong Song @ 2018-05-03  7:57 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

Please avoid this patch, I make a mistake.

On 2018/5/3 15:45, Yunlong Song wrote:
> Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush")
> uses waitqueue_active to wake up issue_flush thread, but there is no
> wait entry to wake in this queue, so change it back to use the original
> fcc->dispatch_list to wake up issue_flush thread.
>
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>   fs/f2fs/segment.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 503a98a..5aa5ee4e 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -612,7 +612,7 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
>   	/* update issue_list before we wake up issue_flush thread */
>   	smp_mb();
>   
> -	if (waitqueue_active(&fcc->flush_wait_queue))
> +	if (!fcc->dispatch_list)
>   		wake_up(&fcc->flush_wait_queue);
>   
>   	if (fcc->f2fs_issue_flush) {

-- 
Thanks,
Yunlong Song

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

* Re: [PATCH] f2fs: fix the way to wake up issue_flush thread
@ 2018-05-03  7:57   ` Yunlong Song
  0 siblings, 0 replies; 4+ messages in thread
From: Yunlong Song @ 2018-05-03  7:57 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song
  Cc: linux-kernel, linux-f2fs-devel, miaoxie

Please avoid this patch, I make a mistake.

On 2018/5/3 15:45, Yunlong Song wrote:
> Commit 6f890df0 ("f2fs: fix out-of-order execution in f2fs_issue_flush")
> uses waitqueue_active to wake up issue_flush thread, but there is no
> wait entry to wake in this queue, so change it back to use the original
> fcc->dispatch_list to wake up issue_flush thread.
>
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>   fs/f2fs/segment.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 503a98a..5aa5ee4e 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -612,7 +612,7 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
>   	/* update issue_list before we wake up issue_flush thread */
>   	smp_mb();
>   
> -	if (waitqueue_active(&fcc->flush_wait_queue))
> +	if (!fcc->dispatch_list)
>   		wake_up(&fcc->flush_wait_queue);
>   
>   	if (fcc->f2fs_issue_flush) {

-- 
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] 4+ messages in thread

end of thread, other threads:[~2018-05-03  7:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03  7:45 [PATCH] f2fs: fix the way to wake up issue_flush thread Yunlong Song
2018-05-03  7:45 ` Yunlong Song
2018-05-03  7:57 ` Yunlong Song
2018-05-03  7:57   ` Yunlong Song

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.