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 1/5] f2fs: fix to wait page writeback before update
Date: Fri, 8 Mar 2024 14:20:33 +0800	[thread overview]
Message-ID: <73296ac6-8b00-4131-ab78-a127cdbff4b9@kernel.org> (raw)
In-Reply-To: <20200619224755.GA60059@google.com>

On 2020/6/20 6:47, Jaegeuk Kim wrote:
>>>>>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
>>>>>> index 3268f8dd59bb..1862073b96d2 100644
>>>>>> --- a/fs/f2fs/file.c
>>>>>> +++ b/fs/f2fs/file.c
>>>>>> @@ -1250,6 +1250,7 @@ static int __clone_blkaddrs(struct inode *src_inode, struct inode *dst_inode,
>>>>>>   				f2fs_put_page(psrc, 1);
>>>>>>   				return PTR_ERR(pdst);
>>>>>>   			}
>>>>>> +			f2fs_wait_on_page_writeback(pdst, DATA, true, true);
> 
> Do you mean pdst can be under writeback?

Jaegeuk,

Look back this again, is it possible that pdst is writebacking
in below race condition? or am I missing something?

Thread A				GC Thread
- f2fs_move_file_range
  - filemap_write_and_wait_range(dst)
					- gc_data_segment
					 - f2fs_down_write(dst)
					 - move_data_page
					  - set_page_writeback(dst_page)
					  - f2fs_submit_page_write
					 - f2fs_up_write(dst)
  - f2fs_down_write(dst)
  - __exchange_data_block
   - __clone_blkaddrs
    - f2fs_get_new_data_page
    - memcpy_page

Thanks,


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

      parent reply	other threads:[~2024-03-08  6:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18  6:36 [f2fs-dev] [PATCH 1/5] f2fs: fix to wait page writeback before update Chao Yu
2020-06-18  6:36 ` [f2fs-dev] [PATCH 2/5] f2fs: add prefix for exported symbols Chao Yu
2020-06-18  6:36 ` [f2fs-dev] [PATCH 3/5] f2fs: shrink node_write lock coverage Chao Yu
2020-06-19  5:56   ` Jaegeuk Kim
2020-06-18  6:36 ` [f2fs-dev] [PATCH 4/5] f2fs: clean up parameter of f2fs_allocate_data_block() Chao Yu
2020-06-18  6:36 ` [f2fs-dev] [PATCH 5/5] f2fs: show more debug info for per-temperature log Chao Yu
2020-06-24 22:31   ` Jaegeuk Kim
2020-06-28  1:35     ` Chao Yu
2020-06-18 23:59 ` [f2fs-dev] [PATCH 1/5] f2fs: fix to wait page writeback before update Jaegeuk Kim
2020-06-19  1:44   ` Chao Yu
2020-06-19  5:49     ` Jaegeuk Kim
2020-06-19  6:44       ` Chao Yu
2020-06-19 22:47         ` Jaegeuk Kim
2020-06-20  0:52           ` Chao Yu
2020-06-21 16:38             ` Jaegeuk Kim
2020-06-22  0:51               ` Chao Yu
2020-06-24 15:55                 ` Jaegeuk Kim
2020-06-28  1:26                   ` Chao Yu
2024-03-08  6:20           ` Chao Yu [this message]

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=73296ac6-8b00-4131-ab78-a127cdbff4b9@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).