Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp744931ybm; Wed, 22 May 2019 10:46:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyO1D6AIstOVe7UfvRbWXAKMOi1nuwrJbQYHcJa+IU3X8DYFCqs/NvCjPI5UwCkMQVwR/7b X-Received: by 2002:a17:902:e409:: with SMTP id ci9mr81948562plb.103.1558547172691; Wed, 22 May 2019 10:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558547172; cv=none; d=google.com; s=arc-20160816; b=RHh8bEQWyRoLv5Qo6bAm/YpnJRjtCvtN5t+2VZfSoDLOT29NINdRFZyHb6Y9B5X1Gc YeRPZA/gx2Tx+I1j1FUfp8OX/ygQ5RmKCx2DsPcdTY1a7YUNtvbplFC0OfM+tp2dezYA fO8FT45Xk9iLbDUoBA+qVi33MNMlFOlFzrMZn10tRN7aL3Vz3oVkJXWPCjRzfHRBXFpi O+O8pBkx5+qiio3JdmNGCkEtAQFEvs6Z57lIZQUHRKS/st/zU/TyWrfg8DpkZY1FGHsB Gn9esImuYNe+bMrKI8shyK8qJpFdjiulkqRc4MDFMU7eKu++GxxbfN1cHKmQ4MjPXIGE jdqg== 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=xB6Kn83xjohfkxVRB1RECUGTWlxzGcd932Hg4np7QjA=; b=EUwaEYJtfVvtaAe8UYzO5BdxS/w4AaeR+lf8YgCmwVWecqiqcuktoUXWECVB46fm1y A34OEI6nDeFxqgFy3u1gJ1an1nPynFsXfdeHCCc1CkaJQnFZF8MuxOcu/BHTIlD+lP2H kNcvZ2xLZu0sqDXL6REtOg8SPAikJipSebTOv4wmSJ7yMFLyYFT4zVm8dZE29yUy+h4a b2BKVZDXOBYcrboDdQFHsmZwLAqrpOYuTJAijTntzrbA4bKCFaExEgqRK3sel4qtdkuH l/3oM8NPPB3jNeECTv+UlgdVhu0ph9JXfEPaRypgy6wJIhtpkWZt7OF8HRp+5mkO27Ko nAKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SzL7buq0; 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 r204si28243980pfc.263.2019.05.22.10.45.56; Wed, 22 May 2019 10:46:12 -0700 (PDT) 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=SzL7buq0; 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 S1728835AbfEVRow (ORCPT + 99 others); Wed, 22 May 2019 13:44:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:36548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727984AbfEVRov (ORCPT ); Wed, 22 May 2019 13:44:51 -0400 Received: from localhost (unknown [104.132.1.68]) (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 CC5C121019; Wed, 22 May 2019 17:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558547090; bh=WGpxkLS3O1W5xJkPVT6OtlO6L0fjxSCDqpvjxfdM6e8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SzL7buq0bAzafVDhOU8P3wAUmBGyHpJpmx/A+Wg9G+RBjrePwONfrzYdaLTQ6n0ke xz8NKrRO3GWrfZTLu5+xIfiqvqPnf6DQ0cVkiooeJc32eSX+rfY8IFuTtOPMSTssKH 1IWqBJr6jhO9FgvLdW5ERpUg+ZbExknEYZH5aPHs= Date: Wed, 22 May 2019 10:44:48 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 1/2] Revert "f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG" Message-ID: <20190522174448.GA81051@jaegeuk-macbookpro.roam.corp.google.com> References: <20190521180625.10562-1-jaegeuk@kernel.org> <8e9a4cac-c81b-11ce-0a5a-c6f5caf716c4@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e9a4cac-c81b-11ce-0a5a-c6f5caf716c4@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 05/22, Chao Yu wrote: > On 2019-5-22 2:06, Jaegeuk Kim wrote: > > This reverts commit fb40d618b03978b7cc5820697894461f4a2af98b. > > > > The original patch introduced # of fsck triggers. > > How about pointing out the old issue has been fixed with below patch: > > f2fs-tools: fix to check total valid block count before block allocation > > Otherwise, user should keep kernel commit "f2fs: don't clear > CP_QUOTA_NEED_FSCK_FLAG". Actually, that didn't fix my testing issue, but I found we were not using error control for quota_sysfile. Now I've seen no issue with the below patch. From e1b7de7050fd87b7c20e033b062b1cc6505679d3 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 20 May 2019 16:17:56 -0700 Subject: [PATCH] f2fs: link f2fs quota ops for sysfile This patch reverts: commit fb40d618b039 ("f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG"). We were missing error handlers used in f2fs quota ops. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 6 ++---- fs/f2fs/super.c | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index d0539ddad6e2..89825261d474 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1317,10 +1317,8 @@ static void update_ckpt_flags(struct f2fs_sb_info *sbi, struct cp_control *cpc) if (is_sbi_flag_set(sbi, SBI_QUOTA_SKIP_FLUSH)) __set_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG); - /* - * TODO: we count on fsck.f2fs to clear this flag until we figure out - * missing cases which clear it incorrectly. - */ + else + __clear_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG); if (is_sbi_flag_set(sbi, SBI_QUOTA_NEED_REPAIR)) __set_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG); diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 856f9081c599..34f2adf191ed 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3169,10 +3169,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) #ifdef CONFIG_QUOTA sb->dq_op = &f2fs_quota_operations; - if (f2fs_sb_has_quota_ino(sbi)) - sb->s_qcop = &dquot_quotactl_sysfile_ops; - else - sb->s_qcop = &f2fs_quotactl_ops; + sb->s_qcop = &f2fs_quotactl_ops; sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ; if (f2fs_sb_has_quota_ino(sbi)) { -- 2.19.0.605.g01d371f741-goog