[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <73296ac6-8b00-4131-ab78-a127cdbff4b9@kernel.org>
Date: Fri, 8 Mar 2024 14:20:33 +0800
From: Chao Yu <chao@...nel.org>
To: Jaegeuk Kim <jaegeuk@...nel.org>
Cc: linux-f2fs-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] f2fs: fix to wait page writeback before update
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,
Powered by blists - more mailing lists