Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4810158imj; Wed, 13 Feb 2019 01:14:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IbjAzS8hB+A1EIq3Wd6YpwSKO9B5tLpRkjpm7KiM+jIYrQUTc7UWuJDrnPaR2bCXR/YtdmT X-Received: by 2002:a17:902:22f:: with SMTP id 44mr8737157plc.137.1550049253426; Wed, 13 Feb 2019 01:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550049253; cv=none; d=google.com; s=arc-20160816; b=AhpL73doIQ+qSmux69o8d1HIviNzN/XN96Ncr17c5+1hwNFOEjGbCQkyl0GgEXrJho Rk9yGcglc7olZEEBocsyx7EZea0tGoSGrwXE1P3YLMDl1RinzmdkDF28Wj/8V5d1GCdE 67WzDZ/k444ylyFX42Cf0ghKX8HFvEVH+7thaepsRQpdldu8F9f+6vwhS32yJnYQ1ehO qxc55V4kVYMRgKG+dPa+ljFjbDb3usgSGw6pWfwPuNOFiXndCALDjB/jOaUeuwoaqdwC 24VJSiPWaYr10THj8YGgF1qlJKMwe6uvdyVm6tYAdqyG9UUp8TJoGn3m031ibkg8+pfB ODZA== 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=aRtO5ekqSHrIfpFyuiGtF0dbBf3P0RZZy2vYyzFQAVk=; b=Z16R8kNj/8yp+j9zjHh+vk6LRWxwvGXpJmFNaR/S7ltko4M0xcGDnKk/aUlksws+b5 JJBsn0djVGJXuhP5obe5MqRpyiXX7H68yPudcBpuVElmIB9p7D1auLi3hkem5PaqKcuv dmRckD+Nk8jEOqq69vBJSxFwXWHhAsX4kolNowv3K7FJW6f9jkQMcvi+IlPb68m7kBse SGvWdC5lYc3itF0bTySote7uBsiyycLhRJsArDqu8j3E7iZqIyk03UrbkupVO0N2CZY9 yVFf0J80R8nDzfxDq0iM8W6pxMEoevvrbMInySny596grNfWi3sBsXAjrRKfVnRYAjqs EnKQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si9112857pgh.51.2019.02.13.01.13.57; Wed, 13 Feb 2019 01:14:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730918AbfBMD1T (ORCPT + 99 others); Tue, 12 Feb 2019 22:27:19 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3195 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727346AbfBMD1T (ORCPT ); Tue, 12 Feb 2019 22:27:19 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9AFA828ACBFDD0DE59CF; Wed, 13 Feb 2019 11:27:16 +0800 (CST) Received: from [127.0.0.1] (10.134.22.195) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Wed, 13 Feb 2019 11:27:12 +0800 Subject: Re: [f2fs-dev] [PATCH 6/7] f2fs: flush quota blocks after turnning it off To: Jaegeuk Kim , Chao Yu CC: , References: <20190128234717.77225-1-jaegeuk@kernel.org> <20190128234717.77225-6-jaegeuk@kernel.org> <629f4b34-381e-7860-c717-3fe54ee15694@kernel.org> <20190204165934.GB15646@jaegeuk-macbookpro.roam.corp.google.com> From: Chao Yu Message-ID: <499c3f3c-3ef4-5412-d4df-8bcfc7a558be@huawei.com> Date: Wed, 13 Feb 2019 11:27:25 +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: <20190204165934.GB15646@jaegeuk-macbookpro.roam.corp.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 2019/2/5 0:59, Jaegeuk Kim wrote: > 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. Alright, not a big deal. :) Reviewed-by: Chao Yu Thanks, > >> >> 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) >>> > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > >