Andrius Štikonas
d68ffeadef
REUSE: SPDX style license headers for src/util.
2020-10-01 00:33:19 +01:00
Andrius Štikonas
8534265421
REUSE: SPDX headers for src/fs/*.
2020-09-28 00:51:18 +01:00
Gaël PORTAY
9d6c98ff4a
Replace FSFeature by QVariantMap
...
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.
2020-03-21 18:09:01 -04:00
Arnaud Ferraris
d24191ebd8
Add support for filesystem-specific 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
2020-01-12 11:58:32 +00:00
Andrius Štikonas
2c7b3f2bfa
Fix resizing of encrypted partitions.
...
BUG: 413883
2019-11-18 21:16:05 +02:00
Shubham Jangra
d1a82f65d4
Revert "Remove redundant includes and refactor"
...
This reverts commit 4229b02fd2
.
2019-06-12 22:11:11 +05:30
Shubham Jangra
4229b02fd2
Remove redundant includes and refactor
2019-06-10 23:07:06 +05:30
Andrius Štikonas
2579d04229
Remove ExternalCommand::waitFor.
...
This is no longer used with KAuth.
ExternalCommand::start now waits until command finishes.
2018-07-21 21:19:34 +01:00
Caio Carvalho
9e6cf4063a
- Refactoring LVM::pvList to be a class with static QList<LvmPV> attribute instead of extern instance.
...
- Moving LVM VG verification in canShrink, canMove, canGrow to isLVMPVinNewlyVG method at ResizeOperation.
- Don't grow LVM PVs that are being targeted by CreateVolumeGroupOperations.
2018-05-09 04:09:17 -03:00
Andrius Štikonas
40f59a4870
Rename LUKS open and close Labels to "Lock" and "Unlock"
...
BUG: 393409
2018-04-23 11:05:44 +03:00
Andrius Štikonas
17c8772240
Explicitely specify the scope of enum.
2018-04-07 19:54:30 +01:00
Andrius Štikonas
738842799a
Make kpmcore link libraries private.
2018-03-31 16:30:53 +01:00
Andrius Štikonas
4069e5112e
Post merge fixes.
...
In kauth branch ExternalCommand::write should be called before start.
2018-01-11 11:45:39 +01:00
Andrius Štikonas
790553aa0b
Merge branch 'smart' into kauth
2018-01-11 11:31:18 +01:00
Andrius Štikonas
1802b7ad05
Add luks2::create method.
2017-12-29 20:38:36 +00:00
Andrius Štikonas
4773f49edc
Initial support for resizing LUKS2 volumes.
...
Does not yet work when LUKS2 is used with dm-integrity.
2017-12-29 20:01:06 +00:00
Andrius Štikonas
f20bea9bf8
Merge branch 'sfdisk' into kauth
2017-12-24 23:40:06 +00:00
Andrius Štikonas
97ccd8d154
Merge branch 'master' into sfdisk
2017-12-24 23:38:39 +00:00
Andrius Štikonas
7aa77f489d
Add FileSystem::Luks2 child class.
2017-12-14 02:08:32 +00:00
Andrius Štikonas
3f562ab0f0
Allow reading LUKS label.
2017-12-13 00:07:55 +00:00
Andrius Štikonas
47429dd1bf
Proof of concept attempt to implement KAuth.
2017-12-10 17:36:39 +00:00
Andrius Štikonas
d27455b6f0
Avoid unnecessary QString encoding/decoding.
...
CCBUG: 384321
2017-12-04 21:19:11 +00:00
Andrius Štikonas
4bf5bb467f
Fix conversion to/from QString/QByteArray
...
BUG: 384321
2017-12-03 12:37:21 +00:00
Andrius Štikonas
17e6c32633
Fix more implicit type conversion warnings.
2017-09-11 13:41:03 +01:00
Andrius Štikonas
6c433c264c
Port FileSystem::luks away from KDiskFreeSpaceInfo.
2017-09-11 12:19:49 +01:00
Andrius Štikonas
7dba4b8245
Record sector size in FileSystem class.
2017-09-03 15:37:14 +01:00
Andrius Štikonas
037380228d
QRegularExpression->QJson
...
lsblk LUKS mapping point parsing now uses json.
2017-07-04 14:42:39 +01:00
Andrius Štikonas
3228fa081a
Use qAsConst in ranged based for loops.
2017-06-04 22:26:24 +01:00
Christian Morlok
b10577e1c7
Fix creation of encrypted volumes
...
We can't rely on the order of lsblk. Check for the type=crypt instead.
BUG: 379205
2017-04-25 19:08:14 +01:00
Andrius Štikonas
b5b3af4b22
Use qCeil to set used sectors for luks file systems.
...
When using LUKS encrypted LVM logical volumes sector size is large and
we cannot assume that result of division is integer. Without this, number of
used extents can be underestimated by one.
2017-01-26 17:40:41 +00:00
Andrius Štikonas
901d01185f
Do not set LUKS logical sector size to 512.
...
This breaks used space reporting for LUKS encrypted LVM LV.
2017-01-25 18:21:25 +01:00
Andrius Štikonas
f8ba25fdfa
Improve used space detection to use fs utils when not mounted.
2017-01-05 17:27:17 +00:00
Teo Mrnjavac
30ac4bb6ab
[Coverity] Initialize all members.
...
CID 147251
2016-12-13 16:46:36 +01:00
Andrius Štikonas
cbe21e7ef9
Fix online resize of encrypted volumes.
2016-12-06 21:42:44 +00:00
Andrius Štikonas
2e960d5c00
Make initLUKS function non-static.
2016-11-30 17:18:51 +00:00
Teo Mrnjavac
52b356e45f
Make sure to always also read outerUuid.
2016-11-30 17:44:03 +01:00
Teo Mrnjavac
5e40017238
Add FS::luks::outerUuid().
2016-11-30 16:42:03 +01:00
Teo Mrnjavac
eb3b90ec9e
Handle cryptsetup luksUUID failure.
2016-11-16 15:20:54 +01:00
Andrius Štikonas
bb8514e859
Fix handling of encrypted LVM physical volumes.
2016-11-03 14:21:18 +00:00
Andrius Štikonas
36202cc1ad
Replace complicated QPair type with custom LvmPV class.
2016-11-02 23:06:55 +00:00
Andrius Štikonas
e103c65b73
Always force LUKS password (in case crypsetup is compiled with libpwquality).
2016-10-30 02:41:24 +00:00
Andrius Štikonas
3272cd3f5f
Do not allow deactivating LUKS containers containing active LVM physical volumes.
2016-10-30 02:31:46 +00:00
Andrius Štikonas
5592c05ef3
Mark luks sector size to be constexpr.
2016-09-12 19:43:58 +01:00
Chantara Tith
874900fe72
Move initLUKS from helpers to FS::luks.
2016-09-12 23:49:20 +07:00
Chantara Tith
c70945b116
Change LUKS default logicalSectorSize to 512
2016-09-12 23:44:17 +07:00
Andrius Štikonas
7c0a32758e
Do not check for cryptsetup executable so often.
2016-09-07 15:14:25 +01:00
Andrius Štikonas
d197b9b06e
Optimize LUKS scanning.
2016-09-06 18:21:17 +01:00
Andrius Štikonas
b95fe45d66
Fix a bug when creating a luks encrypted partition.
2016-09-06 00:25:59 +01:00
Andrius Štikonas
5e5178b3af
Initial work on storing LVM variables during initial scan.
2016-09-05 14:48:36 +01:00
Andrius Štikonas
d83ec394b1
Make Filesystem::create non-const.
2016-09-05 12:10:56 +01:00