Commit Graph

465 Commits

Author SHA1 Message Date
Andrius Štikonas 90e40af590 @dev -> @param. 2016-08-15 17:20:50 +01:00
Chantara Tith 28dd42839d More documentations. 2016-08-15 17:20:50 +01:00
Chantara Tith a8139278db Add deactivatable check to deactivate VG operation. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 3eda1d79c6 Make sure to activate all LVM LVs on start. 2016-08-15 17:20:50 +01:00
Chantara Tith eb3910679c Add all LVM devices to the bottom of the devices list. 2016-08-15 17:20:50 +01:00
Chantara Tith fabde86139 Remove device's partitionTable when deactivated. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 8a3c11774c Make variable names slightly more consistent thruoght kmpcore.
Add more doxygen comments.
2016-08-15 17:20:50 +01:00
Andrius Štikonas 69647e816e Simplify QStringList->QString conversion. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 47837843c5 Simplify construction of PV list. 2016-08-15 17:20:50 +01:00
Chantara Tith 426a9385cd Remove unused includes. 2016-08-15 17:20:50 +01:00
Chantara Tith 69536b1129 Remove unused parameters from LvmDevice. 2016-08-15 17:20:50 +01:00
Chantara Tith 6fd0c7a0db API changes, Refactor and Raname to a consistant interface. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 4de925735e Convert some for loops into for ranged based loops. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 40ff0861a8 Convert most of the remaining foreach cases. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 9c524c40fe Fix a compilation error in KPM. 2016-08-15 17:20:50 +01:00
Andrius Štikonas ca2e46a6e0 More work on C++11 for loops. 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 9ed640084d Fix broken include guard. 2016-08-15 17:20:50 +01:00
Andrius Štikonas cadb80e264 Show the describtion of resize LVM VG as one line. 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
Chantara Tith 25bbce4975 A small dirty hack to keep track of all the PVs that to be added to any VG. 2016-08-15 17:20:50 +01:00
Chantara Tith 6915187fb2 Add activating LVM LV and VG. 2016-08-15 17:20:50 +01:00
Chantara Tith 3b26d39d3c Add deactivating VG operation. 2016-08-15 17:20:50 +01:00
Chantara Tith d033dc9827 Add deactivating VG and LV jobs. 2016-08-15 17:20:50 +01:00
Chantara Tith ca2bbb27d7 Add deactivating LVM LV and VG. 2016-08-15 17:20:50 +01:00
Chantara Tith 5befd7484e Decouple VG scan and system scan. 2016-08-15 17:20:50 +01:00
Chantara Tith 77ff25e160 Move LVM deviceNodeList and LvPathList to public. 2016-08-15 17:20:50 +01:00
Chantara Tith 4b7289fa0d Add UUID for LV filesystem. 2016-08-15 17:20:50 +01:00
Chantara Tith 67ca8f7d63 Store device pointer for RemoveVolumeGroupOperation for preview uses. 2016-08-15 17:20:50 +01:00
Chantara Tith f115383d8c Resizing Volume Group preview. 2016-08-15 17:20:50 +01:00
Chantara Tith 467759d0a9 Set partitionTable Last/First sector setter as public. 2016-08-15 17:20:50 +01:00
Chantara Tith 53b154fe16 Add internal storage to LVM Device to keep track of its LVs and PVs. 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 8c58ffe60f Fix ResizeVolumeGroupJob Type. This fixes the build warnings. 2016-08-15 17:20:50 +01:00
Chantara Tith 5447768a76 LUKS static cast here should be sufficient. 2016-08-15 17:20:50 +01:00
Chantara Tith 61d5e874d8 FIX LVM2 PV resize FIXME. 2016-08-15 17:20:50 +01:00
Chantara Tith 0d09853bd4 Remove hardcoded 4096 payloadOffset. 2016-08-15 17:20:50 +01:00
Chantara Tith bc0cd8c411 Enable smartStatus for Disk Device only. 2016-08-15 17:20:50 +01:00
Chantara Tith 20c79023c8 Micro optimization. calling one external function instead of two. 2016-08-15 17:20:50 +01:00
Chantara Tith c3c718615d Add LVM snapshotting functionality. 2016-08-15 17:20:50 +01:00
Chantara Tith 484c1765ed Reduce the calls of external functions to speed up scanning time. 2016-08-15 17:20:50 +01:00
Chantara Tith 87e9bf9cb5 House-cleaning, removing finished TODO and FIXME tasks. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 510feefc55 Various small cleanups. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 8a3ba0a4a6 Remove unused header. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 2a62bc4b14 Fix crashes in LVM scanner when external device is unplugged without deactivating LVM partitions.
This commit removes stderror channel from output of external commands.
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
Andrius Štikonas 54a78b150d Do not limit number of partitions in Volume Manager Devices. 2016-08-15 17:20:50 +01:00
Andrius Štikonas fd8c81921e Get rid of unused LVM flag for LVM LV. 2016-08-15 17:20:50 +01:00
Chantara Tith 1c7dd64e68 Move LVM scanning logic from DeviceScanner to LvmDevice. 2016-08-15 17:20:50 +01:00
Chantara Tith 12a74b4a2b Use VG as PV mount point. 2016-08-15 17:20:50 +01:00
Chantara Tith 97c20ef236 Fix Luks over LVM resizing. Hardcode 512 as the sector instead of LVM PE size. 2016-08-15 17:20:50 +01:00
Chantara Tith cbb077ffbd House-cleaning and removing irrelevant TODO. 2016-08-15 17:20:50 +01:00
Chantara Tith 4d78cad920 Deactivate VG before removing it. 2016-08-15 17:20:50 +01:00
Chantara Tith 0952ffb11f Hardcode LUKS payload offset return value in byte size instead of sector number. 2016-08-15 17:20:50 +01:00
Chantara Tith 27290f04f3 Handle LUKS inside LVM. still need to fix incorrect sectorUsed. 2016-08-15 17:20:50 +01:00
Chantara Tith 0feb7a7330 Display preview for LV operation. 2016-08-15 17:20:50 +01:00
Chantara Tith 52ee15f3c0 Rephrashing comment. 2016-08-15 17:20:50 +01:00
Andrius Štikonas da0dabc50d Fix displaying resize widget with small number of sectors. 2016-08-15 17:20:50 +01:00
Chantara Tith 254ac012af Add functionality to specify PE size when creating VG group. 2016-08-15 17:20:50 +01:00
Chantara Tith bef1085ce7 Fix LVM volume showing incorrect preview when creating new LV. 2016-08-15 17:20:50 +01:00
Chantara Tith 85c7106ab9 Move LvmDevice member variables from 32 bits to 64 bits. 2016-08-15 17:20:50 +01:00
Chantara Tith 042878b66f Add optional destination partitions to LVM movePV. This also helps preventing moving data back and forth when resizing. 2016-08-15 17:20:50 +01:00
Andrius Štikonas 5edebbc32b Fix integer overflow. 2016-08-15 17:20:50 +01:00
Chantara Tith 3d0df854b5 Handle case when the to-be-moved PV is not used. 2016-08-15 17:20:50 +01:00
Chantara Tith 7e9889bce6 Initial work on Resize operation and move/resize jobs. 2016-08-15 17:20:50 +01:00
Chantara Tith b211dc03e3 Remove canRemove. 2016-08-15 17:20:50 +01:00
Chantara Tith 17d3d9305a Refactor functions for getting list of PV and LV. 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 c5472f2162 Handle LvmDevice's getField case when VG name is not supplied. 2016-08-15 17:20:50 +01:00
Chantara Tith 0cfc323f84 Add LVM PV move. 2016-08-15 17:20:50 +01:00
Chantara Tith c74a61e513 Initial work on removeVolume Operation and Job. 2016-08-15 17:20:50 +01:00
Chantara Tith ef7b4003b7 Move LVM removeVG parameter to LvmDevice instead of QString of VG name. 2016-08-15 17:20:50 +01:00
Chantara Tith 0476f9df83 Move createvolumegroup operation and job parameter to QStringList 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 167432844e Add removeVG lvmdevice. And, Change createVG to accpeting QStringList instead. 2016-08-15 17:20:50 +01:00
Chantara Tith e5fa4cc465 Initial work on create volume operation and job. 2016-08-15 17:20:50 +01:00
Chantara Tith 32b978074f Add LvmDevice createVG. 2016-08-15 17:20:50 +01:00
Chantara Tith 3c229f8a5a Add freeSetors for partitionTable 2016-08-15 17:20:50 +01:00
Chantara Tith e9ff3c874a Remove else clause 2016-08-15 17:20:50 +01:00
Chantara Tith 818ab34ce9 Move LVM totalPE to 64 bits 2016-08-15 17:20:50 +01:00
Chantara Tith e50f7e65bf Disable createPartitionTable action for LVM device. 2016-08-15 17:20:50 +01:00
Chantara Tith fd3580e62f LVM LV resize Operation 2016-08-15 17:20:50 +01:00
Chantara Tith ff2bf7b022 Fix LV used space. 2016-08-15 17:20:50 +01:00
Chantara Tith 49e2462919 Use partionPath for new LV partition 2016-08-15 17:20:50 +01:00
Chantara Tith 41d6a21bf2 Better LVM operations report 2016-08-15 17:20:50 +01:00
Chantara Tith ab6df5ff86 Move from creating unallocated LVM partitio manually to PartitionTable 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 3b7eda5933 Add LVM operations 2016-08-15 17:20:50 +01:00
Chantara Tith 933ecc9cce Add Label for LVM partition's filesystem 2016-08-15 17:20:50 +01:00
Chantara Tith a07e57cbb5 Add LVM delete partition job 2016-08-15 17:20:50 +01:00
Chantara Tith fedfc0d440 Fix PartitionTable sector representation and used space for LVM partition 2016-08-15 17:20:50 +01:00
Chantara Tith 713c26ded0 Use KMountPoint for LvmDevice's Partition 2016-08-15 17:20:50 +01:00
Chantara Tith 0e54626355 Move scanPartitions to LVM Field 2016-08-15 17:20:50 +01:00
Chantara Tith aeaecad6fb Move from regex to LVM Field options 2016-08-15 17:20:50 +01:00
Chantara Tith 3170e0a6a9 Refactor and add UUID to LvmDevice 2016-08-15 17:20:50 +01:00
Chantara Tith bd892fd2d6 Construct PartitionTable and Partition in LvmDevice 2016-08-15 17:20:50 +01:00
Chantara Tith 103b5343d6 Initial work on LvmDevice 2016-08-15 17:20:50 +01:00
Chantara Tith fcc8a7c992 Initial Device separation 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 c96682d022 Do not exclude read only devices by default. 2016-08-12 16:47:52 +01:00
Andrius Štikonas b0dccc1c36 Also enable LUKS for F2FS and nilfs2 filesystems. 2016-08-08 02:03:45 +01:00
Andrius Štikonas 4d25524e91 Add support for resizing online. 2016-08-08 02:01:35 +01:00
l10n daemon script 4bb370bffc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-08-06 09:57:16 +00:00
Andrius Štikonas 0f33fe07c9 Fix coverity issues and some other minor simplifications. 2016-08-05 13:55:56 +01:00
Andrius Štikonas ea99bcc76f Correctly report used space of FAT partitions whose dirty bit is set.
BUG: 366313
2016-08-02 21:41:09 +01:00
l10n daemon script 465aec251d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-08-01 09:52:41 +00:00
l10n daemon script 63881893e1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-07-31 09:28:45 +00:00
Andrius Štikonas 0e9298baf8 Revert "Add KAuth helper to detectFileSystem."
This reverts commit 71921cf500.
2016-07-29 18:15:28 +01:00
Andrius Štikonas 918cf2ffa4 Use more compact syntax for passing and returning kauth helper arguments. 2016-07-29 14:19:12 +01:00
l10n daemon script c30a83a5b9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-07-29 09:28:55 +00:00
Andrius Štikonas a8b35c56a3 Fix btrfs support. 2016-07-27 20:55:35 +01:00
l10n daemon script e18dc61196 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-07-27 09:27:38 +00:00
l10n daemon script 0b39056431 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-07-26 10:44:10 +00:00
Andrius Štikonas 71921cf500 Add KAuth helper to detectFileSystem. 2016-07-25 16:33:49 +01:00
l10n daemon script cb7a3d26c5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-07-25 09:52:46 +00:00
Andrius Štikonas c4b28aa91f Revert "Use udevadm for detecting file system type."
udevadm seems to suffer from race conditions and sometimes returns exit code 4.

This reverts commit 5ea32b446c.
2016-07-24 21:36:56 +01:00
Andrius Štikonas 5ea32b446c Use udevadm for detecting file system type. 2016-07-24 15:18:27 +01:00
Andrius Štikonas 78df451ea0 Add forgotten file. 2016-07-24 10:08:05 +01:00
Andrius Štikonas 2e9166d2d4 Improve comment of major device numbers.
Exclude read-only block devices.
2016-07-23 22:01:38 +01:00
Andrius Štikonas c8e9c72d88 Look for more type of block devices. 2016-07-22 15:53:15 +01:00
Andrius Štikonas b5d1529370 excludeReadOnly->excludeLoop. 2016-07-22 13:18:34 +01:00
Andrius Štikonas 4a0b8f8efb Use lsblk to detect devices. 2016-07-22 12:56:59 +01:00
Andrius Štikonas e64a82ff19 Use KAuth to get privileges needed for detecting partitions. 2016-07-22 12:00:01 +01:00
Andrius Štikonas 99886f32fc Add more warning tags. 2016-07-18 12:50:52 +01:00
Andrius Štikonas 39e419a36e Use <warning> KUIT tags. 2016-07-18 12:21:06 +01:00
Andrius Štikonas 3a2b78e143 Improve semantic markup of translations. 2016-07-17 23:41:00 +01:00
Andrius Štikonas 9d040e6081 Use reverse iterator. 2016-07-08 00:57:16 +01:00
Andrius Štikonas 4ba9971de9 Do not use obsolete type. 2016-07-06 20:44:32 +01:00
Andrius Štikonas e437da6091 Also check whether HFS+ shrink support is available. 2016-06-12 16:15:18 +01:00
Andrius Štikonas 2514f7d8f4 Use diskdev_cmds instead of obsolete hfsplusutils for HFS+ file systems. 2016-06-12 13:33:04 +01:00
Andrius Štikonas b6911285dc Adjust maximum capacity for fat32, jfs and reiserfs. 2016-06-09 22:07:23 +01:00
Andrius Štikonas 35c7f9749e Also reduce max capacity for ext2 and ext3 file systems. 2016-06-09 19:46:21 +01:00
Andrius Štikonas 3756ec45da Reduce maximum capacity of FAT16 file systems by 1 MiB. 2016-06-09 19:22:56 +01:00
Andrius Štikonas 5e982b5b1e Fix memory leaks. 2016-06-02 13:46:16 +01:00
Andrius Štikonas 09711cdf1d Whitespace fixes. 2016-06-01 21:00:31 +01:00
Andrius Štikonas 8ae2ea3006 Make sure file system is not mounted before deleting it.
Sometimes user might try to mount manually and then delete partition
without refreshing state in KPM.
2016-05-26 18:47:34 +01:00
Andrius Štikonas 0c70c66aae Disable MountPointDialog for swap, lvm pv and unknown partitions. 2016-05-24 17:26:12 +01:00
Andrius Štikonas 3d57b3211a Convert remaining signals to the new syntax. 2016-05-24 01:37:15 +01:00
Andrius Štikonas 9de7341985 Use lsblk --list instead of lsblk --raw. Makes unicode mapper names work. 2016-05-23 12:00:33 +01:00
Andrius Štikonas 6e4c330410 Do not run moc on classes where it is not necessary. 2016-05-22 23:53:17 +01:00
Andrius Štikonas b4a13599aa Libpartedbackend can also use KDiskFreeSpaceInfo for mounted luks partitions. 2016-05-22 00:52:07 +01:00
Andrius Štikonas 35a4798672 Add some support to get used space info for mounted LUKS partitions using KDiskFreeSpaceInfo. 2016-05-22 00:48:55 +01:00