Bug 386771 - mkfs.f2fs needs -f for overwriting an existing filesystem
Summary: mkfs.f2fs needs -f for overwriting an existing filesystem
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-12 12:30 UTC by Luca Weiss
Modified: 2017-11-12 13:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 3.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Weiss 2017-11-12 12:30:44 UTC
I tried to create a new partition on an sd card with f2fs but it fails with

Create a new partition table (type: gpt) on ‘/dev/mmcblk0’ 
Job: Create new partition table on device ‘/dev/mmcblk0’ 
Create new partition table on device ‘/dev/mmcblk0’: Success
Create a new partition table (type: gpt) on ‘/dev/mmcblk0’: Success

Create a new partition (29,72 GiB, f2fs) on ‘/dev/mmcblk0’ 
Job: Create new partition on device ‘/dev/mmcblk0’ 
Create new partition ‘/dev/mmcblk0p1’: Success

Job: Create file system ‘f2fs’ on partition ‘/dev/mmcblk0p1’ 
Command: mkfs.f2fs -l /dev/mmcblk0p1 
	F2FS-tools: mkfs.f2fs Ver: 1.9.0 (2017-09-21)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = 
Info: Trim is enabled
	/dev/mmcblk0p1 appears to contain an existing filesystem (vfat).
	Use the -f option to force overwrite. 
Create file system ‘f2fs’ on partition ‘/dev/mmcblk0p1’: Error
Create a new partition (29,72 GiB, f2fs) on ‘/dev/mmcblk0’: Error
Comment 1 Andrius Štikonas 2017-11-12 12:47:26 UTC
The way upstream introduced this is a bit annoying.

The older versions reject -f parameter cause they don't have it. But the newer don't work without it.

Thanks for reporting. I'll try to workaround this a bit...
Comment 2 Andrius Štikonas 2017-11-12 13:08:22 UTC
Git commit 58f2decdf84225fa640035e5e82a22ecf7870ba0 by Andrius Štikonas.
Committed on 12/11/2017 at 13:07.
Pushed by stikonas into branch 'master'.

Support newer f2fs-tools versions.

M  +11   -0    src/fs/f2fs.cpp
M  +4    -0    src/fs/f2fs.h

https://commits.kde.org/kpmcore/58f2decdf84225fa640035e5e82a22ecf7870ba0
Comment 3 Andrius Štikonas 2017-11-12 13:08:44 UTC
Can you try to test this? My distro does not provide new f2fs-tools.