Re: [f2fs-dev] [PATCH RESEND] f2fs: fix concurrent problem for updating free bitmap

2017-11-21 Thread Chao Yu
x-f2fs-de...@lists.sourceforge.net >> Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: fix concurrent problem for >> updating free bitmap >> >> Hi, >> >>> @@ -1870,6 +1895,11 @@ static bool add_free_nid(struct f2fs_sb_info >>> *sbi, nid_t nid, bool build)

RE: [f2fs-dev] [PATCH RESEND] f2fs: fix concurrent problem for updating free bitmap

2017-11-21 Thread LiFan
> -Original Message- > From: Chao Yu [mailto:yuch...@huawei.com] > Sent: Monday, November 20, 2017 11:00 AM > To: LiFan; 'Chao Yu'; 'Jaegeuk Kim' > Cc: linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sourceforge.net > Subject: Re: [f2fs-de

Re: [f2fs-dev] [PATCH RESEND] f2fs: fix concurrent problem for updating free bitmap

2017-11-19 Thread Chao Yu
Hi, > @@ -1870,6 +1895,11 @@ static bool add_free_nid(struct f2fs_sb_info *sbi, > nid_t nid, bool build) Need to use radix_tree_preload(GFP_NOFS | __GFP_NOFAIL), otherwise, for out-of-memory case, we may skip bitmap updating. Thanks, On 2017/11/14 15:28, LiFan wrote: > alloc_nid_failed and sca

[f2fs-dev] [PATCH RESEND] f2fs: fix concurrent problem for updating free bitmap

2017-11-13 Thread LiFan
alloc_nid_failed and scan_nat_page can be called at the same time, and we haven't protected add_free_nid and update_free_nid_bitmap with the same nid_list_lock. That could lead to Thread AThread B - __build_free_nids - scan_nat_page