partitionmanager: force creation of nilfs2 filesystem

due to some Linux kernel issues (see LibPartedPartitionTable::commit())
even after partition table (re)creation the filesystem may still exist.
note the same is done for btrfs, ntfs and some other filesystem types

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-13 19:53:23 +02:00
parent 1bfc437dfb
commit 7c847f3a8f

View file

@ -115,7 +115,7 @@ namespace FS
bool nilfs2::create(Report& report, const QString& deviceNode) const bool nilfs2::create(Report& report, const QString& deviceNode) const
{ {
ExternalCommand cmd(report, "mkfs.nilfs2", QStringList() << deviceNode); ExternalCommand cmd(report, "mkfs.nilfs2", QStringList() << "-f" << deviceNode);
return cmd.run(-1) && cmd.exitCode() == 0; return cmd.run(-1) && cmd.exitCode() == 0;
} }