All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: quota: do not mount as RDWR without QUOTA if quota feature enabled
@ 2018-07-24 12:17 Sheng Yong
  2018-07-24 12:17 ` [PATCH 2/3] f2fs: quota: decrease the lock granularity of statfs_project Sheng Yong
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sheng Yong @ 2018-07-24 12:17 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: miaoxie, linux-f2fs-devel

If quota feature is enabled, quota is on by default. However, if
CONFIG_QUOTA is not built in kernel, dquot entries will not get updated,
which leads to quota inconsistency.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
 fs/f2fs/super.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 0a8e12662174..796a2d756572 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -346,12 +346,6 @@ static int f2fs_check_quota_options(struct f2fs_sb_info *sbi)
 			"QUOTA feature is enabled, so ignore jquota_fmt");
 		F2FS_OPTION(sbi).s_jquota_fmt = 0;
 	}
-	if (f2fs_sb_has_quota_ino(sbi->sb) && f2fs_readonly(sbi->sb)) {
-		f2fs_msg(sbi->sb, KERN_INFO,
-			 "Filesystem with quota feature cannot be mounted RDWR "
-			 "without CONFIG_QUOTA");
-		return -1;
-	}
 	return 0;
 }
 #endif
@@ -774,6 +768,13 @@ static int parse_options(struct super_block *sb, char *options)
 #ifdef CONFIG_QUOTA
 	if (f2fs_check_quota_options(sbi))
 		return -EINVAL;
+#else
+	if (f2fs_sb_has_quota_ino(sbi->sb) && !f2fs_readonly(sbi->sb)) {
+		f2fs_msg(sbi->sb, KERN_INFO,
+			 "Filesystem with quota feature cannot be mounted RDWR "
+			 "without CONFIG_QUOTA");
+		return -EINVAL;
+	}
 #endif
 
 	if (F2FS_IO_SIZE_BITS(sbi) && !test_opt(sbi, LFS)) {
-- 
2.17.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-07-26 11:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 12:17 [PATCH 1/3] f2fs: quota: do not mount as RDWR without QUOTA if quota feature enabled Sheng Yong
2018-07-24 12:17 ` [PATCH 2/3] f2fs: quota: decrease the lock granularity of statfs_project Sheng Yong
2018-07-25 15:41   ` Chao Yu
2018-07-24 12:17 ` [PATCH 3/3] f2fs: quota: fix incorrect error message and comments Sheng Yong
2018-07-25 15:44   ` Chao Yu
2018-07-26  1:58     ` Sheng Yong
2018-07-26 11:24   ` [PATCH v2] f2fs: quota: fix incorrect comments Sheng Yong
2018-07-26 11:33     ` Chao Yu
2018-07-25 15:27 ` [PATCH 1/3] f2fs: quota: do not mount as RDWR without QUOTA if quota feature enabled Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.