]> sourceware.org Git - lvm2.git/log
lvm2.git
4 years agocov: unused header file removal
Zdenek Kabelac [Thu, 30 Jan 2020 10:03:27 +0000 (11:03 +0100)]
cov: unused header file removal

cov: unused header removed
Also ensure library header file with config settings goes first.
Move inclusion of format-text.h into layout.h

4 years agobcache: fix memleak on error path
Zdenek Kabelac [Wed, 29 Jan 2020 16:31:17 +0000 (17:31 +0100)]
bcache: fix memleak on error path

clang: free io on error path.

4 years agopvck: avoid memleak of vgname
Zdenek Kabelac [Wed, 29 Jan 2020 15:55:49 +0000 (16:55 +0100)]
pvck: avoid memleak of vgname

clang: no vgname buffer leak.

4 years agodmsetup: no memleak on failed realocation
Zdenek Kabelac [Wed, 29 Jan 2020 15:30:16 +0000 (16:30 +0100)]
dmsetup: no memleak on failed realocation

clang: keep old buf pointer for release on failing realloc() codepath.

4 years agotests: compatible with older kernels
Zdenek Kabelac [Wed, 29 Jan 2020 14:50:57 +0000 (15:50 +0100)]
tests: compatible with older kernels

Older kernels just show syscall stacktrace.

4 years agotests: move vgsplit writecache
David Teigland [Tue, 4 Feb 2020 16:20:19 +0000 (10:20 -0600)]
tests: move vgsplit writecache

to a different file

4 years agopvmove: prevent moving writecache device
David Teigland [Mon, 3 Feb 2020 21:59:12 +0000 (15:59 -0600)]
pvmove: prevent moving writecache device

4 years agovgsplit: handle cachevol
David Teigland [Mon, 3 Feb 2020 21:33:58 +0000 (15:33 -0600)]
vgsplit: handle cachevol

attached to a cache or writecache LV.
Ensure PVs in cachevol are moved with the main LV.

4 years agowritecache: reject invalid high/low watermark setting
David Teigland [Mon, 3 Feb 2020 17:33:30 +0000 (11:33 -0600)]
writecache: reject invalid high/low watermark setting

4 years agoman: lvmcache writecache watermark percent
David Teigland [Mon, 3 Feb 2020 17:21:24 +0000 (11:21 -0600)]
man: lvmcache writecache watermark percent

4 years agowritecache: report status fields
David Teigland [Fri, 31 Jan 2020 17:52:49 +0000 (11:52 -0600)]
writecache: report status fields

reporting fields (-o) directly from kernel:
writecache_total_blocks
writecache_free_blocks
writecache_writeback_blocks
writecache_error

The data_percent field shows used cache blocks / total cache blocks.

4 years agoman: updates to lvmcache
David Teigland [Thu, 30 Jan 2020 20:09:21 +0000 (14:09 -0600)]
man: updates to lvmcache

4 years agolvmlockd: use ret value in query function
David Teigland [Wed, 29 Jan 2020 16:37:28 +0000 (10:37 -0600)]
lvmlockd: use ret value in query function

4 years agoWHATS_NEW: update
Zdenek Kabelac [Thu, 23 Jan 2020 09:25:35 +0000 (10:25 +0100)]
WHATS_NEW: update

4 years agotests: add corruption write on PV test
Zdenek Kabelac [Mon, 20 Jan 2020 13:16:13 +0000 (14:16 +0100)]
tests: add corruption write on PV test

Test a case where PV is readable, but fails on write updating.
Check the failure is reported only for a single PV.

4 years agotests: writeerror_dev
Zdenek Kabelac [Mon, 20 Jan 2020 12:15:46 +0000 (13:15 +0100)]
tests: writeerror_dev

Intruduce aux function for easy simulation of disk areas,
that are 'normally' readable, but will fail on write.

4 years agovdo: adapt for multi line vdo_format output
Zdenek Kabelac [Wed, 22 Jan 2020 11:57:23 +0000 (12:57 +0100)]
vdo: adapt for multi line vdo_format output

Do not close pipeline after 1st. line parsed from vdo_format.
Also reprint the output for a user so new messages from vdo_format
can be seen by users.

4 years agoraid: more limitted prohibition of stacked raid usage
Zdenek Kabelac [Thu, 16 Jan 2020 15:43:55 +0000 (16:43 +0100)]
raid: more limitted prohibition of stacked raid usage

We actually need to prohibit only reshaping cases which are
running over multiple commands.

4 years agoman: pvck dump description improvements
David Teigland [Wed, 22 Jan 2020 21:01:00 +0000 (15:01 -0600)]
man: pvck dump description improvements

4 years agoadd suggestion message for mirror LVs
Heming Zhao [Wed, 15 Jan 2020 02:44:30 +0000 (02:44 +0000)]
add suggestion message for mirror LVs

Currently the error messages are not clear. This very easy to
guide user to execute "--removemissing --force", it is dangerous
and will make the LVs to be destroied.

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agofix corosync.conf: no interface error
Heming Zhao [Wed, 15 Jan 2020 02:17:47 +0000 (02:17 +0000)]
fix corosync.conf: no interface error

systemctl status corosync (version: 2.4.5) report error:
  parse error in config: No interfaces defined

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agoWHATS_NEW: update
Zdenek Kabelac [Mon, 13 Jan 2020 16:37:29 +0000 (17:37 +0100)]
WHATS_NEW: update

4 years agotests: update for readahead
Zdenek Kabelac [Thu, 12 Dec 2019 14:54:17 +0000 (15:54 +0100)]
tests: update for readahead

4 years agovdo: avoid running initialization of cache pool vars
Zdenek Kabelac [Mon, 6 Jan 2020 14:57:08 +0000 (15:57 +0100)]
vdo: avoid running initialization of cache pool vars

Since VDO is also pool, the old if() case missed to know about this,
and executed unnecesserily initialization of cache pool variables.
This was usually harmless when using 'smaller' sizes of VDO pools,
but for big VDO pool size, we were reporting senseless messages
about big cache chunk sizes.

4 years agoraid: disallow reshape of stacked LVs
Zdenek Kabelac [Mon, 13 Jan 2020 16:27:24 +0000 (17:27 +0100)]
raid: disallow reshape of stacked LVs

Until we resolve reshape for 'stacked' devices, we need to disable it.
So users can no longer reshape i.e. thin-pool data volumes, causing
ATM bad thin-pool problems.

4 years agoWHATS_NEW: VDO lvmdbusd adds
Tony Asleson [Thu, 9 Jan 2020 19:11:41 +0000 (13:11 -0600)]
WHATS_NEW: VDO lvmdbusd adds

4 years agolvmdbusd: Add function to convert LV into a VDO pool
Vojtech Trefny [Mon, 6 Jan 2020 10:28:41 +0000 (11:28 +0100)]
lvmdbusd: Add function to convert LV into a VDO pool

4 years agolvmdbusd: Add VDO enable/disable compress & dedup
Vojtech Trefny [Fri, 27 Dec 2019 14:29:15 +0000 (15:29 +0100)]
lvmdbusd: Add VDO enable/disable compress & dedup

Added methods to vdo pool interface to allow enabling and
disabling of VDO:
 * Compression
 * Deduplication

4 years agotests: Some lvmdbus tests require larger PVs
Marian Csontos [Wed, 18 Dec 2019 14:33:58 +0000 (15:33 +0100)]
tests: Some lvmdbus tests require larger PVs

4 years agotests: VDO detection in dbus tests dev-mcsontos-tests-201912
Marian Csontos [Mon, 16 Dec 2019 10:25:37 +0000 (11:25 +0100)]
tests: VDO detection in dbus tests

4 years agodrop warnings about missing pvs in foreign vgs
David Teigland [Wed, 11 Dec 2019 18:56:15 +0000 (12:56 -0600)]
drop warnings about missing pvs in foreign vgs

When a foreign VG is ignored, don't print warnings that
it is missing PVs.

4 years agopvck: show specific dump option values
David Teigland [Tue, 10 Dec 2019 17:06:45 +0000 (11:06 -0600)]
pvck: show specific dump option values

4 years agotests: improve secure test
Zdenek Kabelac [Tue, 10 Dec 2019 12:43:47 +0000 (13:43 +0100)]
tests: improve secure test

Validate we capture core while original task sleeps.

4 years agotest: fix missing waiting on udev
Zdenek Kabelac [Tue, 10 Dec 2019 12:40:56 +0000 (13:40 +0100)]
test: fix missing waiting on udev

After device creation we need to wait for a cookie so it's not forgotten
in the system.

4 years agotest: fail on device create
Zdenek Kabelac [Tue, 10 Dec 2019 12:30:55 +0000 (13:30 +0100)]
test: fail on device create

Correct validation of prepared device and fail if the device can't
be created.

4 years agotest: aux setup
Zdenek Kabelac [Tue, 10 Dec 2019 12:30:11 +0000 (13:30 +0100)]
test: aux setup

Avoid endless loop if there was no 'remove' progress.

4 years agoclenaup: simpler form
Zdenek Kabelac [Thu, 28 Nov 2019 14:15:10 +0000 (15:15 +0100)]
clenaup: simpler form

4 years agovg_read: use else for 3 case
Zdenek Kabelac [Thu, 28 Nov 2019 14:09:27 +0000 (15:09 +0100)]
vg_read: use else for 3 case

Make it visible we check for ==, >, <  of same var.

4 years agodebug: enhance messages
Zdenek Kabelac [Thu, 28 Nov 2019 12:19:44 +0000 (13:19 +0100)]
debug: enhance messages

Drop 'extra' stack trace where errors are already logged from function.
Add some missing dots in messages.

4 years agodebug: avoid to slashes in debug message
Zdenek Kabelac [Thu, 24 Oct 2019 14:36:01 +0000 (16:36 +0200)]
debug: avoid to slashes in debug message

4 years agodebug: print VG name in log messages for segment errors
Nikhil Kshirsagar [Tue, 26 Nov 2019 07:06:45 +0000 (12:36 +0530)]
debug: print VG name in log messages for segment errors

Signed-off-by: Nikhil Kshirsagar <nkshirsa@redhat.com>
4 years agolibdm: set maj:min while creating and reloading device
Zdenek Kabelac [Tue, 10 Dec 2019 12:28:44 +0000 (13:28 +0100)]
libdm: set maj:min while creating and reloading device

Add maj:min to the task structure for RELOAD - which is now
handled in _flatten() and will just skip passing device name.

4 years agolibdm: support device RELOAD with maj:min and devname set
Zdenek Kabelac [Tue, 10 Dec 2019 12:28:16 +0000 (13:28 +0100)]
libdm: support device RELOAD with maj:min and devname set

When devices are created - we were not giving meaning error messages
when the failure happened on 'reload' part of creation.

With this patch we are now able to report both name and major:minor.

Enhancment is most visible with 'crypto' devices,
which are using 'secure' memory erase bit.

4 years agoman pvck: describe settings
David Teigland [Fri, 6 Dec 2019 22:21:48 +0000 (16:21 -0600)]
man pvck: describe settings

4 years agoupdate option description for settings
David Teigland [Fri, 6 Dec 2019 22:21:26 +0000 (16:21 -0600)]
update option description for settings

4 years agopvck: deal with coverity warnings
David Teigland [Mon, 2 Dec 2019 17:16:02 +0000 (11:16 -0600)]
pvck: deal with coverity warnings

4 years agopost-release
Marian Csontos [Sat, 30 Nov 2019 13:46:56 +0000 (14:46 +0100)]
post-release

4 years agopre-release v2_03_07
Marian Csontos [Sat, 30 Nov 2019 13:45:51 +0000 (14:45 +0100)]
pre-release

4 years agobuild: make generate
Marian Csontos [Sat, 30 Nov 2019 13:24:22 +0000 (14:24 +0100)]
build: make generate

4 years agopvck: use zalloc in more places
David Teigland [Wed, 27 Nov 2019 17:17:15 +0000 (11:17 -0600)]
pvck: use zalloc in more places

4 years agopvck: repair headers and metadata
David Teigland [Tue, 29 Oct 2019 21:08:43 +0000 (16:08 -0500)]
pvck: repair headers and metadata

To write a new/repaired pv_header and label_header:

  pvck --repairtype pv_header --file <file> <device>

This uses the metadata input file to find the PV UUID,
device size, and data offset.

To write new/repaired metadata text and mda_header:

  pvck --repairtype metadata --file <file> <device>

This requires a good pv_header which points to one or two
metadata areas.  Any metadata areas referenced by the
pv_header are updated with the specified metadata and
a new mda_header. "--settings mda_num=1|2" can be used
to select one mda to repair.

To combine all header and metadata repairs:

  pvck --repair --file <file> <device>

It's best to use a raw metadata file as input, that was
extracted from another PV in the same VG (or from another
metadata area on the same PV.)  pvck will also accept a
metadata backup file, but that will produce metadata that
is not identical to other metadata copies on other PVs
and other areas.  So, when using a backup file, consider
using it to update metadata on all PVs/areas.

To get a raw metadata file to use for the repair, see
pvck --dump metadata|metadata_search.

List all instances of metadata from the metadata area:
  pvck --dump metadata_search <device>

Save one instance of metadata at the given offset to
the specified file (this file can be used for repair):

  pvck --dump metadata_search --file <file>
    --settings "metadata_offset=<off>" <device>

4 years agopvck: dump functions cleanup args and return vals
David Teigland [Mon, 4 Nov 2019 19:38:23 +0000 (13:38 -0600)]
pvck: dump functions cleanup args and return vals

4 years agopvck: dump show most recent metadata
David Teigland [Mon, 4 Nov 2019 17:32:23 +0000 (11:32 -0600)]
pvck: dump show most recent metadata

4 years agopvck: allow disk locations to be specified
David Teigland [Tue, 22 Oct 2019 18:28:45 +0000 (13:28 -0500)]
pvck: allow disk locations to be specified

using --settings:

mda_offset=<offset> mda_size=<size> can be used
in place of the offset/size that normally come
from headers.

metadata_offset=<offset> prints/saves one instance
of metadata text at the given offset, in
metadata_all or metadata_search.

4 years agopvck: move some arg processing
David Teigland [Mon, 21 Oct 2019 21:39:46 +0000 (16:39 -0500)]
pvck: move some arg processing

4 years agoscan: add simple scan to find a pvid
David Teigland [Wed, 30 Oct 2019 20:11:57 +0000 (15:11 -0500)]
scan: add simple scan to find a pvid

4 years agometadata: add vg_from_config_tree
David Teigland [Tue, 29 Oct 2019 19:31:37 +0000 (14:31 -0500)]
metadata: add vg_from_config_tree

Add cmd/fmt args to import functions so that
they can be used without the fid arg which.

4 years agoRevert "cov: use zalloc"
David Teigland [Thu, 14 Nov 2019 18:31:31 +0000 (12:31 -0600)]
Revert "cov: use zalloc"

This reverts commit 9af1d63b4d96facb0aa055a44c2f61eac01e13f2.

fixes folded into subsequent pvck commit

4 years agoRevert "pvck: check result of dev_get_size"
David Teigland [Thu, 14 Nov 2019 18:31:30 +0000 (12:31 -0600)]
Revert "pvck: check result of dev_get_size"

This reverts commit 1f4968289c9c0e2a1e850317ef173df11938b7f3.

fixes folded into subsequent pvck commit

4 years agoRevert "cov: fix mem leaking buffer"
David Teigland [Thu, 14 Nov 2019 18:31:29 +0000 (12:31 -0600)]
Revert "cov: fix mem leaking buffer"

This reverts commit d67ce9e140b5691a3f75a69d6e735eec30603670.

fixes folded into subsequent pvck commit

4 years agoRevert "cov: avoid passing NULL to strstr function"
David Teigland [Thu, 14 Nov 2019 18:31:28 +0000 (12:31 -0600)]
Revert "cov: avoid passing NULL to strstr function"

This reverts commit 0bad3977df40a70c68778ff0514d0ca712fee402.

fixes folded into subsequent pvck commit

4 years agoRevert "cov: check for retvalue"
David Teigland [Thu, 14 Nov 2019 18:31:27 +0000 (12:31 -0600)]
Revert "cov: check for retvalue"

This reverts commit 153e55c20e9a3810a1862314a6465179e1b53931.

fixes folded into subsequent pvck commit

4 years agoscanning: use bool type for _scan_text_mismatch
David Teigland [Wed, 27 Nov 2019 15:26:04 +0000 (09:26 -0600)]
scanning: use bool type for _scan_text_mismatch

4 years agotests hints: update check for io count
David Teigland [Tue, 26 Nov 2019 22:31:38 +0000 (16:31 -0600)]
tests hints: update check for io count

Running a reporting command on a VG now includes one
additional read to check the mda_header for any change
to the vg between scan and lock.

4 years agoRevert "lvs: disable scanning optimization"
David Teigland [Tue, 26 Nov 2019 18:01:24 +0000 (12:01 -0600)]
Revert "lvs: disable scanning optimization"

This reverts commit 7474440d3b540d20eb4f997efeb31b881cc6ac8e.

lvs can use the scanning optimization again since it has
been changed in:
"scanning: optimize by checking text offset and checksum"

4 years agoscanning: optimize by checking text offset and checksum
David Teigland [Tue, 26 Nov 2019 17:56:51 +0000 (11:56 -0600)]
scanning: optimize by checking text offset and checksum

After the VG lock is taken for vg_read, reread the mda_header
and compare the metadata text offset and checksum to what was
seen during label scan.  If it is unchanged, then the metadata
has not changed since the label scan, and the metadata does not
need to be reread under the lock for command processing.

For commands that do not make changes (e.g. reporting), the
mda_header is reread and checked on one mda to decide if the
full metadata rereading can be skipped.  For other commands
(e.g. modifying the vg) the mda_header is reread and checked
from all PVs.  (These could probably just check one mda also.)

4 years agobcache: add invalidate_bytes function
David Teigland [Tue, 26 Nov 2019 21:46:49 +0000 (15:46 -0600)]
bcache: add invalidate_bytes function

4 years agolvcreate: ensure striped raid region size is at least stripe size
Heinz Mauelshagen [Tue, 26 Nov 2019 21:17:34 +0000 (22:17 +0100)]
lvcreate: ensure striped raid region size is at least stripe size

The kernel MD runtime requires region size to be larger than stripe size
on striped raid layouts, thus the dm-raid target's constructor rejects
such request.

This causes e.g. an 'lvcreate --type raid10 -i3 -I4096 -R2048 -n lv vg' to fail.

Avoid failing late in the kernel by enforcing region size to be
larger or equal to stripe size.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1698225

4 years agopvcreate,pvremove: fix reacquiring global lock after prompt
David Teigland [Tue, 26 Nov 2019 20:34:43 +0000 (14:34 -0600)]
pvcreate,pvremove: fix reacquiring global lock after prompt

When pvcreate/pvremove prompt the user, they first release
the global lock, then acquire it again after the prompt,
to avoid blocking other commands while waiting for a user
response.  This release/reacquire changes the locking
order with respect to the hints flock (and potentially other
locks).  So, to avoid deadlock, use a nonblocking request
when reacquiring the global lock.

4 years agowritecache: modprobe dm-writecache
David Teigland [Tue, 26 Nov 2019 17:21:09 +0000 (11:21 -0600)]
writecache: modprobe dm-writecache

4 years agotests: update to md dev name
David Teigland [Wed, 2 Oct 2019 17:51:17 +0000 (12:51 -0500)]
tests: update to md dev name

Restore WAIT_MD_DEV in teardown.

NOTE: The name of MD device may have changed.

(cherry picked from commit c2ff8876f97a5840cd9d6fcda1bec55ef6220dc3)

4 years agotests: Find md name using lsblk dev-mcsontos-md-stop-scan
Marian Csontos [Tue, 26 Nov 2019 08:11:05 +0000 (09:11 +0100)]
tests: Find md name using lsblk

After stopping MD device and rescanning the leg, it is created with
different name.

4 years agoPartial revert "tests: update to md dev name"
Marian Csontos [Mon, 25 Nov 2019 08:23:02 +0000 (09:23 +0100)]
Partial revert "tests: update to md dev name"

This partially reverts commit c2ff8876f97a5840cd9d6fcda1bec55ef6220dc3.

Not all MD devices are stopped. Something is missing there...

4 years agotest: Fix handling leftovers from previous tests
Marian Csontos [Wed, 20 Nov 2019 14:23:48 +0000 (15:23 +0100)]
test: Fix handling leftovers from previous tests

teardown fails current PREFIX is prefix of previously failed test with
leftovers in dmtable.

4 years agolvs: disable scanning optimization
David Teigland [Tue, 19 Nov 2019 16:27:02 +0000 (10:27 -0600)]
lvs: disable scanning optimization

The scanning optimization can produce warnings from
'lvs' when run concurrently with commands modifying LVs,
so disable the optimization until it can be improved.

Without the scanning optimization, lvs will always
read all PVs twice:

1. read metadata from all PVs, saving it in memory
2. for each VG
3. lock VG
4. reread metadata from all PVs in VG, replacing metadata
   saved from step 1
5. run command on VG
6. unlock VG

The optimization would usually cause step 4 to be skipped,
and PVs would be read only once.

Running the command in step 5 using metadata that was not
read under the VG lock is usually fine, except for the
fact that lvs attempts to validate the metadata by comparing
it to current dm state.  If other commands are modifying dm
state while lvs is running, lvs may see differences between
metadata from step 1 and dm state checked during step 5,
and print warnings.

(A better fix may be to detect the concurrent change and
fall back to rereading metadata in step 4 only when needed.)

4 years agotests: add more tracing info
Zdenek Kabelac [Fri, 15 Nov 2019 11:37:13 +0000 (12:37 +0100)]
tests: add more tracing info

4 years agotests: reduce amount of written date
Zdenek Kabelac [Fri, 15 Nov 2019 11:36:39 +0000 (12:36 +0100)]
tests: reduce amount of written date

Since we reduced created LV to 4M - dd also just 4M.

4 years agorevert "dmeventd: vdo plugin link lvm library"
Zdenek Kabelac [Fri, 15 Nov 2019 11:20:28 +0000 (12:20 +0100)]
revert "dmeventd: vdo plugin link lvm library"

This reverts commit cbabdf2fca6131660cfb5525ed9edb3f7a41525a.
and add extra comment why this code may look unused, but
in runtime is necessary.

4 years agoRevert "hints: rewrite function"
David Teigland [Thu, 14 Nov 2019 18:15:05 +0000 (12:15 -0600)]
Revert "hints: rewrite function"

This reverts commit 70fb31b5d6863248b5adfb2581b706cbb158b30e.

4 years agoRevert "debug: enhance debug messages"
David Teigland [Thu, 14 Nov 2019 18:11:53 +0000 (12:11 -0600)]
Revert "debug: enhance debug messages"

This reverts commit e92d3bd1f75d335fba5303c433516ea4ebe5cab1.

4 years agotests: enusure lib is initilized
Zdenek Kabelac [Thu, 14 Nov 2019 12:04:29 +0000 (13:04 +0100)]
tests: enusure lib is initilized

4 years agodebug: enhance debug messages
Zdenek Kabelac [Thu, 14 Nov 2019 16:00:56 +0000 (17:00 +0100)]
debug: enhance debug messages

4 years agohints: drop unneeded memset
Zdenek Kabelac [Thu, 14 Nov 2019 16:59:32 +0000 (17:59 +0100)]
hints: drop unneeded memset

strncpy will zero buffer itself.

4 years agohints: no need to check for NULL before free
Zdenek Kabelac [Thu, 14 Nov 2019 16:17:09 +0000 (17:17 +0100)]
hints: no need to check for NULL before free

free() itself checks for NULL.

4 years agocov: use zalloc
Zdenek Kabelac [Thu, 14 Nov 2019 16:13:58 +0000 (17:13 +0100)]
cov: use zalloc

Instead of malloc() memset() -> zalloc()

4 years agocov: add explicit ret value ignoring
Zdenek Kabelac [Thu, 14 Nov 2019 16:11:01 +0000 (17:11 +0100)]
cov: add explicit ret value ignoring

We don't need to check for any error result codes here.

4 years agocov: remove unused headers
Zdenek Kabelac [Thu, 14 Nov 2019 15:55:09 +0000 (16:55 +0100)]
cov: remove unused headers

4 years agocov: more checks for failing syscalls
Zdenek Kabelac [Thu, 14 Nov 2019 15:56:12 +0000 (16:56 +0100)]
cov: more checks for failing syscalls

4 years agodmeventd: vdo plugin link lvm library
Zdenek Kabelac [Thu, 14 Nov 2019 15:52:05 +0000 (16:52 +0100)]
dmeventd: vdo plugin link lvm library

Since we fixed linking of proper version of 'libdevmapper' with
linking lvm2 plugin correctly - we already have correct function
available linked with internal lvm library.
So drop unneeded include of parsing function.

4 years agocov: inline _build_desc_write
Zdenek Kabelac [Thu, 14 Nov 2019 15:58:18 +0000 (16:58 +0100)]
cov: inline _build_desc_write

Embed function into the code, since the function is actually
simpler written this as there are no memleak troubles
with failing allocation error path.

4 years agohints: check for _touch_hints
Zdenek Kabelac [Thu, 14 Nov 2019 17:01:05 +0000 (18:01 +0100)]
hints: check for _touch_hints

Exit when !_touch_hints().

4 years agohints: fix mem leaking buffers
Zdenek Kabelac [Thu, 14 Nov 2019 17:00:54 +0000 (18:00 +0100)]
hints: fix mem leaking buffers

4 years agohints: validate allocation result
Zdenek Kabelac [Thu, 14 Nov 2019 17:00:00 +0000 (18:00 +0100)]
hints: validate allocation result

4 years agohints: validate sscanf results
Zdenek Kabelac [Thu, 14 Nov 2019 16:59:17 +0000 (17:59 +0100)]
hints: validate sscanf results

4 years agohints: allocate hint only when needed
Zdenek Kabelac [Thu, 14 Nov 2019 16:57:43 +0000 (17:57 +0100)]
hints: allocate hint only when needed

Avoid mem leaking hint on every loop continue and
allocate hint only when it's going to be added into list.

Switch to use 'dm_strncpy()' and validate sizes.

4 years agohints: rewrite function
Zdenek Kabelac [Thu, 14 Nov 2019 16:15:18 +0000 (17:15 +0100)]
hints: rewrite function

4 years agopvck: check result of dev_get_size
Zdenek Kabelac [Thu, 14 Nov 2019 16:32:22 +0000 (17:32 +0100)]
pvck: check result of dev_get_size

Don't use garbage value for later computations.

4 years agocov: fix mem leaking buffer
Zdenek Kabelac [Thu, 14 Nov 2019 16:27:14 +0000 (17:27 +0100)]
cov: fix mem leaking buffer

Free allocated buffer on function's exit.
Also check for fwrite() results.

4 years agocov: avoid passing NULL to strstr function
Zdenek Kabelac [Thu, 14 Nov 2019 16:13:02 +0000 (17:13 +0100)]
cov: avoid passing NULL to strstr function

When 'str1' would be NULL, there is no point to run 2nd. strstr().

4 years agocov: check for retvalue
Zdenek Kabelac [Thu, 14 Nov 2019 16:12:44 +0000 (17:12 +0100)]
cov: check for retvalue

This page took 0.074568 seconds and 5 git commands to generate.