From: Chao Yu Subject: Re: [PATCH] f2fs: check mount option before turn quota on Date: Wed, 6 Jun 2018 18:09:12 +0800 Message-ID: <86517bd1-9315-5f6a-07f4-b04ae47da9bb@huawei.com> References: <1528251122-24907-1-git-send-email-heyunlei@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fQVOi-0001jS-Vi for linux-f2fs-devel@lists.sourceforge.net; Wed, 06 Jun 2018 10:10:32 +0000 Received: from [45.249.212.35] (helo=huawei.com) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fQVOg-00CFda-Ie for linux-f2fs-devel@lists.sourceforge.net; Wed, 06 Jun 2018 10:10:32 +0000 In-Reply-To: <1528251122-24907-1-git-send-email-heyunlei@huawei.com> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Yunlei He , jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: zhangdianfang@huawei.com On 2018/6/6 10:12, Yunlei He wrote: > This patch add a mount option check before turn quota on, > which is same as ext4 does. BTW, both f2fs and ext4 have > no mount options check to enable limits quota on sys file, > is there no need to do this? > > Signed-off-by: Yunlei He > --- > fs/f2fs/super.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index 25863cec..a0264a5 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -1792,6 +1792,9 @@ static int f2fs_quota_on(struct super_block *sb, int type, int format_id, > struct inode *inode; > int err; > > + if (!test_opt(sb, QUOTA)) s/sb/F2FS_SB(sb)... Anyway, this fails tests/generic/082, could you look into the issue. Thanks, > + return -EINVAL; > + > err = f2fs_quota_sync(sb, type); > if (err) > return err; > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot