Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp222335ybt; Thu, 9 Jul 2020 20:42:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvObGZkbauoWibQvJnQ2UO1QOCjSspwohHNcoYpphvolHQ27l/LYlxq0iU54MmphPYmtpV X-Received: by 2002:a50:ee84:: with SMTP id f4mr73289394edr.183.1594352576748; Thu, 09 Jul 2020 20:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594352576; cv=none; d=google.com; s=arc-20160816; b=sIOY2Opszpi9cNkbxFyePXyuUPfYtmTzmiunoAKTfqqD8K14bJOFoDaZrMfWg/zLHt IBkW20UxqrADsYoSwSx2g8ZYfD0YJvRsoVB/e6PQpTMveq6ofGs3uYB1lL2Sj1sM/CAB Lzx75HWiNLN9TKtQHnlMR/no5h3YaRkZvgjl/DdOFPqKVJM5RphAUHSKjF2yPD8qNt6N KlZ7BTJTafIn4zHgHwHcqGe6tjlRbjkapMY1C0bsQWMMa7d0dwc+asoDI/xxvKiQ+YNZ hS5ZCtfK+EZcG+Aj+Gd+Dxe8CZenE1QZGhrpNRW0eWYbAFzBmmFEdyOo6kfTzZshB3Ig FAZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=oR/tWBzZ6mA9HMtqRLLm/EDdbE16zxa/5Jg0ucBiRWY=; b=CJZUHuArPt7HqQp6IWS4e82GCSzDm5dtNm7XKRkZ0OhnuYi2yYTYdQzdGEY/Fu4fJf 1qKPwrYw5Ytz3LTT1OK4nr+h6LqkefRdJNPFOUXwEL566MiZ0WdDJJa/NMe595Y12der fr6UHha0uuSGT/ft+5JawtqFTBdWeA9csRVvlPAdK/NKwKxRLgzf9PGgH8iO2zt78ed9 0bE0WoSSELhf0Q5U75+EuCQ2Wg1oUwmG5dB81uMBDHQsfwmglARjq8u8YMxMdF4oSFsj 76evLcISAq/EcGTu0RC8cqs0MdQmxOv5Y0ei9azP/Vb/L/Mp8G5tabL1HEl3uIJWwfzW HRSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm10si3110065edb.208.2020.07.09.20.42.32; Thu, 09 Jul 2020 20:42:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbgGJDli (ORCPT + 99 others); Thu, 9 Jul 2020 23:41:38 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44348 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726495AbgGJDli (ORCPT ); Thu, 9 Jul 2020 23:41:38 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D1C9AD50D3901E4563EC; Fri, 10 Jul 2020 11:41:36 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.213) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 10 Jul 2020 11:41:32 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data To: Jaegeuk Kim CC: , , References: <20200709053027.351974-1-jaegeuk@kernel.org> <2f4207db-57d1-5b66-f1ee-3532feba5d1f@huawei.com> <20200709190545.GA3001066@google.com> <20200710032616.GC545837@google.com> From: Chao Yu Message-ID: <01d0db54-eee1-f6cd-76c3-ebe59a7abae4@huawei.com> Date: Fri, 10 Jul 2020 11:41:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200710032616.GC545837@google.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>>>> --- >>>>> 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)) >>>>> >>> . >>> > . >