summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* io-manager: use from lvmdev-dct-lvm-io-managerDavid Teigland2019-09-0616-642/+329
|
* io-manager: clean up block sizesDavid Teigland2019-09-062-30/+36
|
* [io-manager] Drop in new io-manager filesJoe Thornber2019-09-0616-1217/+5513
| | | | | | | | | | | | | | | | | | | io-manager is an updated version of the bcache. This commit contains: - io-manager - io-processor: a utility that runs an action across regions of disk. using the io-manager to prefetch in correctly sized batches. - unit tests for the above (~100 total) - remove unit tests for bcache. - There's a name clash between bcache/io_engine and io_manager/io_engine. So I've renamed the bcache one to io_engine_ for now. bcache will disappear shortly.
* bcache: change log level for prefetch messageDavid Teigland2019-09-031-1/+1
| | | | | The "new new blocks" message was printed as an error but it's not an error condition.
* pvscan: avoid full scan for activationDavid Teigland2019-09-036-114/+568
| | | | | | | | | | | | | | | | | | | When an online PV completed a VG, the standard activation functions were used to activate the VG. These functions use a full scan of all devs. When many pvscans are run during startup and need to activate many VGs, scanning all devs from all the pvscans can take a long time. Optimize VG activation in pvscan to scan only the devs in the VG being activated. This makes use of the online file info that was used to determine the VG was complete. The downside of this approach is that pvscan activation will not detect duplicate PVs and block activation, where a normal activation command (which scans all devices) would.
* vgextend: check missing device during block size checkDavid Teigland2019-09-031-0/+3
| | | | | Checking the block size when a device is missing could trigger a segfault.
* fix segfault for invalid characters in vg nameDavid Teigland2019-08-291-1/+2
| | | | | | | | | | | Fixes a regression from commit ba7ff96faff0 "improve reading and repairing vg metadata" where the error path for a vg name with invalid charaters was missing an error flag, which led to the caller not recognizing an error occured. Previously, an error flag was hidden in the old _vg_make_handle function.
* hints: check for malloc failureDavid Teigland2019-08-281-1/+2
|
* hints: fix copy of filterDavid Teigland2019-08-281-11/+68
| | | | | | | | Only the first entry of the filter array was being included in the copy of the filter, rather than the entire thing. The result is that hints would not be refreshed if the filter was changed but the first entry was unchanged.
* fix duplicate pv size checkDavid Teigland2019-08-271-24/+0
| | | | | | | | | | | | | | | | | Fixes a segfault in the recent commit e01fddc57: "improve duplicate pv handling for md components" While choosing between duplicates, the info struct is not always valid; it may have been dropped already. Remove the code that was still using the info struct for size comparisons. The size comparisons were a bogus check anyway because it was just preferring the dev that had already been chosen, it wasn't actually comparing the dev size to the PV size. It would be good to use a dev/PV size comparison in the duplicate handling code, but the PV size is not available until after vg_read, not from the scan.
* Fix converting dbus.UInt types to stringVojtech Trefny2019-08-271-16/+19
| | | | | | | | | | | | | | | | | | | | With Python 3.8 converting these directly to string using str() no longer works, we need to convert these to integer first. On Python 3.8: >>> str(dbus.Int64(1)) 'dbus.Int64(1)' On Python 3.7 (and older): >>> str(dbus.UInt64(1)) '1' This is probably related to removing __str__ function from method from int (dbus.UInt is subclass of int) which happened in 3.8, see https://docs.python.org/3.8/whatsnew/3.8.html Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
* activation: use cmd pending mem for pending_deleteZdenek Kabelac2019-08-273-19/+23
| | | | | | | | | | | | | Since we need to preserve allocated strings across 2 separate activation calls of '_tree_action()' we need to use other mem pool them dm->mem - but since cmd->mem is released between individual lvm2 locking calls, we rather introduce a new separate mem pool just for pending deletes with easy to see life-span. (not using 'libmem' as it would basicaly keep allocations over the whole lifetime of clvmd) This patch is fixing previous commmit where the memory was improperly used after pool release.
* configure: continue build if prlimit is missingZdenek Kabelac2019-08-262-2/+14
|
* configure: check for prlimitZdenek Kabelac2019-08-264-3/+8
| | | | | | Update configure and make code compilable if prlimit() is not present. Since the code is suspicious do not cope yet with it's replacement with set/getrlimit().
* dmsetup: missed trailing newlineZdenek Kabelac2019-08-261-1/+1
|
* lv_manip: add synchronizationsZdenek Kabelac2019-08-264-3/+34
| | | | | | | | | | | | New udev in rawhide seems to be 'dropping' udev rule operations for devices that are no longer existing - while this is 'probably' a bug - it's revealing moments in lvm2 that likely should not run in a single transaction and we should wait for a cookie before submitting more work. TODO: it seem more 'error' paths should always include synchronization before starting deactivating 'just activated' devices. We should probably figure out some 'automatic' solution for this instead of placing sync_local_dev_name() all over the place...
* cache: improve vgremove loopZdenek Kabelac2019-08-262-0/+8
| | | | | | | | | | Support internal removal of 'cache origin' volume - which we do not normally expose to a user - however internal processing loops may hit this condition (depending on order of list LVs). So when this operation is internally requested - we automatically try to remove it's 'holding' LV (cache LV) - which will also remove the origin.
* snapshot: always activateZdenek Kabelac2019-08-261-7/+1
| | | | | | | | | Drop the 'cluster-only' optimization so we do resume ALL device before we try to wait on cookie before 'removal' operation. It's more correct order of operation - alhtough possibly slightly less efficient - but until we have correct list of operations 'in-progress' we can't do anything better.
* activation: extend handling of pending_deleteZdenek Kabelac2019-08-263-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | With previous patch 30a98e4d6710a543692d40d11428ae4baea11b7b we started to put devices one pending_delete list instead of directly scheduling their removal. However we have operations like 'snapshot merge' where we are resuming device tree in 2 subsequent activation calls - so 1st such call will still have suspened devices and no chance to push 'remove' ioctl. Since we curently cannot easily solve this by doing just single activation call (which would be preferred solution) - we introduce a preservation of pending_delete via command structure and then restore it on next activation call. This way we keep to remove devices later - although it might be not the best moment - this may need futher tunning. Also we don't keep the list of operation in 1 trasaction (unless we do verify udev symlinks) - this could probably also make it more correct in terms of which 'remove' can be combined we already running 'resume'.
* dmsetup: debug printZdenek Kabelac2019-08-202-0/+2
| | | | | | | Udev debugging is a bit tricky, so to more easily pair cookie ID, which is the lowest 16 bit - print cookie as hexa number. This simplify pairing of processed cookies while the 'higher bit flags' are changed for the same cookie.
* activation: add synchronization pointZdenek Kabelac2019-08-202-8/+13
| | | | | | | | | | | Resuming of 'error' table entry followed with it's dirrect removal is now troublesame with latest udev as it may skip processing of udev rules for already 'dropped' device nodes. As we cannot 'synchronize' with udev while we know we have devices in suspended state - rework 'cleanup' so it collects nodes for removal into pending_delete list and process the list with synchronization once we are without any suspended nodes.
* pvmove: add missing synchronizationZdenek Kabelac2019-08-202-0/+3
| | | | | | Between 'resume' and 'remove' we need to wait for udev to synchronize, otherwise udev may 'skip' resume event processing if the udev node is already gone.
* pvmove: correcting read_ahead settingZdenek Kabelac2019-08-202-13/+35
| | | | | | | | | | | | | | When pvmove is finished, we do a tricky operation since we try to resume multiple different device that were all joined into 1 big tree. Currently we use the infromation from existing live DM table, where we can get list of all holders of pvmove device. We look for these nodes (by uuid) in new metadata, and we do now a full regular device add into dm tree structure. All devices should be already PRELOAD with correct table before entering suspend state, however for correctly working readahead we need to put correct info also into RESUME tree. Since table are preloaded, the same table is skip and resume, but correct read ahead is now set.
* man lvmthin: remove nonexistent topicDavid Teigland2019-08-191-2/+0
|
* configure: Fix setting of CLDFLAGS defaultMarian Csontos2019-08-192-6/+6
|
* configure: Fix the default in help stringMarian Csontos2019-08-191-1/+1
|
* pvscan: disable sleeping and retrying for udevDavid Teigland2019-08-164-0/+23
| | | | | | When systemd is running pvscans, udev may not be entirely initialized, so the pvscan should not sleep and retry waiting for udev info.
* bcache: increase max allowed bcache sizeDavid Teigland2019-08-161-2/+2
| | | | from 128MB to 512MB (the default remains 8MB)
* tests: duplicate-pvs-mdDavid Teigland2019-08-162-0/+1040
| | | | Testing duplicate PV handling for various md device setups/states.
* pvscan cache: use lvmcache_label_scanDavid Teigland2019-08-161-1/+1
| | | | | | instead of the lower level label_scan. The lvmcache wrapper around label_scan checks for and eliminates more duplicate devs and md components.
* improve duplicate pv handling for md componentsDavid Teigland2019-08-163-131/+175
| | | | | | | | Eliminate md components at the start so they don't interfere with actual duplicates, and don't need to be removed later. This also allows for choosing no copy of a PVID if they all happen to be md components.
* lvmcache: use devl list helperDavid Teigland2019-08-161-16/+25
|
* lvmcache: replace found_duplicates variableDavid Teigland2019-08-161-7/+3
| | | | With just checking if the duplicates lists are empty.
* lvmcache: renaming functions and variablesDavid Teigland2019-08-168-86/+73
| | | | related to duplicates, no functional changes.
* md component detection addition in vg_readDavid Teigland2019-08-165-18/+70
| | | | | | | | | | | | | | | | Usually md components are eliminated in label scan and/or duplicate resolution, but they could sometimes get into the vg_read stage, where set_pv_devices compares the device to the PV. If set_pv_devices runs an md component check and finds one, vg_read should eliminate the components. In set_pv_devices, run an md component check always if the PV is smaller than the device (this is not very common.) If the PV is larger than the device, (more common), do the component check when the config setting is "auto" (the default).
* dmeventd: avoid bail out preventing repair in raid pluginHeinz Mauelshagen2019-08-161-10/+6
| | | | | | | | | | | | | | | | | | | | | | | Problem: even though dead raid component devices are detected, the raid plugin is bailing out thus preventing a repair attempt. Rational: in case of component device errors, the MD resynchronization thread runs in parallel with the thrown event being processed by the raid plugin. The plugin retrieves the raid device status but that still reflects insync regions as 0 (when it should already be total regions) because the MD thread didn't update it yet. Solution: Remove the insync regions check and let lvconvert carry out its pre-repair checks and optionally carry out a repair attempt. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1560739 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1468590 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1654860 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1729303 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1741016
* udev: remove unsupported OPTIONS+="event_timeout" rulePeter Rajnoha2019-08-132-2/+1
| | | | | | | | | | | | The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216, that is ~5 years ago. Since systemd/udev version 243, there's a new message printed if unsupported OPTIONS value is used: Invalid value for OPTIONS key, ignoring: 'event_timeout=180' Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
* tests: simplify some var settingsZdenek Kabelac2019-08-0913-25/+3
| | | | scan_lvs now automatically comes with extend_filter_LVMTEST
* tests: for cluster testing we always need exclusive mirrorsZdenek Kabelac2019-08-091-1/+1
| | | | | Cluster test would fail without exlusively activated mirror. FIXME: test is still broken, since LV2 is not active after split.
* tests: accept also value 512Zdenek Kabelac2019-08-091-1/+2
| | | | Older kernels provide fixed value 512 instead of 0.
* tests: add settle wait before issue removeZdenek Kabelac2019-08-091-0/+1
| | | | | | | | | | Some older BB with older cryptsetup tool do not 'retry' on remove and when remove is issued right after 'fsck' - it might be rejected with: Device @PREFIX@-tcrypt2 is busy. Try to use udevadm settle.
* tests: fix ra checkingZdenek Kabelac2019-08-092-5/+15
| | | | | Since with some installed package like 'tuned' the value of 'RA' on PV origin device can be different, adapting tests to count with this.
* tests: replaces grep -q usageZdenek Kabelac2019-08-091-7/+7
| | | | | | | | | | | Since we use 'set -euE -o pipefail' for shell execution, any failure of any command in the 'piped' shell can result in failure of whole executed chain - resulting in typically unsually test skip, that was left unnoticed. Since checked command have usually short output, the simplest fix seems to be to let grep parse whole output instead of quiting after first match.
* make: generateZdenek Kabelac2019-08-092-40/+48
| | | | Run make generate.
* cov: check for socket_path being setZdenek Kabelac2019-08-091-1/+1
| | | | | As we check for existince on entering path let's ensure it's there also on exit path.
* cov: ensure cname exists before derefering itZdenek Kabelac2019-08-091-3/+3
| | | | | Just make it clear to analyzers cname can't be NULL. TODO: maybe exclude NULL at front of the function...
* libdm: implement search for device names for older kernelsZdenek Kabelac2019-08-092-2/+235
| | | | | | | Kernels <2.6.27 don't have /sys/dev dir - add code for looking out device name via longre seach in /sys/block This makes commands like 'dmsetup dep -o blkdevname' working.
* exported_symbols: comment old symbolsZdenek Kabelac2019-08-093-2/+3
| | | | | | | | | | | | | | | Fix versioning for updated symbols dm_stats_create_region and dm_stats_create_region. Only the latest symbol should have global entry. Since I'm not sure what is currenlty the best option for old symbols - we added support for easy commenting of them (so we do not lose information when the symbol appeared for the first time.) Note: some old already deleted symbols should have been restored as comments.
* make: support comments in exported symbolsZdenek Kabelac2019-08-092-6/+6
| | | | | Now the lines starting with '#' in exported symbols files are treated as comments (ignored).
* tests: open-file-limitDavid Teigland2019-08-081-0/+46
|