From: Jaegeuk Kim via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [f2fs-dev] [PATCH] mkfs.f2fs: don't trim on aliased partition
Date: Tue, 15 Oct 2024 16:56:16 +0000 [thread overview]
Message-ID: <20241015165616.65434-1-jaegeuk@kernel.org> (raw)
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
mkfs/f2fs_format_utils.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c
index 1c2003e8d107..1a9746a77184 100644
--- a/mkfs/f2fs_format_utils.c
+++ b/mkfs/f2fs_format_utils.c
@@ -48,6 +48,11 @@ static int trim_device(int i)
uint64_t bytes = dev->total_sectors * dev->sector_size;
int fd = dev->fd;
+ if (dev->alias_filename) {
+ MSG(0, "Info: [%s] Skip Discarding as aliased\n", dev->path);
+ return 0;
+ }
+
stat_buf = malloc(sizeof(struct stat));
if (stat_buf == NULL) {
MSG(1, "\tError: Malloc Failed for trim_stat_buf!!!\n");
--
2.47.0.rc1.288.g06298d1525-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next reply other threads:[~2024-10-15 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 16:56 Jaegeuk Kim via Linux-f2fs-devel [this message]
2024-10-15 17:01 ` [f2fs-dev] [PATCH] mkfs.f2fs: don't trim on aliased partition Daeho Jeong
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=20241015165616.65434-1-jaegeuk@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=jaegeuk@kernel.org \
/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 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.