Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp215569ybt; Thu, 9 Jul 2020 20:27:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznrt25wz/F9PPHoZuoE/t2mx48rTD7aB8C6UC35UvO6jj4iRCdZKCXm/qKYOiuAosk87FE X-Received: by 2002:a17:906:4685:: with SMTP id a5mr56844227ejr.46.1594351642041; Thu, 09 Jul 2020 20:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594351642; cv=none; d=google.com; s=arc-20160816; b=spz5JP7gJz2j9Mkd8Dxj76KA6/1P5AI4hGQOA51p8EHiwourfLaP2mk5TJWBjCZdEA n0QM5pSoPBiXKY9xhGk5M89CXtXlUI8dty3zec8zrZgMQe4GiP7yfsedjZAigV5bbC/r zvlYijQAIGDYiJgOrMr3vaVnJZrDsizCX4IT/TuwTUQXMdtMtnRxdE/x/+IumUVGI3+6 +1o3oldYaa3KqYBFN4qt20RerLzCf7gF/C0gdH/AceXlxDpwODIb+61t8TOU+bnba+UL LyNaRgraPxVjfoBj8CzjEnTTzTuGBItnoG+1L0794KUd2EFvuoAPYxM0lWd7nOldvLHm 59ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EB42yh8nb7kWZUUAot+CAmJ6bjAXkP/CR6Yt7smC7MU=; b=msehZrmaZei+kICABmGqSF36cZhFjEWxfoqko5W3bPncqJBYnmq5+/LNvhCjscRjsi rSqH2UbdXr/ONwAROiPRAoZv+ZS0nj6pVx26nmSxkKyaVhXNTprkfZPNpVn1wU4AJHgs Sq49vGjDzeUxZRXHWD4DJIrLNAyIQS2hhtvELuh37nggS2kRtzX+ec3diVBUM3fnRF5Y x48PLe4L1dejM1de7jA5BZzwMT87QIT2Y+qcLkfSWOQNYhwbwoOgjy+vEXWACJjche2E +wF3V+6BrvQwTPxvnryZpo6z9M4o6un3N+5MKmp3AnF401NJ8f5gTGcthYn+wVp1esZq HbOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b9CaNGGM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz26si3051456ejb.651.2020.07.09.20.26.59; Thu, 09 Jul 2020 20:27:22 -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; dkim=pass header.i=@kernel.org header.s=default header.b=b9CaNGGM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726989AbgGJD0R (ORCPT + 99 others); Thu, 9 Jul 2020 23:26:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:53636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726495AbgGJD0R (ORCPT ); Thu, 9 Jul 2020 23:26:17 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BADC62065C; Fri, 10 Jul 2020 03:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594351576; bh=7gmNfMi/rLNIENPbSZx/x5H/MTRJkr2euZEuEvVPgUM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b9CaNGGMcFwZccyYv5fh7EOp8Y1iQNgL/U5aRlkn/hkKwXR6hDo5OEPj2dUz8ncyL O+yY0glchFxS3hl8voOv6GiuHIQt4DKSyDS5R3GBod4TnXRwZb954mpzTTR3E+Qf69 V/qcV/+xeB2c3x7DypQ5D+xqTPX5ktJDR3L5+ypE= Date: Thu, 9 Jul 2020 20:26:16 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Subject: Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data Message-ID: <20200710032616.GC545837@google.com> References: <20200709053027.351974-1-jaegeuk@kernel.org> <2f4207db-57d1-5b66-f1ee-3532feba5d1f@huawei.com> <20200709190545.GA3001066@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. More specifically, I suspect __writeback_inodes_sb_nr() gives WB_SYNC_NONE and waits for wb_wait_for_completion(). > > 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)) > >>> > > . > >