]> sourceware.org Git - lvm2.git/log
lvm2.git
10 years agolibdm-config: Interpret barewords after '=' as strings.
Petr Rockai [Wed, 19 Nov 2014 17:48:47 +0000 (18:48 +0100)]
libdm-config: Interpret barewords after '=' as strings.

10 years agolibdm-config: Implement dm_config_flatten.
Petr Rockai [Wed, 19 Nov 2014 17:37:31 +0000 (18:37 +0100)]
libdm-config: Implement dm_config_flatten.

10 years agolibdm-config: Re-link config trees to reflect file order of keys/sections.
Petr Rockai [Tue, 18 Nov 2014 22:39:11 +0000 (23:39 +0100)]
libdm-config: Re-link config trees to reflect file order of keys/sections.

10 years agolibdm-config: Allow paths (section/key = value) in config files.
Petr Rockai [Mon, 10 Nov 2014 06:38:19 +0000 (07:38 +0100)]
libdm-config: Allow paths (section/key = value) in config files.

The order of the resulting tree is based on the first appearance of
sections. With no section repeats, the sections stay as listed in the
config file. Sections using the brace syntax 'section { key = value }' are
treated the same way: 'section { x = 1 } section { y = 2 }' is the same as
'section/x = 1 section/y = 2' is the same as 'section { x = 1 y = 2 }'

10 years agocache: check for internal error
Zdenek Kabelac [Thu, 20 Nov 2014 15:35:46 +0000 (16:35 +0100)]
cache: check for internal error

Don't try to duplicate NULL on internal error path.

10 years agotoollib: release vg on ignore path
Zdenek Kabelac [Thu, 20 Nov 2014 07:52:44 +0000 (08:52 +0100)]
toollib: release vg on ignore path

Missing call to release_vg().

10 years agorevert: 7639eae and 4a52a92
Peter Rajnoha [Thu, 20 Nov 2014 07:22:34 +0000 (08:22 +0100)]
revert: 7639eae and 4a52a92

Revert 7639eae8919e5872143562db8118d039f5a41225 and
4a52a9212cc5d3ae90196776f28dbfb319002c74. We need a better fix here.

10 years agotests: use snapshot targets
Zdenek Kabelac [Wed, 19 Nov 2014 22:24:18 +0000 (23:24 +0100)]
tests: use snapshot targets

10 years agotests: prepare control node before clvmd
Zdenek Kabelac [Wed, 19 Nov 2014 22:22:52 +0000 (23:22 +0100)]
tests: prepare control node before clvmd

Make sure there is 'control' node before clvmd is started.
Somehow  'clvmd' is not allowed by selinux to create one.

TODO: Check is selinux policy is right here...

10 years agothin: fix error path
Zdenek Kabelac [Wed, 19 Nov 2014 17:57:40 +0000 (18:57 +0100)]
thin: fix error path

Print pool name and not the origin name.

10 years agosystemd: clvmd and cmirrord systemd unit - use usrsbindir instead of sbindir
Peter Rajnoha [Wed, 19 Nov 2014 15:03:11 +0000 (16:03 +0100)]
systemd: clvmd and cmirrord systemd unit - use usrsbindir instead of sbindir

10 years agoconfigure: expand prefix and exec_prefix directly in configure
Peter Rajnoha [Wed, 19 Nov 2014 15:02:41 +0000 (16:02 +0100)]
configure: expand prefix and exec_prefix directly in configure

In case someone wants to use @some_path@ that contains
prefix or exec_prefix and it's used in other files than Makefiles
(Makefiles used make.tmpl to expand these).

10 years agoconfigure: make configure --enable-udev-systemd-background-jobs only for systemd...
Peter Rajnoha [Wed, 19 Nov 2014 12:47:09 +0000 (13:47 +0100)]
configure: make configure --enable-udev-systemd-background-jobs only for systemd >= 205

systemd-run is available in systemd>=205. Also, this fix prevents
systemd-specific udev rules in 69-dm-lvm-metad.rules to appear in
case systemd environment is not available - make configure to check
this automatically and use these systemd specific rules only if it
is applicable.

10 years agoman: clvmd updates
Zdenek Kabelac [Wed, 19 Nov 2014 00:04:24 +0000 (01:04 +0100)]
man: clvmd updates

- closer to the recommendation of man-pages (7) if possible
- Add crossrefs
- Sort options and crossrefs
- Fix default timeout (60 secs) of -t
- Documents -I[auto]

Signed-off-by: Stéphane Aulery <saulery@free.fr>
10 years agoman: clvmd help output
Zdenek Kabelac [Tue, 18 Nov 2014 21:07:58 +0000 (22:07 +0100)]
man: clvmd help output

Closer to the recommendation of groff_man (7) if possible

Signed-off-by: Stéphane Aulery <saulery@free.fr>
10 years agoman: blkdeactivate help output
Zdenek Kabelac [Tue, 18 Nov 2014 23:35:04 +0000 (00:35 +0100)]
man: blkdeactivate help output

- Closer to the recommendation of man-pages and groff_man (7) if
  possible
- Sort options and crossrefs
- Relocate sub-options on the right places

Signed-off-by: Stéphane Aulery <saulery@free.fr>
10 years agoman: lvchange update
Zdenek Kabelac [Tue, 18 Nov 2014 23:30:43 +0000 (00:30 +0100)]
man: lvchange update

Fix \fI usage.

10 years agocleanup: drop unused var
Zdenek Kabelac [Tue, 18 Nov 2014 14:52:46 +0000 (15:52 +0100)]
cleanup: drop unused var

10 years agolocking: rename LCK_CONVERT
Zdenek Kabelac [Tue, 18 Nov 2014 08:04:30 +0000 (09:04 +0100)]
locking: rename LCK_CONVERT

All 'MODE' bits are using _MODE suffix so rename to LCK_CONVERT_MODE
(part of rhbz 735445).
No functional change.

10 years agotoollib: improve ignore_vg case in _process_pvs_in_vgs
David Teigland [Tue, 18 Nov 2014 15:22:37 +0000 (09:22 -0600)]
toollib: improve ignore_vg case in _process_pvs_in_vgs

ignore_vg now returns 0 for the FAILED_CLUSTERED case,
so all the ignore_vg 1 cases will return vg's with an
empty vg->pvs, so we do not need to iterate through
vg->pvs to remove the entries from the devices list.

Clean up whitespace problems in that area from the
previous commit.

10 years agomemlock: Make malloc reserve more robust against glibc tricks.
Petr Rockai [Tue, 30 Sep 2014 08:56:59 +0000 (10:56 +0200)]
memlock: Make malloc reserve more robust against glibc tricks.

10 years agotests: deactivate repaired before swap
Zdenek Kabelac [Mon, 17 Nov 2014 07:44:53 +0000 (08:44 +0100)]
tests: deactivate repaired before swap

10 years agotests: thin repair testing
Zdenek Kabelac [Sun, 16 Nov 2014 23:41:33 +0000 (00:41 +0100)]
tests: thin repair testing

More checks for thin related tools.
Add same functionality for cache related tools.

10 years agotests: reduce number of sync waiting
Zdenek Kabelac [Sun, 16 Nov 2014 23:34:44 +0000 (00:34 +0100)]
tests: reduce number of sync waiting

Lets assume faster systems, if we have too big raid arrays,
reduce them.

10 years agotests: skip another older kernel from raid456
Zdenek Kabelac [Sun, 16 Nov 2014 23:32:49 +0000 (00:32 +0100)]
tests: skip another older kernel from raid456

10 years agotoollib: fixes and cleanup of recent changes
David Teigland [Fri, 14 Nov 2014 21:00:35 +0000 (15:00 -0600)]
toollib: fixes and cleanup of recent changes

- Fix problems with recent changes related to skipping in:
  . _process_vgnameid_list
  . _process_pvs_in_vgs

- Undo unnecessary changes to the code structure and readability.

- Preserve valid but minor changes:
  . testing FAILED bit values in ignore_vg
  . using "skip" value from ignore_vg instead of "ret" value
  . applying the sigint check to the start of all loops
  . setting stack backtrace when ECMD_PROCESSED is not returned,
    i.e. apply the following pattern:

ret = process_foo();
if (ret != ECMD_PROCESSED)
stack;
if (ret > ret_max)
ret_max = ret;

10 years agotoollib: ignore_vg() with skip is not locked
Zdenek Kabelac [Fri, 14 Nov 2014 18:32:03 +0000 (19:32 +0100)]
toollib: ignore_vg() with skip is not locked

Extend/fix d8923457b82456ebee3e333b3fcc26087483cd01 commit.

'skip'-ed VG is not holding any lock - so don't unlock such VG.

At the same time simplify the code around and relase VG at a single
place and unlock only not skiped and not ignored VGs.

10 years agotests: explicit raid sync
Zdenek Kabelac [Thu, 13 Nov 2014 20:52:02 +0000 (21:52 +0100)]
tests: explicit raid sync

10 years agodebug: switch to verbose
Zdenek Kabelac [Fri, 14 Nov 2014 15:11:43 +0000 (16:11 +0100)]
debug: switch to verbose

When there is no real error from the function - avoid using log_error().

10 years agodebug: better message for pool zeroing state
Zdenek Kabelac [Fri, 14 Nov 2014 15:11:16 +0000 (16:11 +0100)]
debug: better message for pool zeroing state

10 years agocleanup: add '.' to log messages
Zdenek Kabelac [Fri, 14 Nov 2014 15:08:27 +0000 (16:08 +0100)]
cleanup: add '.' to log messages

10 years agovg_read: correct warning
Zdenek Kabelac [Fri, 14 Nov 2014 13:58:20 +0000 (14:58 +0100)]
vg_read: correct warning

Use log_warn when we are effectively not creating an error -
we 'allowed' inconsistent read for a reason - so it's just warning
level we process inconsistent VG - it's upto caller later to decide
error level of command return value and in case of error it needs
to use log_error then.

10 years agotoolib: fix ignore_vg
Zdenek Kabelac [Fri, 14 Nov 2014 09:50:31 +0000 (10:50 +0100)]
toolib: fix ignore_vg

Rework ignore_vg() API so it properly handles
multiple kind of vg_read_error() states.

Skip processing only otherwise valid VG.

Always return ECMD_FAILED when break is detected.

Check sigint_caught() in front of dm iterator loop.

Add stack for _process failing ret codes.

10 years agovg_read: use new error flag
Zdenek Kabelac [Fri, 14 Nov 2014 13:55:57 +0000 (14:55 +0100)]
vg_read: use new error flag

Failed recovery provides different (NULL) VG then FAILED_INCONSISTENT.
Mark it with different failure bit - since FAILED_INCONSISTENT is
supposed to contain something 'usable' (thought inconsistent).

10 years agolvmcache: remove unnecessary line break syntax
David Teigland [Thu, 13 Nov 2014 17:07:34 +0000 (11:07 -0600)]
lvmcache: remove unnecessary line break syntax

10 years agolvmcache.7: remove unwanted line continuation syntax
David Teigland [Thu, 13 Nov 2014 17:04:15 +0000 (11:04 -0600)]
lvmcache.7: remove unwanted line continuation syntax

10 years agolvconvert.8: fix bold and italic syntax mistake
Stéphane Aulery [Wed, 12 Nov 2014 12:39:36 +0000 (13:39 +0100)]
lvconvert.8: fix bold and italic syntax mistake

Signed-off-by: Stéphane Aulery <saulery@free.fr>
10 years agocleanup: remove unused headers
Zdenek Kabelac [Thu, 13 Nov 2014 13:36:20 +0000 (14:36 +0100)]
cleanup: remove unused headers

10 years agocleanup: validate pointers
Zdenek Kabelac [Thu, 13 Nov 2014 16:40:30 +0000 (17:40 +0100)]
cleanup: validate pointers

Mostly on almost impossible to happen paths - but stay safe.

10 years agolvm2api: use fully initilized struct
Zdenek Kabelac [Thu, 13 Nov 2014 16:42:09 +0000 (17:42 +0100)]
lvm2api: use fully initilized struct

Don't pass partially initialized struct.

10 years agoreporter: drop mem on error path
Zdenek Kabelac [Thu, 13 Nov 2014 16:39:22 +0000 (17:39 +0100)]
reporter: drop mem on error path

Coverity noticed.

10 years agocache: wrong feature in seg is internal error
Zdenek Kabelac [Thu, 13 Nov 2014 16:41:45 +0000 (17:41 +0100)]
cache: wrong feature in seg is internal error

10 years agocleanup: free mempool memory used for LV status in PVSEGS reporting
Peter Rajnoha [Thu, 13 Nov 2014 13:41:01 +0000 (14:41 +0100)]
cleanup: free mempool memory used for LV status in PVSEGS reporting

Addendum to previous commit 4de7699855e06bf341d5f91b9c3fc4ba4de18cd6.

10 years agocleanup: unify LV info and LV segment status reporting in combination with LVS, SEGS...
Peter Rajnoha [Thu, 13 Nov 2014 13:14:20 +0000 (14:14 +0100)]
cleanup: unify LV info and LV segment status reporting in combination with LVS, SEGS and PVSEGS reporting

Move common code into shared internal fn so the logic for getting the
LV info as well LV segment status is not scattered around - call common
_do_info_and_status to gather required parts in reporting handlers.

10 years agocleanup: cleanup internal interface to acquire segment status
Peter Rajnoha [Thu, 13 Nov 2014 10:41:49 +0000 (11:41 +0100)]
cleanup: cleanup internal interface to acquire segment status

 - Add separate lv_status fn (if we're interested only in seg status,
   but not lv info at the same time as it is with existing
   lv_info_with_seg_status fn). So we 3 fns:

     - lv_info (existing one, runs only info ioctl, fills in struct lvinfo only)

     - lv_status (new one, runs status ioctl, fills in struct lv_seg_status only)

     - lv_info_with_seg_status (existing one, runs status ioctl, fills
       in struct lvinfo as well as lv_seg_status)

 - Add more comments in the code explaining the difference between lv_info,
   lv_status and lv_info_with_seg_status and their return values.

 - Move decision whether lv_info_with_seg_status needs to call only
   status ioctl (in case the segment for which we require status is from
   the LV for which we require info) or separate status and info ioctl
   (in case the segment for which we require status is from different
    LV that the one for which we require info) into
   lv_info_with_seg_status fn so caller doesn't need to bother about
   this at all.

 - Cleanup internal interface for this seg status so it's more readable.

10 years agopvck: Use non-zero exit status after failure.
Alasdair G Kergon [Thu, 13 Nov 2014 12:26:43 +0000 (12:26 +0000)]
pvck: Use non-zero exit status after failure.

10 years agocleanu: drop duplicate const
Zdenek Kabelac [Thu, 13 Nov 2014 12:15:58 +0000 (13:15 +0100)]
cleanu: drop duplicate const

10 years agopool: fix removal of pool metadata spare
Zdenek Kabelac [Thu, 13 Nov 2014 12:09:07 +0000 (13:09 +0100)]
pool: fix removal of pool metadata spare

Since we support device stack of pools over pool
(thin-pool with cache data volume) the existing code
is no longer able to detect orphan _pmspare.

So instead do a _pmspare check after volume removal,
and remove spare afterwards.

10 years agocache: improve pending_delete
Zdenek Kabelac [Thu, 13 Nov 2014 09:08:40 +0000 (10:08 +0100)]
cache: improve pending_delete

We need to stop guessing deleted names - so rather collect
deleted  UUID into a string list - and then remove them properly
in _clean_tree. Restore origin _clean_tree behaviour them for
currently unconverted removal of snapshots.

Pending delete feature now properly tracks whole subtree of cache
(so i.e. data or metadata as raid volumes).
It properly replaces all related volumes with 'errors' in suspend
preload, then resume them as error and remove collected UUIDs
from root - since they are not longer part of any volume deps.

10 years agocoverity: commit ba2302346 - report log_sys_error properly
Peter Rajnoha [Wed, 12 Nov 2014 14:16:54 +0000 (15:16 +0100)]
coverity: commit ba2302346 - report log_sys_error properly

log_sys_error uses errno, hence we need to report the first
failure before reporting another failure that uses errno as well.

10 years agocoverity: fix possible dereference of NULL pointer
Peter Rajnoha [Wed, 12 Nov 2014 09:17:17 +0000 (10:17 +0100)]
coverity: fix possible dereference of NULL pointer

This would be in case the pool segment was not found.

LVM2.2.02.112/lib/metadata/pool_manip.c:238:36: warning: Access to field 'segtype' results in a dereference of a null pointer (loaded from variable 'pool_seg')

10 years agocoverity: fix possible integer overflow
Peter Rajnoha [Wed, 12 Nov 2014 09:03:27 +0000 (10:03 +0100)]
coverity: fix possible integer overflow

LVM2.2.02.112/lib/metadata/cache_manip.c:73: overflow_before_widen: Potentially overflowing expression "*pool_metadata_extents *vg->extent_size" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
LVM2.2.02.112/lib/activate/dev_manager.c:217: overflow_before_widen: Potentially overflowing expression "seg_status->seg->len * extent_size" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
LVM2.2.02.112/lib/activate/dev_manager.c:217: overflow_before_widen: Potentially overflowing expression "seg_status->seg->le * extent_size" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).

10 years agocoverity: fix compiler warning
Peter Rajnoha [Wed, 12 Nov 2014 08:42:53 +0000 (09:42 +0100)]
coverity: fix compiler warning

LVM2.2.02.112/lib/activate/dev_manager.c:196:5: warning: 'dmtask' may be used uninitialized in this function [-Wmaybe-uninitialized]

In _info_run fn:

switch (type) {
case INFO:
...
case STATUS:
...
case MKNODES:
...
}

The "type" is enum and currently only those three types are supported,
but if we added a new type in the future, this would end up with a bug
(if we forgot to add the new "case" in that "switch"). So let's make
sure proper internal error is printed:

default:
log_error(INTERNAL_ERROR "_info_run: unhandled info type");
                return 0;

10 years agocache: fix clean_tree
Zdenek Kabelac [Wed, 12 Nov 2014 08:34:46 +0000 (09:34 +0100)]
cache: fix clean_tree

Fix 8121074fda126cc6c0df05fba066cc9365e00255 - the patch
incorrectly removed also other top-level nodes.

It needs to deactivate purely subnodes of _corig.

10 years agoman: fix (\+) syntax warning of Groff
Stéphane Aulery [Sun, 9 Nov 2014 01:18:31 +0000 (02:18 +0100)]
man: fix (\+) syntax warning of Groff

Signed-off-by: Stéphane Aulery <saulery@free.fr>
10 years agocoverity: remove redundant condition
Peter Rajnoha [Wed, 12 Nov 2014 08:30:02 +0000 (09:30 +0100)]
coverity: remove redundant condition

LVM2.2.02.112/daemons/clvmd/clvmd.c:1131: warning[arrayIndexOutOfBoundsCond]: Array 'row[8]' accessed at index 8, which is out of bounds. Otherwise condition 'j==8' is redundant.

This code:

int i,j = 0;
...
for (i = 0; i < len; ++i) {
...
if ((j == 8) || (i + 1 == len)) {
for (;j < 8; ++j) {
...
}
...
j = 0;
}
}

Indeed - j is 0 at the beginning, then iterating till j < 8,
then always zeroed at the end of the outer loop - so "j" never
reaching value of 8 - the j == 8 condition is redundant.

10 years agocoverity: fix resource leaks
Peter Rajnoha [Wed, 12 Nov 2014 08:18:55 +0000 (09:18 +0100)]
coverity: fix resource leaks

LVM2.2.02.112/tools/toollib.c:1991: leaked_storage: Variable "iter" going out of scope leaks the storage it points to.
LVM2.2.02.112/lib/filters/filter-usable.c:89: leaked_storage: Variable "f" going out of scope leaks the storage it points to.
LVM2.2.02.112/lib/activate/dev_manager.c:1874: leaked_handle: Handle variable "fd" going out of scope leaks the handle.

10 years agopost-release
Alasdair G Kergon [Tue, 11 Nov 2014 14:15:32 +0000 (14:15 +0000)]
post-release

10 years agopre-release v2_02_112
Alasdair G Kergon [Tue, 11 Nov 2014 14:13:00 +0000 (14:13 +0000)]
pre-release

10 years agodev_manager: only support status for cache segment at the moment
Peter Rajnoha [Tue, 11 Nov 2014 13:55:58 +0000 (14:55 +0100)]
dev_manager: only support status for cache segment at the moment

When getting status for LV segment types, we need to be sure
that proper segment is selected for the status ioctl.

When reporting fields that require status ioctl,
the "_choose_lv_segment_for_status_report" fn in tools/reporter.c
must be completed properly to choose the proper segment for all
the LV types (at the moment, it just takes the first LV segment
by default).

This works fine with cache LVs surely. The other segment types
need more auditing. We use this status ioctl only for cache status
fields at the moment only, so restrict it to the cache only.

Once the _choose_lv_segment_for_status_report is completed
properly, release the restriction in _get_segment_status_from_target_params.

10 years agocache: pending_delete fixes
Zdenek Kabelac [Tue, 11 Nov 2014 12:31:25 +0000 (13:31 +0100)]
cache: pending_delete fixes

10 years agocache: never create new table entry for deleted cache
Zdenek Kabelac [Tue, 11 Nov 2014 10:00:51 +0000 (11:00 +0100)]
cache: never create new table entry for deleted cache

10 years agocache: no status for pending deleted cache
Zdenek Kabelac [Tue, 11 Nov 2014 10:00:35 +0000 (11:00 +0100)]
cache: no status for pending deleted cache

10 years agoWHATS_NEW: '_' -> ','
Peter Rajnoha [Tue, 11 Nov 2014 12:27:34 +0000 (13:27 +0100)]
WHATS_NEW: '_' -> ','

10 years agoreport: add cache device status fields
Peter Rajnoha [Fri, 24 Oct 2014 11:39:56 +0000 (13:39 +0200)]
report: add cache device status fields

New reporting fields related to cache device status:
  - cache_total_blocks
  - cache_used_blocks
  - cache_dirty_blocks
  - cache_read_hits
  - cache_read_misses
  - cache_write_hits
  - cache_write_misses

10 years agodev_manager: enhance dev_manager_info to acquire LV segment status if requested,...
Peter Rajnoha [Tue, 4 Nov 2014 14:00:32 +0000 (15:00 +0100)]
dev_manager: enhance dev_manager_info to acquire LV segment status if requested, add lv_info_with_seg_status fn

10 years agoreport: add new LVSSTATUS and SEGSSTATUS report type
Peter Rajnoha [Tue, 21 Oct 2014 10:01:57 +0000 (12:01 +0200)]
report: add new LVSSTATUS and SEGSSTATUS report type

Similar to LVSINFO type which gathers LV + its DM_DEVICE_INFO, the
new LVSSTATUS/SEGSSTATUS report type will gather LV/segment + its
DM_DEVICE_STATUS.

Since we can report status only for certain segment, in case
of LVSSTATUS we need to choose which segment related to the LV
should be processed that represents the "LV status". In case of
SEGSSTATUS type it's clear - the status is reported for the
segment just processed.

10 years agorefactor: rename struct lv_with_info used in reporting code to lv_with_info_and_seg_s...
Peter Rajnoha [Mon, 20 Oct 2014 11:46:50 +0000 (13:46 +0200)]
refactor: rename struct lv_with_info used in reporting code to lv_with_info_and_seg_status

The former struct lv_with_info is renamed to lv_with_info_and_seg_status as it can
hold more than just "info", there's lv's segment status now in addition:

struct lv_with_info_and_seg_status {
struct logical_volume *lv;
struct lvinfo *info;
struct lv_seg_status *seg_status;
}

Where struct lv_seg_status is:

struct lv_seg_status {
struct dm_pool *mem;
struct lv_segment lv_seg;
lv_seg_status_type_t type;
void *status; /* struct dm_status_* */
}

Where lv_seg points to lv's segment that is being reported or
processed in general.

New struct lv_seg_status keeps the information about segment status -
the status retrieved via DM_DEVICE_STATUS ioctl. This information will
be used for reporting dm device target status for the LV segment
specified.

So this patch introduces third level of LV information that is
kept for reuse while reporting fields within one reporting line,
causing only one DM_DEVICE_STATUS ioctl call per LV segment line
reported (otherwise we'd need to call the DM_DEVICE_STATUS for each
segment status field in one LV segment/reporting line which is not
efficient).

This is following exactly the same principle as already introduced
by commit ecb2be5d1642aa0142d216f9e52f64fd3e8c3fc8.

So currently we have three levels of information that can be used
to report an LV/LV segment:

    - LV metadata itself (struct logical_volume *lv)

    - LV's DM_DEVICE_INFO ioctl result (struct lvinfo *info)

    - LV's segment DM_DEVICE_STATUS ioctl result (this status must be
      bound to a segment, not the whole LV as the whole LV may be
      composed of several segments of course)
      (this is the new struct lv_seg_status *seg_status)

10 years agolibdm: still better API
Zdenek Kabelac [Mon, 10 Nov 2014 22:41:03 +0000 (23:41 +0100)]
libdm: still better API

Do not use 'any' policy name as a value in config tree - so we stick
with 'policy_settings' and extra 'policy_name' for libdm params.

Update lvm2 API as well.

Example of supported metadata:

 policy = "mq"
 policy_settings {
      migration_threshold = 2048
      sequential_threshold = 512
      random_threshold = 4
      read_promote_adjustment = 10
 }

10 years agodev_manager: workaround to allow top-level _tmeta, _tdata
Zdenek Kabelac [Mon, 10 Nov 2014 23:50:13 +0000 (00:50 +0100)]
dev_manager: workaround to allow top-level _tmeta, _tdata

10 years agomirror: layer remove doesn't work properly with mirrors
Zdenek Kabelac [Mon, 10 Nov 2014 21:32:43 +0000 (22:32 +0100)]
mirror: layer remove doesn't work properly with mirrors

10 years agotests: reach cache params
Zdenek Kabelac [Mon, 10 Nov 2014 20:29:20 +0000 (21:29 +0100)]
tests: reach cache params

10 years agotests: cache snapshot
Zdenek Kabelac [Tue, 4 Nov 2014 22:24:56 +0000 (23:24 +0100)]
tests: cache snapshot

10 years agodebug: log tree type is created
Zdenek Kabelac [Sat, 8 Nov 2014 22:41:22 +0000 (23:41 +0100)]
debug: log tree type is created

Print tree type and use internal_error for unknown type.

10 years agocleanup: gcc warnings
Zdenek Kabelac [Sat, 8 Nov 2014 14:33:17 +0000 (15:33 +0100)]
cleanup: gcc warnings

10 years agocleanup: indents comments backtraces
Zdenek Kabelac [Thu, 6 Nov 2014 19:36:53 +0000 (20:36 +0100)]
cleanup: indents comments backtraces

10 years agocleanup: use chunk_size directly
Zdenek Kabelac [Sun, 9 Nov 2014 17:55:42 +0000 (18:55 +0100)]
cleanup: use chunk_size directly

10 years agocache: use LV_PENDING_DELETE
Zdenek Kabelac [Mon, 10 Nov 2014 09:56:43 +0000 (10:56 +0100)]
cache: use LV_PENDING_DELETE

10 years agocache: _corig has UUID suffix
Zdenek Kabelac [Tue, 4 Nov 2014 22:19:34 +0000 (23:19 +0100)]
cache: _corig has UUID suffix

Use -real suffix for cache origin device.

10 years agocache: option
Zdenek Kabelac [Mon, 10 Nov 2014 09:07:41 +0000 (10:07 +0100)]
cache: option

10 years agoman: _corig is reserved
Zdenek Kabelac [Sat, 8 Nov 2014 12:16:35 +0000 (13:16 +0100)]
man: _corig is reserved

10 years agocache: new API for libdm
Zdenek Kabelac [Sun, 9 Nov 2014 19:18:00 +0000 (20:18 +0100)]
cache: new API for libdm

10 years agolibdm: tunning cache API
Zdenek Kabelac [Sat, 8 Nov 2014 22:20:25 +0000 (23:20 +0100)]
libdm: tunning cache API

Support new PASSTHROUGH 'feature' flag.

Add dm_config_node to pass in policy args.

Really use origin_uuid instead of using extra call
to pass seg_areas.

Switch to 64bit feature flag bit set so there is
enough space in future for new bits...

10 years agocleanup: cache API get/set
Zdenek Kabelac [Sun, 9 Nov 2014 17:51:56 +0000 (18:51 +0100)]
cleanup: cache API get/set

10 years agocleanup: API get/set fixes
Zdenek Kabelac [Sat, 8 Nov 2014 00:28:38 +0000 (01:28 +0100)]
cleanup: API get/set fixes

10 years agoreport: for cache LV report chunksize
Zdenek Kabelac [Mon, 10 Nov 2014 20:29:32 +0000 (21:29 +0100)]
report: for cache LV report chunksize

Cache LV reports chunksize via cache-pool.

10 years agosnapshot: virtual save commit
Zdenek Kabelac [Wed, 5 Nov 2014 14:15:07 +0000 (15:15 +0100)]
snapshot: virtual save commit

More efficient spare volume creation. Save 1 extra commit
and properly activate this volume according to our cluster
activation rules (using lv_active_change() for this).

10 years agolv_manip: remove_layer_from_lv restore lv name
Zdenek Kabelac [Sun, 9 Nov 2014 18:48:39 +0000 (19:48 +0100)]
lv_manip: remove_layer_from_lv restore lv name

Since we 'layer' for cache origin which and we support dropping
cache layer - we need to restore origin name in case
the origin LV is more complex target  - i.e. raid.

Drop _corig from name

Cleanup and rename parent -> parent_lv.

10 years agolvremove: few more validation before archive
Zdenek Kabelac [Sat, 8 Nov 2014 22:15:15 +0000 (23:15 +0100)]
lvremove: few more validation before archive

Before we finally call archive, we still can do a few more validation
without modifying VG. So delay archive() call few lines.

10 years agosegtype: add SEG_ONLY_EXCLUSIVE flag
Zdenek Kabelac [Mon, 10 Nov 2014 17:44:37 +0000 (18:44 +0100)]
segtype: add SEG_ONLY_EXCLUSIVE flag

Mark segtypes which do require exclusive activation in cluster.r

10 years agodmeventd: time scaling for status retry
Zdenek Kabelac [Sat, 8 Nov 2014 00:29:01 +0000 (01:29 +0100)]
dmeventd: time scaling for status retry

In normal case it's too slow to wait 1 second for default.
So rather start with short time and increase sleep between status
retesting.

10 years agoraid: fix activation order
Zdenek Kabelac [Mon, 10 Nov 2014 21:04:44 +0000 (22:04 +0100)]
raid: fix activation order

Cannot 'activate' volumes in suspend state and we need to use
lock holding LV for suspend/resume.

10 years agocache: used cache-pool becomes invisible
Zdenek Kabelac [Sun, 9 Nov 2014 20:04:33 +0000 (21:04 +0100)]
cache: used cache-pool becomes invisible

While cache-pool is in use - it is considered invisible.

10 years agopools: prompt only when metadata lv exists
Zdenek Kabelac [Sat, 8 Nov 2014 12:53:13 +0000 (13:53 +0100)]
pools: prompt only when metadata lv exists

If the VG has no pool metadata volume, don't prompt about
removal of _pmspare.

10 years agopools: after fail of vg_write no restore
Zdenek Kabelac [Wed, 5 Nov 2014 19:27:51 +0000 (20:27 +0100)]
pools: after fail of vg_write no restore

Revert part of commit 51a29e60564d537,
it's probably bad idea to continue with any recovery, when
vg_write() or vg_commit() fail - so it's better to leave it as it is.

10 years agocleanup: avoid dm_list size calc in common path
Zdenek Kabelac [Tue, 4 Nov 2014 22:06:21 +0000 (23:06 +0100)]
cleanup: avoid dm_list size calc in common path

Calculate dm_list_size only when there is not just a single
ont segment in list - so it's only counted on error path.

10 years agoactivate: check all snap segs are inactive
Zdenek Kabelac [Wed, 5 Nov 2014 10:53:11 +0000 (11:53 +0100)]
activate: check all snap segs are inactive

When deactivating origin, we may have possibly left table in broken state,
where origin is not active, but snapshot volume is still present.

Let's ensure deactivation of origin detects also all associated
snapshots are inactive - otherwise do not skip deactivation.
(so i.e. 'vgchange -an' would detect errors)

10 years agolv: lv_active_change add needs_exclusive flag
Zdenek Kabelac [Wed, 5 Nov 2014 14:14:58 +0000 (15:14 +0100)]
lv: lv_active_change add needs_exclusive flag

Let's use this function for more activations in the code.

'needs_exlusive' will enforce exlusive type for any given LV.

We may want to activate LV in exlusive mode, even when we know
the LV (as is) supports non-exlusive activation as well.

lvcreate -ay   -> exclusive & local
lvcreate -aay  -> exclusive & local
lvcreate -aly  -> exclusive & local
lvcreate -aey  -> exclusive  (might be on any node).

10 years agosnapshot: no snapshot of any cache type LVs
Zdenek Kabelac [Tue, 4 Nov 2014 22:21:07 +0000 (23:21 +0100)]
snapshot: no snapshot of any cache type LVs

Unsupported as of now.

10 years agocleanup: keep 'fall through' switch case for LVSINFO for compiler to understand this...
Peter Rajnoha [Wed, 5 Nov 2014 09:46:52 +0000 (10:46 +0100)]
cleanup: keep 'fall through' switch case for LVSINFO for compiler to understand this properly

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