From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: zangyangyang1 <zangyangyang1@xiaomi.com>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages
Date: Thu, 26 Dec 2024 21:27:09 +0800 [thread overview]
Message-ID: <f49a164f-45fc-4c4a-8e71-019922b68968@kernel.org> (raw)
In-Reply-To: <20241224114621.1220350-1-zangyangyang1@xiaomi.com>
On 2024/12/24 19:46, zangyangyang1 via Linux-f2fs-devel wrote:
> When f2fs_write_single_data_page fails, f2fs_write_cache_pages
> will use the last 'submitted' value incorrectly, which will cause
> 'nwritten' and 'wbc->nr_to_write' calculation errors
> > Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com>
> ---
> fs/f2fs/data.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 94f7b084f601..083acd7f5420 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -3179,6 +3179,7 @@ static int f2fs_write_cache_pages(struct address_space *mapping,
> continue;
> }
> #endif
> + submitted = 0;
How about initializing "submitted" in f2fs_write_single_data_page()
to cover all cases in where we call f2fs_write_single_data_page()?
Thanks,
> ret = f2fs_write_single_data_page(folio,
> &submitted, &bio, &last_block,
> wbc, io_type, 0, true);
> --
> 2.43.2
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2024-12-26 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-24 11:46 [f2fs-dev] [PATCH] f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages zangyangyang1 via Linux-f2fs-devel
2024-12-26 13:27 ` Chao Yu via Linux-f2fs-devel [this message]
2024-12-27 2:56 ` 臧阳阳
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=f49a164f-45fc-4c4a-8e71-019922b68968@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=zangyangyang1@xiaomi.com \
/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 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.