The object QVariant is a native object in the Qt world that represents
any type of value: boolean, integer, string, floating point, date,
UUID...
This change updates the API to use the object QVariant and provide a
more flexible API to represent the filesystem features.
In some cases, it may be necessary to create a filesystem with specific features
enabled/disabled.
This PR makes it possible to create filesystems this way. It does so
by introducing a new m_Features member variable and the createWithFeatures()
function to the FileSystem base class. The latter function is implemented
for the btrfs, ext2/3/4 and FAT filesystems.
Additionnally, the CreateFileSystemJob has been modified to enable
creating/formatting filesystems with specific features enabled.
Differential Revision: https://phabricator.kde.org/D21903
CCBUG: 342178
Some filesystems require mountpoint while some deviceNode to change file system
label only. So split writeLabel action into online and offline actions.
It's output looks like:
Label: 'test' uuid: d23f3138-c8ea-449e-9155-015ce4f6e2e6
Total devices 1 FS bytes used 131072
devid 1 size 981467136 used 252706816 path /dev/sdb1
FS bytes used number is actual data on btrfs volume. However,
to resize successfully we need to know actual space used by data
and metadata. That's why we read size from devid (i.e. 252706816).
Btrfs volumes can span over multiple devices, so we must make sure
that we are reading devid corresponding to the correct device node.
BUG: 353333