mkfs.f2fs: don't trim on aliased partition
PATCH 1/1 mkfs.f2fs: don't trim on aliased partition
Signed-off-by Jaegeuk Kim <[email protected]>
--- mkfs/f2fs_format_utils.c | 5 +++++ 1 file changed, 5 insertions(+)
mkfs/f2fs_format_utils.c +5 -0
@@ -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" );
Signature · 8 lines
2.47.0.rc1.288.g06298d1525-goog _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by Daeho Jeong <[email protected]>
Thanks,
Quoted 27 lines · On Tue, Oct 15, 2024 at 9:58 AM Jaegeuk Kim via Linux-f2fs-devel…
Signed-off-by Jaegeuk Kim <[email protected]>--- mkfs/f2fs_format_utils.c | 5 +++++ 1 file changed, 5 insertions(+)mkfs/f2fs_format_utils.c +5
-1@@ -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
Quoted 4 lines
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel