linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 3/4] f2fs: atomic: fix to truncate pagecache before on-disk metadata truncation
Date: Fri, 26 Jul 2024 09:06:53 +0800	[thread overview]
Message-ID: <ef08e1e5-94af-4944-aaed-37705360bcd6@kernel.org> (raw)
In-Reply-To: <ZqK7eC9W9HVweTOJ@google.com>

On 2024/7/26 4:54, Jaegeuk Kim wrote:
> On 06/25, Chao Yu wrote:
>> We should always truncate pagecache while truncating on-disk data.
>>
>> Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts")
>> Signed-off-by: Chao Yu <chao@kernel.org>
>> ---
>>   fs/f2fs/file.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
>> index 2203904383a6..0355cb054521 100644
>> --- a/fs/f2fs/file.c
>> +++ b/fs/f2fs/file.c
>> @@ -2185,6 +2185,7 @@ static int f2fs_ioc_start_atomic_write(struct file *filp, bool truncate)
>>   		clear_inode_flag(fi->cow_inode, FI_INLINE_DATA);
>>   	} else {
>>   		/* Reuse the already created COW inode */
>> +		truncate_setsize(inode, 0);
> 
> 		fi->cow_inode?

Oh, yes, let me fix this.

Thanks,

> 
>>   		ret = f2fs_do_truncate_blocks(fi->cow_inode, 0, true);
>>   		if (ret) {
>>   			f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
>> -- 
>> 2.40.1


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

  reply	other threads:[~2024-07-26  1:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25  3:13 [f2fs-dev] [PATCH 1/4] f2fs: atomic: fix to avoid racing w/ GC Chao Yu
2024-06-25  3:13 ` [f2fs-dev] [PATCH 2/4] f2fs: atomic: fix to not allow GC to pollute atomic_file Chao Yu
2024-06-25  3:13 ` [f2fs-dev] [PATCH 3/4] f2fs: atomic: fix to truncate pagecache before on-disk metadata truncation Chao Yu
2024-07-25 20:54   ` Jaegeuk Kim
2024-07-26  1:06     ` Chao Yu [this message]
2024-06-25  3:13 ` [f2fs-dev] [PATCH 4/4] f2fs: atomic: fix to forbid dio in atomic_file Chao Yu
2024-07-02 12:13   ` Sunmin Jeong
2024-08-05 23:30 ` [f2fs-dev] [PATCH 1/4] f2fs: atomic: fix to avoid racing w/ GC patchwork-bot+f2fs

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=ef08e1e5-94af-4944-aaed-37705360bcd6@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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).