linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/4] mkfs.f2fs: remove android features for RO
@ 2021-06-21  2:39 Jaegeuk Kim
  2021-06-21  2:39 ` [f2fs-dev] [PATCH 2/4] fsck|dump.f2fs: add -M to get file map Jaegeuk Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jaegeuk Kim @ 2021-06-21  2:39 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim

We don't need to enable all android features for RO.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 mkfs/f2fs_format_main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index 03eb748170ad..031244d5d67a 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -110,11 +110,16 @@ static void add_default_options(void)
 		/* -d1 -f -O encrypt -O quota -O verity -w 4096 -R 0:0 */
 		c.dbg_lv = 1;
 		force_overwrite = 1;
+		c.wanted_sector_size = 4096;
+		c.root_uid = c.root_gid = 0;
+
+		/* RO doesn't need any other features */
+		if (c.feature & cpu_to_le32(F2FS_FEATURE_RO))
+			return;
+
 		c.feature |= cpu_to_le32(F2FS_FEATURE_ENCRYPT);
 		c.feature |= cpu_to_le32(F2FS_FEATURE_QUOTA_INO);
 		c.feature |= cpu_to_le32(F2FS_FEATURE_VERITY);
-		c.wanted_sector_size = 4096;
-		c.root_uid = c.root_gid = 0;
 		break;
 	}
 #ifdef CONF_CASEFOLD
-- 
2.32.0.288.g62a8d224e6-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, other threads:[~2021-07-08  6:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-21  2:39 [f2fs-dev] [PATCH 1/4] mkfs.f2fs: remove android features for RO Jaegeuk Kim
2021-06-21  2:39 ` [f2fs-dev] [PATCH 2/4] fsck|dump.f2fs: add -M to get file map Jaegeuk Kim
2021-06-23 14:28   ` Chao Yu
2021-06-23 16:04   ` [f2fs-dev] [PATCH 2/4 v2] " Jaegeuk Kim
2021-07-08  6:30     ` Chao Yu
2021-06-21  2:39 ` [f2fs-dev] [PATCH 3/4] f2fs-tools: fix wrong file offset Jaegeuk Kim
2021-06-23 14:47   ` Chao Yu
2021-06-23 16:03     ` Jaegeuk Kim
2021-06-21  2:39 ` [f2fs-dev] [PATCH 4/4] f2fs-tools: add extent cache for each file Jaegeuk Kim
2021-06-23 13:51 ` [f2fs-dev] [PATCH 1/4] mkfs.f2fs: remove android features for RO Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).