Commit Graph

56 Commits

Author SHA1 Message Date
Guillaume Girol 0094461f60 lvm without arguments has returncode 3 2021-02-27 12:00:00 +00:00
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
Yuri Chornoivan 2980b21b8d Update references 2019-11-22 15:45:04 +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
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 622def3b56 Convert more enums to scoped enums. 2018-04-09 15:14:34 +01:00
Andrius Štikonas 17c8772240 Explicitely specify the scope of enum. 2018-04-07 19:54:30 +01:00
Andrius Štikonas 0badfebcb1 lvm: disable error channel for vgs/pvs commands.
Having an error channel can result in unwanted devices, e.g.:
"/dev//dev/mapper/test: read failed after 0 of 4096 at 0: Input/output error"
2017-09-04 19:55:08 +01:00
Andrius Štikonas 7c901593b2 Use slightly more descriptive variable names. 2017-02-05 15:50:56 +00:00
Teo Mrnjavac dcf972b779 [Coverity] Initialize all members.
CID 154913
2016-12-13 16:40:47 +01:00
Andrius Štikonas bb8514e859 Fix handling of encrypted LVM physical volumes. 2016-11-03 14:21:18 +00:00
Andrius Štikonas 5d2bb2f8af Store list of physical volumes in a global variable. 2016-11-03 13:26:14 +00:00
Andrius Štikonas 36202cc1ad Replace complicated QPair type with custom LvmPV class. 2016-11-02 23:06:55 +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 e765316f9e Mark LVM PV as mounted if it is part of Volume Group.
* Add support for online LVM PV resize and check actions.
* Fix support for online actions inside LUKS container.
2016-10-30 01:47:29 +01:00
Andrius Štikonas 559fad9803 Show mount point for swap as "none".
This also silences QFileInfo warning from KMountPoint.
2016-10-03 00:14:46 +01:00
Andrius Štikonas ee6e4469ca Remove unused function. 2016-09-24 23:05:15 +01:00
Andrius Štikonas ef7680030c Remove some no longer necessary functions. 2016-09-18 02:40:30 +01:00
Andrius Štikonas 123369f78b Store the list of LVM Physical Volumes in operationStack.
This is necessary in order to make LVM LV formatted as LVM PV work.
2016-09-10 22:10:25 +01:00
Andrius Štikonas 70a9a0dd9a More optimizations for LVM. 2016-09-08 01:42:04 +01:00
Andrius Štikonas 8f77c6d679 Construct list of LVM PVs from our own device list instead of using pvs. 2016-09-07 14:36:25 +01:00
Andrius Štikonas 4b9f34b109 Do not allow mounting/umounting LVM PVs. 2016-09-06 00:14:44 +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
Andrius Štikonas b5b5ac9cb4 getPESize does not have to be static. 2016-09-04 11:55:49 +01:00
Chantara Tith 28dd42839d More documentations. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 16a2d063e3 More work on C++11 for loops. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 799d213530 Make getFreePV const. 2016-08-15 17:20:50 +01:00
Andrius Štikonas a10c8d3aaa Convert to C++11 for loop where it is safe (avoid detaching Qt objects). 2016-08-15 17:20:50 +01:00
Andrius Štikonas da081d2f29 Add --force to lvm pvcreate in case there are some old file system signatures. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 81a35f0ffd Improve resizing of LVM PVs. 2016-08-15 17:20:50 +01:00
Chantara Tith 61d5e874d8 FIX LVM2 PV resize FIXME. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 8a3ba0a4a6 Remove unused header. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 432e59ac67 Add support for lvm pvmove before doing pvresize. 2016-08-15 17:20:50 +01:00
Chantara Tith 38b324036e Overload getPVSize for QStringList. 2016-08-15 17:20:50 +01:00
Chantara Tith c26e094ca1 Move lvm2_pv functions to static. 2016-08-15 17:20:50 +01:00
Chantara Tith e8bff59040 It makes more sense to have logic for getting list of used PVs in the LvmDevice. 2016-08-15 17:20:50 +01:00
Chantara Tith ad23d6cbce Fix createVG PV list white space problem. 2016-08-15 17:20:50 +01:00
Chantara Tith 036ed02b29 Add used and free PV scan for lvm2_pv. 2016-08-15 17:20:50 +01:00
Chantara Tith a91d65aa47 Move lvm2_pv from regex to field options. Add read used space to lvm pv 2016-08-15 17:20:50 +01:00
Chantara Tith f53cc1b55c Cache lvm2_pv and luks result in finding external tool 2016-08-15 17:20:50 +01:00
Chantara Tith 6360260fae Add support for reading LVM PV info 2016-08-15 17:20:50 +01:00
Chantara Tith 0af98556ac Implement lvm PV resizing 2016-08-15 17:20:50 +01:00
Chantara Tith 0a6de0c2f0 Set VG name as PV mount point 2016-08-15 17:20:50 +01:00
Andrius Štikonas 0c70c66aae Disable MountPointDialog for swap, lvm pv and unknown partitions. 2016-05-24 17:26:12 +01:00
Andrius Štikonas eb4e985933 Use C++11 initialization instead of << for readability. 2016-04-21 22:48:05 +01:00