Linux-f2fs-devel Archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] mkfs.f2fs: kill heap allocation
Date: Wed, 21 Feb 2024 17:21:13 +0800	[thread overview]
Message-ID: <20240221092113.403851-1-chao@kernel.org> (raw)

No one uses this feature. Let's kill it.

Signed-off-by: Chao Yu <chao@kernel.org>
---
 include/f2fs_fs.h       | 1 -
 man/mkfs.f2fs.8         | 6 +-----
 mkfs/f2fs_format.c      | 8 --------
 mkfs/f2fs_format_main.c | 5 +----
 4 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 5e9dfad..b59997c 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -1475,7 +1475,6 @@ struct f2fs_configuration {
 	char *vol_uuid;
 	uint16_t s_encoding;
 	uint16_t s_encoding_flags;
-	int heap;
 	int32_t kd;
 	int32_t dump_fd;
 	struct device_info devices[MAX_DEVICES];
diff --git a/man/mkfs.f2fs.8 b/man/mkfs.f2fs.8
index 6670003..0dc367b 100644
--- a/man/mkfs.f2fs.8
+++ b/man/mkfs.f2fs.8
@@ -8,10 +8,6 @@ mkfs.f2fs \- create an F2FS file system
 .SH SYNOPSIS
 .B mkfs.f2fs
 [
-.B \-a
-.I heap-based-allocation
-]
-[
 .B \-c
 .I device-list
 ]
@@ -110,7 +106,7 @@ The exit code returned by
 is 0 on success and 1 on failure.
 .SH OPTIONS
 .TP
-.BI \-a " heap-based-allocation"
+.BI \-a " heap-based-allocation" (deprecated)
 Specify 1 or 0 to enable/disable heap based block allocation policy.
 If the value is equal to 1, each of active log areas are initially
 assigned separately according to the whole volume size.
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 63d675e..8f632f8 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -548,14 +548,6 @@ static int f2fs_prepare_super_block(void)
 		c.cur_seg[CURSEG_HOT_DATA] = 0;
 		c.cur_seg[CURSEG_COLD_DATA] = 0;
 		c.cur_seg[CURSEG_WARM_DATA] = 0;
-	} else if (c.heap) {
-		c.cur_seg[CURSEG_HOT_NODE] =
-				last_section(last_zone(total_zones));
-		c.cur_seg[CURSEG_WARM_NODE] = prev_zone(CURSEG_HOT_NODE);
-		c.cur_seg[CURSEG_COLD_NODE] = prev_zone(CURSEG_WARM_NODE);
-		c.cur_seg[CURSEG_HOT_DATA] = prev_zone(CURSEG_COLD_NODE);
-		c.cur_seg[CURSEG_COLD_DATA] = 0;
-		c.cur_seg[CURSEG_WARM_DATA] = next_zone(CURSEG_COLD_DATA);
 	} else if (c.zoned_mode) {
 		c.cur_seg[CURSEG_HOT_NODE] = 0;
 		if (c.zoned_model == F2FS_ZONED_HM) {
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index f3316f7..c98e73c 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -49,7 +49,6 @@ static void mkfs_usage()
 {
 	MSG(0, "\nUsage: mkfs.f2fs [options] device [sectors]\n");
 	MSG(0, "[options]:\n");
-	MSG(0, "  -a heap-based allocation [default:0]\n");
 	MSG(0, "  -b filesystem block size [default:4096]\n");
 	MSG(0, "  -c device1[,device2,...] up to 7 additional devices, except meta device\n");
 	MSG(0, "  -d debug level [default:0]\n");
@@ -84,8 +83,6 @@ static void f2fs_show_info()
 	MSG(0, "\n    F2FS-tools: mkfs.f2fs Ver: %s (%s)\n\n",
 				F2FS_TOOLS_VERSION,
 				F2FS_TOOLS_DATE);
-	if (c.heap == 0)
-		MSG(0, "Info: Disable heap-based policy\n");
 
 	MSG(0, "Info: Debug level = %d\n", c.dbg_lv);
 	if (c.extension_list[0])
@@ -191,7 +188,7 @@ static void f2fs_parse_options(int argc, char *argv[])
 			c.dbg_lv = -1;
 			break;
 		case 'a':
-			c.heap = atoi(optarg);
+			MSG(0, "Info: heap allocation is deprecated\n");
 			break;
 		case 'b':
 			c.blksize = atoi(optarg);
-- 
2.40.1



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

                 reply	other threads:[~2024-02-21  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240221092113.403851-1-chao@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).