linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Chunhai Guo <guochunhai@vivo.com>, jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: replace blk_finish_plug() with blk_flush_plug()
Date: Wed, 30 Aug 2023 22:05:11 +0800	[thread overview]
Message-ID: <eb97c111-4ea8-787c-b3e3-ce02909e1f3d@kernel.org> (raw)
In-Reply-To: <20230830035248.4051323-1-guochunhai@vivo.com>

On 2023/8/30 11:52, Chunhai Guo wrote:
> The commit 344150999b7f ("f2fs: fix to avoid potential deadlock") only
> requires unplugging current->plug. Using blk_finish_plug() is unnecessary
> as it sets current->plug as NULL and prevents wb_writeback() from using
> plug in subsequent loops. Instead, use blk_flush_plug() as a replacement.
> 
> Signed-off-by: Chunhai Guo <guochunhai@vivo.com>
> ---
>   fs/f2fs/data.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 5d9697717353..936a95464186 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -3343,8 +3343,7 @@ static int __f2fs_write_data_pages(struct address_space *mapping,

It missed to cover f2fs_write_node_pages()?

Thanks,

>   		atomic_inc(&sbi->wb_sync_req[DATA]);
>   	else if (atomic_read(&sbi->wb_sync_req[DATA])) {
>   		/* to avoid potential deadlock */
> -		if (current->plug)
> -			blk_finish_plug(current->plug);
> +		blk_flush_plug(current->plug, false);
>   		goto skip_write;
>   	}
>   


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2023-08-30 14:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30  3:52 [f2fs-dev] [PATCH] f2fs: replace blk_finish_plug() with blk_flush_plug() Chunhai Guo via Linux-f2fs-devel
2023-08-30 14:05 ` Chao Yu [this message]
2023-08-31  7:14   ` Chunhai Guo via Linux-f2fs-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb97c111-4ea8-787c-b3e3-ce02909e1f3d@kernel.org \
    --to=chao@kernel.org \
    --cc=guochunhai@vivo.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).