Messages in this thread |  | | Subject | Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data | From | Chao Yu <> | Date | Fri, 10 Jul 2020 11:41:31 +0800 |
| |
On 2020/7/10 11:26, Jaegeuk Kim wrote: > On 07/10, Chao Yu wrote: >> On 2020/7/10 3:05, Jaegeuk Kim wrote: >>> On 07/09, Chao Yu wrote: >>>> On 2020/7/9 13:30, Jaegeuk Kim wrote: >>>>> It doesn't need to bypass flushing quota data in background. >>>> >>>> The condition is used to flush quota data in batch to avoid random >>>> small-sized udpate, did you hit any problem here? >>> >>> I suspect this causes fault injection test being stuck by waiting for inode >>> writeback completion. With this patch, it has been running w/o any issue so far. >>> I keep an eye on this. >> >> Hmmm.. so that this patch may not fix the root cause, and it may hiding the >> issue deeper. >> >> How about just keeping this patch in our private branch to let fault injection >> test not be stuck? until we find the root cause in upstream codes. > > Well, I don't think this hides something. When the issue happens, I saw inodes > being stuck due to writeback while only quota has some dirty data. At that time, > there was no dirty data page from other inodes.
Okay,
> > More specifically, I suspect __writeback_inodes_sb_nr() gives WB_SYNC_NONE and > waits for wb_wait_for_completion().
Did you record any callstack after the issue happened?
Still I'm confused that why directory's data written could be skipped, but quota's data couldn't, what's the difference?
> >> >> Thanks, >> >>> >>> Thanks, >>> >>>> >>>> Thanks, >>>> >>>>> >>>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> >>>>> --- >>>>> fs/f2fs/data.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c >>>>> index 44645f4f914b6..72e8b50e588c1 100644 >>>>> --- a/fs/f2fs/data.c >>>>> +++ b/fs/f2fs/data.c >>>>> @@ -3148,7 +3148,7 @@ static int __f2fs_write_data_pages(struct address_space *mapping, >>>>> if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) >>>>> goto skip_write; >>>>> >>>>> - if ((S_ISDIR(inode->i_mode) || IS_NOQUOTA(inode)) && >>>>> + if (S_ISDIR(inode->i_mode) && >>>>> wbc->sync_mode == WB_SYNC_NONE && >>>>> get_dirty_pages(inode) < nr_pages_to_skip(sbi, DATA) && >>>>> f2fs_available_free_memory(sbi, DIRTY_DENTS)) >>>>> >>> . >>> > . >
|  |