diff --git a/CHANGES-3.2 b/CHANGES-3.2 index c1eb11caa..4ab226302 100644 --- a/CHANGES-3.2 +++ b/CHANGES-3.2 @@ -31,6 +31,8 @@ will be removed in that release. Use the *preservefiles* module instead. if the SSID or username contained non-ASCII characters **and** the default Python text-file encoding was set to ASCII. The files are now read and written in UTF-8, explicitly. #1848 + - *partition* always sets *bigtime* option on XFS filesystems, if possible. + Requires sufficiently-recent xfsprogs. #1874 - *preservefiles* was missing some necessary features, needed for it to replace the deprecated log-file-saving functionality in the *umount* module. (Thanks Erik and Joe for testing) #1851 diff --git a/src/modules/partition/jobs/FormatPartitionJob.cpp b/src/modules/partition/jobs/FormatPartitionJob.cpp index 1ccc6e617..63d233426 100644 --- a/src/modules/partition/jobs/FormatPartitionJob.cpp +++ b/src/modules/partition/jobs/FormatPartitionJob.cpp @@ -14,6 +14,7 @@ #include "core/KPMHelpers.h" #include "partition/FileSystem.h" +#include "utils/CalamaresUtilsSystem.h" #include "utils/Logger.h" #include @@ -67,7 +68,18 @@ FormatPartitionJob::prettyStatusMessage() const Calamares::JobResult FormatPartitionJob::exec() { - return KPMHelpers::execute( CreateFileSystemOperation( *m_device, *m_partition, m_partition->fileSystem().type() ), - tr( "The installer failed to format partition %1 on disk '%2'." ) - .arg( m_partition->partitionPath(), m_device->name() ) ); + const auto fsType = m_partition->fileSystem().type(); + auto r = KPMHelpers::execute( CreateFileSystemOperation( *m_device, *m_partition, fsType ), + tr( "The installer failed to format partition %1 on disk '%2'." ) + .arg( m_partition->partitionPath(), m_device->name() ) ); + if ( fsType == FileSystem::Xfs && r.succeeded() ) + { + // We are going to try to set modern timestamps for the filesystem, + // (ignoring whether this succeeds). Requires a sufficiently-new + // xfs_admin and xfs_repair and might be made obsolete by newer + // kpmcore releases. + CalamaresUtils::System::runCommand( { "xfs_admin", "-O", "bigtime=1", m_partition->partitionPath() }, + std::chrono::seconds( 60 ) ); + } + return r; }