Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp607552ima; Fri, 1 Feb 2019 08:09:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ9a7XSNTFxKpdvP599vPZkQwWBgV8R0sacqQWuXpxMAzeqB+ikf8Vhr91u7rd9UlFk77zI X-Received: by 2002:a63:dd15:: with SMTP id t21mr2726275pgg.347.1549037340092; Fri, 01 Feb 2019 08:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549037340; cv=none; d=google.com; s=arc-20160816; b=pUvSJrZ+qqt5rbXuaHhEbgqYXkynQBW9nRH7atRrohYzWrOl6A8WB3N7SoSdOXI/oC rWt3VrVQ5gioLgP9G+svXH8sJrTtROXl+y+CHOD+DuA7hwV8hixgEQsz6n129rBtqP2j 97a7cHGaIX1PrFlRbux1jqIrqLdAFiF44nELps3B/sznb/6VKJxmUYDczMZj/7tdnMWn qQreR8owme6zjr0bSdjNZYb7APVBLa0yeBxjuN1xAWCiR/ZeRJHJqinuwTUzX/CrGKJb Q9WTIXGV9g0wGDCNOyPq3Aev2xF9YPXHj++7twHj8brjtYLqiPUtall59ZO3Y6d0yunR S7IQ== 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:to:subject:dkim-signature; bh=u5rVXKC5VgUaVgZNfrszlFN86X/WbwFVyh3tLd8XdBE=; b=BAZ5GEKunAJMmgrSoo5jILQpxtdiv4+AhpBE4HJYZnEIeq/K6aAXW2JKCGRSdcXyYh lEBfx3MDXKO+S6unltHpEoYicOfM+vgrOgGgq6tUrpG6mSpCXjoJB2+oYBGGgCQOH2HP PJ3Tf6df+4704Djiaoigj8YtawjVQcovjnc9TjhBgWlxUiOM13ghbD0tYYk8+R6X6+fD HsqXor86xUHpyze5ne9duuYt9g5Gm3pjepDx4VrGhk6WSiwqAQuhmu46kZQFLY131lXx wOkIOVUP9twPc7p1KJa4GIT2W47I7q8dqbL4juF93zI6zNFYzwY0c4hQHmjc0oFG7/Su dtoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RpPD5p9u; 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 i1si7276653pgi.480.2019.02.01.08.08.43; Fri, 01 Feb 2019 08:09:00 -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=RpPD5p9u; 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 S1727323AbfBAQIi (ORCPT + 99 others); Fri, 1 Feb 2019 11:08:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:43904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbfBAQIi (ORCPT ); Fri, 1 Feb 2019 11:08:38 -0500 Received: from [192.168.0.101] (unknown [49.65.250.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1F3921872; Fri, 1 Feb 2019 16:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549037317; bh=SFcGONuGYdCO4nDQv9W+w2Ih9mIupb5zlOZHgBXFn04=; h=Subject:To:References:From:Date:In-Reply-To:From; b=RpPD5p9uvQAmNmz4Q0U8ordvgXp5kaxOIJEhNUZGYrUF1Py0kHXSo9GpZp4ANhN49 71306E/zjQfpcL94AECyUma/CD/1ttnxzF1I6Sg0LOCBWPpS/hBw0/LtYbIiV+WtOl yW6RTnrY9IvK8mzFWClT2jcQCTEieag4pz7hxKsk= Subject: Re: [f2fs-dev] [PATCH 6/7] f2fs: flush quota blocks after turnning it off To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20190128234717.77225-1-jaegeuk@kernel.org> <20190128234717.77225-6-jaegeuk@kernel.org> From: Chao Yu Message-ID: <629f4b34-381e-7860-c717-3fe54ee15694@kernel.org> Date: Sat, 2 Feb 2019 00:08:27 +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: <20190128234717.77225-6-jaegeuk@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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) >