Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4055096ima; Mon, 4 Feb 2019 09:26:27 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia1NG2zFsXC0j/18Tzkh3n6CAnKnRS6I3BrGgRjMtkmzwciz23AZ+RU28w5V1XPSA3Th2mO X-Received: by 2002:a65:4946:: with SMTP id q6mr388842pgs.201.1549301186939; Mon, 04 Feb 2019 09:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549301186; cv=none; d=google.com; s=arc-20160816; b=uFUK448bdlQsWAPzxtbYkVTXaGsqh6QgzBosV0NlUx00pv+5XU6jSdfS/e1fvIL3xz fD4Xu8vWorH3Jf9KVuTKSIGOXWyhYye75UZ8kQx5waV8ldBLcUk4Uv5y8PN1Z0I3YrQ5 p9AVYbmXwDLx7A9R60c6kAg6fvVdF6I1n6j3ws9lEVpNcsayC6NF4YOA2BHyumbazrsS QvtJLyLTMnlWMRPO45S1yRYGQoj6FeSVUKh87cYhYC2SLEBdby+WFnEJvjm768XmRLXr Ai3mJN4EGb98Db2/rI4LkG75ZIq8H1G4T2dFydGpwTLvZj20zbrxuUgaUoHnrGEc4ezM DzmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Lh+1upWLDAbrhlBgoKDPaxt4udSDeepSaTLzHGxUb+A=; b=kuwFZZkX5DfnSKKnBIHPM2M/tjbBnLIwlsaNtNO97z9Aqm1OqF8rUOSnGLYCHCqFGH p7wYkwAlGoRE4uLUMwts4qWshjsdK74znZ+4luHmO2AT0d054I/Tdz2r8Oagn6iFeWBO M61QEZVxPLdvcHl4i/kpNTNCdKkVbWp5IyjJ6n9CO32c1/J+6M3YbFtv+7rMAtA+3WAA h7MbKiSkFtr1ZGBfqcD/D96I/pNJh+mGGuh+hNZSTWIoDC+flTwNWSqnLnxiPxm50GcM xE5F/bkd9bmwG0gL0i5JW4LFx1uMhOBQLZnIJ/ubxncnOc6kBpdk2jWs3lHMTWkiU++J ujog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eWKWcv9i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id t11si492218plo.293.2019.02.04.09.26.11; Mon, 04 Feb 2019 09:26:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eWKWcv9i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730150AbfBDQ7f (ORCPT + 99 others); Mon, 4 Feb 2019 11:59:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:39376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbfBDQ7f (ORCPT ); Mon, 4 Feb 2019 11:59:35 -0500 Received: from localhost (unknown [104.132.1.80]) (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 B02A220815; Mon, 4 Feb 2019 16:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549299574; bh=dOQ/GgSznbfCaSbOEp5h0wJVN9uLWyKcj4S7kNNB/9Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eWKWcv9iHLxL1w2JWH4q1PUZhRkULfON/H1iuKGeCsANvp9c6/beqZb0ekgqU4F3b XxOrbm773KudJBzF1lqrDF8Bzrhuv8Z8WZHlGx2dPg+XTDK0eddu1B62az3CqVWQW4 vAQTIWKsoSq9/H50+yy4keLhqKMnfgOt0Fdyw4Y0= Date: Mon, 4 Feb 2019 08:59:34 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 6/7] f2fs: flush quota blocks after turnning it off Message-ID: <20190204165934.GB15646@jaegeuk-macbookpro.roam.corp.google.com> References: <20190128234717.77225-1-jaegeuk@kernel.org> <20190128234717.77225-6-jaegeuk@kernel.org> <629f4b34-381e-7860-c717-3fe54ee15694@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <629f4b34-381e-7860-c717-3fe54ee15694@kernel.org> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02, Chao Yu wrote: > On 2019-1-29 7:47, Jaegeuk Kim wrote: > > After quota_off, we'll get some dirty blocks. If put_super don't have a chance > > to flush them by checkpoint, it causes NULL pointer exception in end_io after > > iput(node_inode). (e.g., by checkpoint=disable) > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/super.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > > index 5e1f8573a17f..7694cb350734 100644 > > --- a/fs/f2fs/super.c > > +++ b/fs/f2fs/super.c > > @@ -2026,6 +2026,12 @@ void f2fs_quota_off_umount(struct super_block *sb) > > set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR); > > } > > } > > + /* > > + * In case of checkpoint=disable, we must flush quota blocks. > > checkpoint=disable is one of the cases, right? e.g. IO error can be another case? > > So here I guess we need to change the comments a bit for that. I didn't test other cases, but checkpoint=disable could give real errors through some tests. So, basically, I'd like to keep known cases only here. > > Thanks, > > > + * This can cause NULL exception for node_inode in end_io, since > > + * put_super already dropped it. > > + */ > > + sync_filesystem(sb); > > } > > > > static void f2fs_truncate_quota_inode_pages(struct super_block *sb) > >