]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agotests: handle missing delay_dev
Zdenek Kabelac [Mon, 9 Nov 2015 18:06:55 +0000 (19:06 +0100)]
tests: handle missing delay_dev

Try to run as much of test which could run without delay_dev.

8 years agolvmlockd: fix the NO_GL_LS condition
David Teigland [Mon, 9 Nov 2015 17:33:16 +0000 (11:33 -0600)]
lvmlockd: fix the NO_GL_LS condition

indicating when no global lockspace exists.

8 years agocleanup: ensuring string is not NULL
Zdenek Kabelac [Mon, 9 Nov 2015 15:58:24 +0000 (16:58 +0100)]
cleanup: ensuring string is not NULL

Coverity cannot see the string cannot be NULL so make it explicit.

8 years agocache: ensure there is no NULL str
Zdenek Kabelac [Mon, 9 Nov 2015 15:56:11 +0000 (16:56 +0100)]
cache: ensure there is no NULL str

Coverity is not smart enough to detect this case could never happen.

8 years agolvmlockd: enforce 64bit arithmetic
Zdenek Kabelac [Mon, 9 Nov 2015 15:47:57 +0000 (16:47 +0100)]
lvmlockd: enforce 64bit arithmetic

Coverity suggest to stay on the 'safe' side and widen operators early
so 64bit offset is made from 64bit arithmentic.

8 years agolvmlockd: add missing error checks
Zdenek Kabelac [Mon, 9 Nov 2015 15:38:14 +0000 (16:38 +0100)]
lvmlockd: add missing error checks

Detect error from function and report them.

8 years agocleanup: use _ for local function
Zdenek Kabelac [Mon, 9 Nov 2015 15:37:48 +0000 (16:37 +0100)]
cleanup: use _ for local function

8 years agocleanup: drop unneded headers
Zdenek Kabelac [Mon, 9 Nov 2015 15:37:05 +0000 (16:37 +0100)]
cleanup: drop unneded headers

Coverity notices they are not really needed.

8 years agodmsetup: one missed dms
Zdenek Kabelac [Mon, 9 Nov 2015 15:02:33 +0000 (16:02 +0100)]
dmsetup: one missed dms

8 years agolibdaemon: fix passing 32bit values for %d
Zdenek Kabelac [Mon, 9 Nov 2015 14:15:37 +0000 (15:15 +0100)]
libdaemon: fix passing 32bit values for %d

Since %d is now prohibited for its great confusion,
replace it with  FMTd64 and correctly converted int64_t
parameter.

8 years agolvmlockd: shut up warnings
David Teigland [Mon, 9 Nov 2015 15:59:51 +0000 (09:59 -0600)]
lvmlockd: shut up warnings

8 years agolibdaemon: prohibit use of %d for 64bit numbres
Zdenek Kabelac [Mon, 9 Nov 2015 13:03:25 +0000 (14:03 +0100)]
libdaemon: prohibit use of %d for 64bit numbres

Do not let pass %d and print internal error when found one.
Require all users to use  FMTd64 - it's seriously confusing.

8 years agolvmetad: restore use of FMTd64
Zdenek Kabelac [Mon, 9 Nov 2015 13:02:27 +0000 (14:02 +0100)]
lvmetad: restore use of FMTd64

daemon_reply_simple() eats just 64bit numbers - so make it explicit.

8 years agotests: update test to check for race better
Zdenek Kabelac [Mon, 9 Nov 2015 11:16:56 +0000 (12:16 +0100)]
tests: update test to check for race better

Use  delay_dev to slow down mirror sync so we could more
easily check for race and proper reject of parallel mirror
leg addition/reduction.

Also expose fail in mirror allocation of parallel leg.

8 years agotests: do not skip test when delay is missing
Zdenek Kabelac [Mon, 9 Nov 2015 11:14:42 +0000 (12:14 +0100)]
tests: do not skip test when delay is missing

Rather then skipping whole test - just do not use it.

Failing tests that have required delay need to deal with reality
and shell either check for HAVE_DM_DELAY and skip portion
of test or using should when needed.

8 years agocleanup: update comment
Zdenek Kabelac [Mon, 9 Nov 2015 09:41:17 +0000 (10:41 +0100)]
cleanup: update comment

8 years agodmsetup: cleanup warn for older compilers
Zdenek Kabelac [Mon, 9 Nov 2015 09:48:40 +0000 (10:48 +0100)]
dmsetup: cleanup warn for older compilers

Older gcc somehow thinks there is a path of using
subcommand uninitilized.

So make it more obvious there is no such one.

8 years agolvmetad: maintain seqno as int
Zdenek Kabelac [Mon, 9 Nov 2015 09:36:23 +0000 (10:36 +0100)]
lvmetad: maintain seqno as int

Keep seqno as 32bit value.
Also use '_' prefix for local _update_metadata.

8 years agoraid: mark intententional copy and paste
Zdenek Kabelac [Mon, 9 Nov 2015 08:30:31 +0000 (09:30 +0100)]
raid: mark intententional copy and paste

Coverity: add this extra comment, to let Coverity know this
slightly changed copy&paste code is intentional.

8 years agocleanup: use code in place
Zdenek Kabelac [Mon, 9 Nov 2015 08:33:56 +0000 (09:33 +0100)]
cleanup: use code in place

Pass const strings to printf(),
and use  struct names directly instead of creating unused vars on stack.

8 years agocleanup: reoder rstatus init
Zdenek Kabelac [Sun, 8 Nov 2015 16:18:23 +0000 (17:18 +0100)]
cleanup: reoder rstatus init

In all error paths always initialize *rstatus.

8 years agocleanup: coverity quiet
Zdenek Kabelac [Sun, 8 Nov 2015 16:01:59 +0000 (17:01 +0100)]
cleanup: coverity quiet

While through all codepaths we never 'read' lock_id unless LCKF_CONVERT,
coverity cannot decrypt this.

As since it's usually better to pass in 'well-defined' data structures
preset lock_id to 0.

8 years agocleanup: use fputs for plain strings
Zdenek Kabelac [Sat, 7 Nov 2015 20:15:05 +0000 (21:15 +0100)]
cleanup: use fputs for plain strings

Use fputs() when printing plain string,
easier then fprintf which needs to parse it.

Also check fd before close is >= 0 -
it is - but coverity fail to see it, so eliminate
this false-positive warning.

8 years agocleanup: drop unneeded assign
Zdenek Kabelac [Sat, 7 Nov 2015 19:41:15 +0000 (20:41 +0100)]
cleanup: drop unneeded assign

prio is always assigned later.

8 years agocleanup: keep using enum typedef
Zdenek Kabelac [Sat, 7 Nov 2015 16:17:37 +0000 (17:17 +0100)]
cleanup: keep using enum typedef

Using enum instead of unsigned.

8 years agocleanup: use 64bit multiply for print
Zdenek Kabelac [Sat, 7 Nov 2015 16:16:49 +0000 (17:16 +0100)]
cleanup: use 64bit multiply for print

8 years agocleanup: drop unneeded header file
Zdenek Kabelac [Sat, 7 Nov 2015 16:16:32 +0000 (17:16 +0100)]
cleanup: drop unneeded header file

8 years agocleanup: use display_lvname
Zdenek Kabelac [Thu, 5 Nov 2015 11:29:44 +0000 (12:29 +0100)]
cleanup: use display_lvname

8 years agocleanup: use NAME_LEN
Zdenek Kabelac [Thu, 5 Nov 2015 10:58:03 +0000 (11:58 +0100)]
cleanup: use NAME_LEN

Let's have instant check for max name len when creating
subLV name.

8 years agocleanup: use NAME_LEN buffer instead of alloca
Zdenek Kabelac [Thu, 5 Nov 2015 17:32:47 +0000 (18:32 +0100)]
cleanup: use NAME_LEN buffer instead of alloca

Drop alloca and use NAME_LEN size to get implicit check
for max len of LV name.

8 years agocleanup: do not test alloca for NULL
Zdenek Kabelac [Thu, 5 Nov 2015 17:32:32 +0000 (18:32 +0100)]
cleanup: do not test alloca for NULL

alloca() never returns NULL.
In case stack is out-of-range the behaviour is undefined.

8 years agocleanup: drop unneded assign
Zdenek Kabelac [Mon, 9 Nov 2015 08:49:57 +0000 (09:49 +0100)]
cleanup: drop unneded assign

Coverity doesn't really like to see subcommand being assigned NULL,
so drop it.

8 years agoalloc: use own mem pool for alloc_handle
Zdenek Kabelac [Wed, 4 Nov 2015 13:54:07 +0000 (14:54 +0100)]
alloc: use own mem pool for alloc_handle

Keep alloc_handle's data in a single mempool and do not
spread them into vgmem pool.

8 years agocleanup: relocate error capture
Zdenek Kabelac [Wed, 4 Nov 2015 13:53:25 +0000 (14:53 +0100)]
cleanup: relocate error capture

Capture internal error before allocation anything.

8 years agotoollib: add missing check for lvmcache_init()
Zdenek Kabelac [Mon, 9 Nov 2015 08:47:21 +0000 (09:47 +0100)]
toollib: add missing check for lvmcache_init()

Coverity notices lvmcache_init() may fail so check and
error out in case of failure.

8 years agodevmanager: validate target params
Zdenek Kabelac [Mon, 9 Nov 2015 08:27:18 +0000 (09:27 +0100)]
devmanager: validate target params

Coverity: ensure we do not read through NULL pointers for
target_type and params.

8 years agoreport: add extra pointer check
Zdenek Kabelac [Sun, 8 Nov 2015 16:19:21 +0000 (17:19 +0100)]
report: add extra pointer check

Coverity was seeing possible trouble with NULL pointer dereference.
So ensure it may never happen.

8 years agolv_manip: do not deref NULL for debug message
Zdenek Kabelac [Mon, 9 Nov 2015 08:28:59 +0000 (09:28 +0100)]
lv_manip: do not deref NULL for debug message

Coverity: when 'pv2' would be passed as NULL, do not try to
deref it in debug message.

8 years agodev-type: fix TOCTOU order
Zdenek Kabelac [Sun, 8 Nov 2015 16:15:24 +0000 (17:15 +0100)]
dev-type: fix TOCTOU order

Doing 'stat' checking first and later opening is racy.
And since we do not really care about any 'status' info
here and we read 'sysfs' here - just drop whole 'stat()'
call and directly handle error from failing 'fopen()'.

8 years agothin: fix error path mem leak
Zdenek Kabelac [Sun, 8 Nov 2015 16:04:03 +0000 (17:04 +0100)]
thin: fix error path mem leak

Coverity: when parsing of thin-pool status would have failed,
it could have leaked memory pool and dmt struct.

8 years agolibdm: add test for dm_task_get_message_response()
Zdenek Kabelac [Mon, 9 Nov 2015 08:50:46 +0000 (09:50 +0100)]
libdm: add test for  dm_task_get_message_response()

Coverity notices dm_task_get_message_response() result should be
checked for NULL which should not be passed to dm_pool_strdup().

8 years agolibdm: exlicitly check for NULL
Zdenek Kabelac [Mon, 9 Nov 2015 08:44:26 +0000 (09:44 +0100)]
libdm: exlicitly check for NULL

Coverity: another explict check for NULL, where coverity fails to
see it.

8 years agolibdm: ensure vars are initialized
Zdenek Kabelac [Sun, 8 Nov 2015 16:21:22 +0000 (17:21 +0100)]
libdm: ensure vars are initialized

Coverity found potential error path, where code could
have used some unset variables.

8 years agolibdm: add missing error path check
Zdenek Kabelac [Mon, 9 Nov 2015 08:31:59 +0000 (09:31 +0100)]
libdm: add missing error path check

Coverity: do not continue with section cloning when root node
would a NULL.

8 years agolvconvert: add extra check for existance of pointer
Zdenek Kabelac [Mon, 9 Nov 2015 08:48:17 +0000 (09:48 +0100)]
lvconvert: add extra check for existance of pointer

Coverity here is not fully-in-picture - but please it
with validation of pointer which currently cannot be null,
since we always return at least empty string.

8 years agolvmetad: validate mda is not NULL
Zdenek Kabelac [Mon, 9 Nov 2015 08:43:09 +0000 (09:43 +0100)]
lvmetad: validate mda is not NULL

Coverity: make it explicitely obvious metadata area is not NULL.

8 years agolvmetad: check for pointers not NULL
Zdenek Kabelac [Mon, 9 Nov 2015 08:25:12 +0000 (09:25 +0100)]
lvmetad: check for pointers not NULL

Check for  arg_vgid_lookup and arg_name_lookup not being NULL.
Drop checking arg_vgid and arg_name for NULL since they
are already dereference earlier - thus mostly must be NOT NULL.

(If that would be possible larger rework of this function would be
required).

8 years agolvmetad: require meta_lookup
Zdenek Kabelac [Mon, 9 Nov 2015 08:24:13 +0000 (09:24 +0100)]
lvmetad: require meta_lookup

Coverity: do not call update_pvid_to_vgid() with
meta_lookup == NULL since it is dereferencing it.

8 years agolvmetad: check for allocation fail
Zdenek Kabelac [Sun, 8 Nov 2015 18:38:19 +0000 (19:38 +0100)]
lvmetad: check for allocation fail

Coverity: missing check for root != NULL as this pointer is
later dereferenced in add_last_node().

8 years agodmsetup: add missing checks for dm_stats_create() ret value
Zdenek Kabelac [Mon, 9 Nov 2015 08:45:53 +0000 (09:45 +0100)]
dmsetup: add missing checks for dm_stats_create() ret value

Coverity likes to see a check for dms not being NULL, so
add those missing ones...

8 years agodmsetup: check for NULL from dm_task_get_ioctl_timestamp
Zdenek Kabelac [Sun, 8 Nov 2015 18:27:22 +0000 (19:27 +0100)]
dmsetup: check for NULL from dm_task_get_ioctl_timestamp

Coverity: ensure NULL is not passed to dm_timestamp_delta().

8 years agoclvmd: check for pthread_create status
Zdenek Kabelac [Mon, 9 Nov 2015 08:23:27 +0000 (09:23 +0100)]
clvmd: check for pthread_create status

Coverity: likes to see checked function result.

8 years agodmeventd: open fifo in one function
Zdenek Kabelac [Sat, 7 Nov 2015 20:12:15 +0000 (21:12 +0100)]
dmeventd: open fifo in one function

Put calls related to fifo opening into a single function.

Fix  Time-Of-Check-Time-Of-Use and use fstat()
and fchmod() on already opened fd instead of
checking first path and then risking to open something
different.

8 years agodmeventd: reorder tou
Zdenek Kabelac [Sat, 7 Nov 2015 20:50:27 +0000 (21:50 +0100)]
dmeventd: reorder tou

8 years agolibdevmapper-event: fix fifo leak on error path
Zdenek Kabelac [Sun, 8 Nov 2015 16:10:38 +0000 (17:10 +0100)]
libdevmapper-event: fix fifo leak on error path

Coverity: when _init_client() fails, client fifo could have
been already openned and needs to be closed on error path.

8 years agoconfigure: report whether to build lvmlockd
Zdenek Kabelac [Mon, 2 Nov 2015 19:04:50 +0000 (20:04 +0100)]
configure: report whether to build lvmlockd

Report configured status for build with lvmlockd.

8 years agopost-release
Alasdair G Kergon [Mon, 9 Nov 2015 01:48:57 +0000 (01:48 +0000)]
post-release

8 years agopre-release v2_02_134
Alasdair G Kergon [Mon, 9 Nov 2015 01:45:22 +0000 (01:45 +0000)]
pre-release

8 years agotest: disable duplicate VG name test for lvmetad
David Teigland [Fri, 6 Nov 2015 21:58:22 +0000 (15:58 -0600)]
test: disable duplicate VG name test for lvmetad

Until we decide how duplicate VG names should be
handled by lvmetad, and implement that.

8 years agomirror: Fix log size calc when more than 1 extent.
Alasdair G Kergon [Thu, 5 Nov 2015 23:40:47 +0000 (23:40 +0000)]
mirror: Fix log size calc when more than 1 extent.

Currently the code creates the log separately after allocating space for
the data and as no data allocation is needed this second time,
total_extents ends up holding zero so use new_extents directly instead.

8 years agovg_read: skip repair and wipe for foreign and shared VGs
David Teigland [Wed, 28 Oct 2015 21:06:15 +0000 (16:06 -0500)]
vg_read: skip repair and wipe for foreign and shared VGs

When reading a foreign VG we cannot write it, since
it belongs to another host.  When reading a shared VG
we cannot write it because we may not have an ex lock.
(Or we may be reading the shared VG while not using
lvmlockd in which case it's like reading a foreign VG.)

Add the same checks for wiping outdated PVs.  We may
read a foreign or shared VG, or see the PVs, while
another host is part way through writing a new version
of the VG to the PVs.  This might cause us to think
some of the PVs are outdated.  We do not want to
write another host's PVs, especially when we may
wrongly conclude they are outdated.

8 years agolvmcache: change log_verbose to log_warn
David Teigland [Thu, 15 Oct 2015 21:35:40 +0000 (16:35 -0500)]
lvmcache: change log_verbose to log_warn

Without this, some cases miss printing a
warning for duplicate PVs.

8 years agolvmetad: log duplicate PVs returned from lvmetad
David Teigland [Thu, 15 Oct 2015 15:50:27 +0000 (10:50 -0500)]
lvmetad: log duplicate PVs returned from lvmetad

When the command gets a list of alternate devices
from lvmetad, log each one directly.  This is not
the same as the warnings when adding lvmcache,
which are related to which duplicate is preferred.

8 years agotests: skip duplicate vg names test with lvmetad
David Teigland [Fri, 30 Oct 2015 21:12:06 +0000 (16:12 -0500)]
tests: skip duplicate vg names test with lvmetad

If two PVs have different VGs with the same name
(different uuids), one of the VGs is ignored by
lvmetad.  A FIXME exists in lvmetad to find a
better response.

8 years agolvmetad: refactor and document
David Teigland [Fri, 18 Sep 2015 14:42:38 +0000 (09:42 -0500)]
lvmetad: refactor and document

update_metadata and pv_found update the cached metadata;
these are both reworked to improve the code, organize it
by each possible state and transition, make it much more
clear what's changing, add more error checking and
handling, and add comments.

The state and content of the cache (hash tables) does not
change (apart from some things that didn't work before),
and the communication to/from commands does not change.
The implementation and organization of the code making
the state changes does change significantly.

One detail related to the content of the cache does change:
different hash tables do not reference the same memory any more;
the target values in each hash table are allocated and freed
individually.

8 years agoconfig: fix copy error in examples
David Teigland [Tue, 3 Nov 2015 17:07:27 +0000 (11:07 -0600)]
config: fix copy error in examples

The same example was copied without
changing the variable name.

8 years agotest: api subdirectory is needed in PATH by pytest dev-mcsontos-spec-python
Marian Csontos [Mon, 2 Nov 2015 13:16:46 +0000 (14:16 +0100)]
test: api subdirectory is needed in PATH by pytest

8 years agotest: Run pytest with installed libs
Marian Csontos [Mon, 2 Nov 2015 11:52:30 +0000 (12:52 +0100)]
test: Run pytest with installed libs

8 years agospec: Add python bindings
Marian Csontos [Mon, 2 Nov 2015 10:33:13 +0000 (11:33 +0100)]
spec: Add python bindings

8 years agopost-release
Alasdair G Kergon [Sat, 31 Oct 2015 01:35:47 +0000 (01:35 +0000)]
post-release

8 years agopre-release v2_02_133
Alasdair G Kergon [Fri, 30 Oct 2015 15:34:00 +0000 (15:34 +0000)]
pre-release

8 years agoWHATS_NEW: reporting commands and -o-/-o+ extension
Peter Rajnoha [Fri, 30 Oct 2015 14:50:35 +0000 (15:50 +0100)]
WHATS_NEW: reporting commands and -o-/-o+ extension

8 years agocommands: update command help for -o|--options for reporting commands
Peter Rajnoha [Fri, 30 Oct 2015 14:43:57 +0000 (15:43 +0100)]
commands: update command help for -o|--options for reporting commands

8 years agoman: pvs/vgs/lvs and -o+, -o-, -o#
Peter Rajnoha [Fri, 30 Oct 2015 14:36:35 +0000 (15:36 +0100)]
man: pvs/vgs/lvs and -o+, -o-, -o#

8 years agotests: add report-fields.sh test
Peter Rajnoha [Fri, 30 Oct 2015 14:06:49 +0000 (15:06 +0100)]
tests: add report-fields.sh test

8 years agoreport: support "-o #field_name1,field_name2,..."
Peter Rajnoha [Thu, 22 Oct 2015 13:37:27 +0000 (15:37 +0200)]
report: support "-o #field_name1,field_name2,..."

8 years agoreport: recognize known prefix when processing "-o -field_name1,field_name2,..."
Peter Rajnoha [Thu, 22 Oct 2015 12:30:11 +0000 (14:30 +0200)]
report: recognize known prefix when processing "-o -field_name1,field_name2,..."

8 years agoreport: add report_get_field_prefix function
Peter Rajnoha [Thu, 22 Oct 2015 11:27:59 +0000 (13:27 +0200)]
report: add report_get_field_prefix function

8 years agoreport: support "-o -field_name1,field_name2,...."
Peter Rajnoha [Wed, 21 Oct 2015 13:36:26 +0000 (15:36 +0200)]
report: support "-o -field_name1,field_name2,...."

8 years agoreport: make report options defined by "-o" groupable
Peter Rajnoha [Wed, 21 Oct 2015 12:57:49 +0000 (14:57 +0200)]
report: make report options defined by "-o" groupable

Also, besides making "-o" groupable, use string lists to store
lists of options temporarily while processing all instances of
the "-o" group.

8 years agorefactor: move code detecting report options to a separate function
Peter Rajnoha [Tue, 20 Oct 2015 14:36:11 +0000 (16:36 +0200)]
refactor: move code detecting report options to a separate function

8 years agostr_list: add str_list_destroy function
Peter Rajnoha [Tue, 20 Oct 2015 14:12:16 +0000 (16:12 +0200)]
str_list: add str_list_destroy function

The str_list_destroy function may be called to cleanup memory when
the list is not used anymore and the list itself was not allocated
from the memory pool.

8 years agostr_list: add str_list_to_str and str_to_str_list functions
Peter Rajnoha [Tue, 20 Oct 2015 14:01:10 +0000 (16:01 +0200)]
str_list: add str_list_to_str and str_to_str_list functions

The str_list_to_str and str_to_str_list are helper functions to
convert string list to a single string and vice versa.

8 years agostr_list: also allow memory allocation without memory pool
Peter Rajnoha [Tue, 20 Oct 2015 12:09:09 +0000 (14:09 +0200)]
str_list: also allow memory allocation without memory pool

8 years agoNew entries for pvs related fixes.
David Teigland [Fri, 30 Oct 2015 14:05:21 +0000 (09:05 -0500)]
New entries for pvs related fixes.

8 years agometadata: format_text: also count with calculated mda size of 0
Peter Rajnoha [Fri, 30 Oct 2015 11:02:29 +0000 (12:02 +0100)]
metadata: format_text: also count with calculated mda size of 0

When checking minimum mda size, make sure the mda_size after alignment
and calculation is more than 0 - if there's no place for an MDA at the
end of the disk, the _text_pv_add_metadata_area does not try to add it
there and it returns (because we already have the MDA at the start of
the disk at least).

8 years agotests: add test for minimum mda size
Peter Rajnoha [Fri, 30 Oct 2015 09:02:00 +0000 (10:02 +0100)]
tests: add test for minimum mda size

8 years agometadata: format_text: better check for metadata overlap
Peter Rajnoha [Fri, 30 Oct 2015 07:57:34 +0000 (08:57 +0100)]
metadata: format_text: better check for metadata overlap

Actually, we don't need extra condition as introduced in commit
00348c0a630a7e5578edf48052ec695b15de752f. We should fix the last
condition:

  (mdac->rlocn.size >= mdah->size)

...which should be:

  (MDA_HEADER_SIZE + (rlocn ? rlocn->size : 0) + mdac->rlocn.size >= mdah->size))

Where the "mdac" is new metadata, the "rlocn" is old metadata.

So the main problem with the previous condition was that it
didn't count in MDA_HEADER_SIZE properly (and possible existing
metadata - the "rlocn"). This could have caused the error state
where metadata in ring buffer overlap to not be hit.

Replace the new condition introduced in 00348c0a630a7e5578edf48052ec695b15de752f
with the improved one for the condition that existed there
already but it was just incomplete.

8 years agoWHATS_NEW: recent commits
Peter Rajnoha [Thu, 29 Oct 2015 15:50:09 +0000 (16:50 +0100)]
WHATS_NEW: recent commits

8 years agometadata: format_text: check VG metadata do not overlap themselves
Peter Rajnoha [Thu, 29 Oct 2015 15:33:06 +0000 (16:33 +0100)]
metadata: format_text: check VG metadata do not overlap themselves

We're already checking whether old and new meta do not overlap in
ring buffer (as we need to keep both old and new meta during vg_write
up until vg_commit).

We also need to check whether the new metadata do not overlap
themselves in case we don't have old metadata yet (...because
we're in vgcreate). This could happen if we're creating a VG so
that the very first metadata written are long enough that it wraps
themselves in metadata ring buffer.

Although we limited the minimum metadata area size better with the
previous commit ccb8da404d00288b7d49c7a28006ec5d4687bb55 which
makes the initial VG metadata overlap in ring buffer to be less
probable, the risk of hitting this overlap condition is still there
if we still manage to generate big enough metadata somehow.

For example, users can provide many and/or long VG tags during vgcreate
so that the VG metadata is long enough to start to wrap in the ring
buffer again...

8 years agometadata: format_text: check metadata area size is at least MDA_SIZE_MIN
Peter Rajnoha [Thu, 29 Oct 2015 14:59:29 +0000 (15:59 +0100)]
metadata: format_text: check metadata area size is at least MDA_SIZE_MIN

8 years agotests: update test for resize
Zdenek Kabelac [Thu, 29 Oct 2015 14:11:16 +0000 (15:11 +0100)]
tests: update test for resize

Drop already tested 'threshold & create' which is in
lvextend-thin-full.sh

Count with now match faster 'dmeventd' wakeup on watermark
as it's now nearly instant after crossing threshold value.

8 years agotests: replace invalid use of 'fail' with 'die'
Ondrej Kozina [Thu, 29 Oct 2015 12:30:29 +0000 (13:30 +0100)]
tests: replace invalid use of 'fail' with 'die'

8 years agotests: let pass bigger readahead
Zdenek Kabelac [Thu, 29 Oct 2015 11:33:15 +0000 (12:33 +0100)]
tests: let pass bigger readahead

If the underlaying device has actually bigger read-ahead settings,
let it pass.
But anyway switch to 512 strip-size to get really high R-A sector count.

8 years agotests: fix wrong line has been commented
Zdenek Kabelac [Thu, 29 Oct 2015 11:30:00 +0000 (12:30 +0100)]
tests: fix wrong line has been commented

8 years agotests: no point in using should
Zdenek Kabelac [Thu, 29 Oct 2015 11:23:38 +0000 (12:23 +0100)]
tests: no point in using should

lvmetad does not support lvm1 - so expect failure.

8 years agocleanup: error is not a WARNING
Zdenek Kabelac [Thu, 29 Oct 2015 11:18:40 +0000 (12:18 +0100)]
cleanup: error is not a WARNING

Drop 'WARNING' from error message.
It's plain error message leading to command failure.

8 years agocleanup: remove thin low_water_mark from metadata
Zdenek Kabelac [Thu, 29 Oct 2015 11:07:24 +0000 (12:07 +0100)]
cleanup: remove thin low_water_mark from metadata

This option could never have been printed in lvm2 metadata, so it could
be safely removed as it could have been set only as 0.

These configurable setting is supported via metadata profile.

8 years agocleanup: use same type
Zdenek Kabelac [Thu, 29 Oct 2015 11:01:31 +0000 (12:01 +0100)]
cleanup: use same type

8 years agocleanup: easier error messages
Zdenek Kabelac [Thu, 29 Oct 2015 10:01:24 +0000 (11:01 +0100)]
cleanup: easier error messages

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