1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-11 09:18:25 +03:00
Commit Graph

6350 Commits

Author SHA1 Message Date
Alasdair Kergon
8416129244 Automatically detect whether corosync clvmd needs to use confdb or cmap. (fabio) 2012-01-31 21:21:53 +00:00
Zdenek Kabelac
b329581e8e Fix data% reporting
For reading % of mapped size of thin volume use as origin for
old style snapshot '-real' device needs to be queried.
Fix log_error report given for lvs -a in this case.
2012-01-28 20:12:26 +00:00
Zdenek Kabelac
0117473049 TARGETS macro has to be defined before inclusion of make.tmpl
Use @TESTING@ check in this case.
2012-01-27 10:55:02 +00:00
Alasdair Kergon
09e8d81a53 post-release 2012-01-27 01:23:40 +00:00
Zdenek Kabelac
317325ed54 Build test run target only for $(TESTING)
Add libraries properly in LDLIBS.
2012-01-26 21:40:36 +00:00
Zdenek Kabelac
6f9deb5b47 Thin for_each_sub_lv
Adapt to scan thin dependency LVs
2012-01-26 21:39:32 +00:00
Zdenek Kabelac
21fc2af47e If clvmd is not started, die test instead of skipping it 2012-01-26 18:25:46 +00:00
Zdenek Kabelac
3d0906496b Oops missed braces in previous commit
This has disabled clvmd for being executed.
(FIXME improve testing part to catch this fault)
2012-01-26 17:55:55 +00:00
Alasdair Kergon
f47f37485e pre-release 2012-01-26 14:02:42 +00:00
Alasdair Kergon
3876196da4 pre-release 2012-01-26 10:11:30 +00:00
Zdenek Kabelac
808f1706c2 Cosmetic change use return macro with implicit stack 2012-01-25 22:38:40 +00:00
Zdenek Kabelac
0f5dc427f6 Set missing header define 2012-01-25 22:37:48 +00:00
Zdenek Kabelac
28de76ed58 Fix leak of hash table
Minor leak on command initialization.
2012-01-25 22:36:33 +00:00
Zdenek Kabelac
4e9ef2eea3 Instrument code that pointer are already released
Set pointers to NULL since on the function exit they are no longer valid.
2012-01-25 22:35:36 +00:00
Zdenek Kabelac
a1f42a8e88 Set to a defined value vars used after error path
Static analyzer noticed this vars are used even when error is reported
back thus their state is undefined - set to 0 for this case.
2012-01-25 22:20:11 +00:00
Zdenek Kabelac
baffb459d8 Test for uname result
in fail path initialize to 0.
2012-01-25 22:17:57 +00:00
Zdenek Kabelac
381deeed8f Fix missing dmt destructor
Also always initialize maj,min,patchlevel when success is returned.
2012-01-25 22:16:04 +00:00
Zdenek Kabelac
6f37aa5e65 Free allocated segment type in error path 2012-01-25 21:54:00 +00:00
Zdenek Kabelac
4343bc5e86 Limit alignment to 32bit values
to get the same behavior on 32/64 machines.
2012-01-25 21:52:53 +00:00
Zdenek Kabelac
255e8cb60b Ensure whole info is initialised
Since _create_dm_tree_node is copying whole structure,
make sure all members are initialized.
2012-01-25 21:50:50 +00:00
Zdenek Kabelac
6bd7f256ae Fix resource leak of file handle
Introduces when added dm_device_get_name.
Close file handle in all error paths.
2012-01-25 21:47:18 +00:00
Zdenek Kabelac
5d1d269f45 Check for correctness of uint64 value if exists 2012-01-25 21:43:51 +00:00
Zdenek Kabelac
e152c0b9e6 Add breaks for cases 2012-01-25 21:42:09 +00:00
Zdenek Kabelac
cd55e7238a Ensure reply struct has all fields defined
Reply is returned by value.
2012-01-25 21:31:59 +00:00
Zdenek Kabelac
dfac9aef46 Check and print perror for syscalls 2012-01-25 21:30:27 +00:00
Alasdair Kergon
1835cb731d & -> && 2012-01-25 17:14:56 +00:00
Zdenek Kabelac
ab418f0317 Fix compilation with disabled devmapper
During release preparation things has changed, so making sure
we are compilable with --disable-devmapper.
2012-01-25 13:12:59 +00:00
Zdenek Kabelac
4fb4548a57 Thin read percent info from layered device
Since we only need layered device - check for tpool device presence,
so user doesn't need to activate thin pool explicitely for percent info.
2012-01-25 13:11:52 +00:00
Zdenek Kabelac
ec2012f736 Rename origin_only to more generic use_layer flag
Since now we have more layered devices i.e. thin volumes - support
selection of layer via flag.
2012-01-25 13:10:26 +00:00
Zdenek Kabelac
93903e1edf Clean var declarations to the front of the function 2012-01-25 13:06:57 +00:00
Zdenek Kabelac
500806dda9 Update verbose lvs to print metadata_percent info
Update lvs  -o fields in WHATS_NEW.
2012-01-25 11:32:41 +00:00
Zdenek Kabelac
7e134dfb8e Thin clear stacked message for thin pool
Before removing thin pool LV always make sure, stacked message
for previous run are cleared - but allow to remove any
device that should have been created
(i.e. creation of snapshot failed - so the message for snapshot creation
may be replaced with delete message within unfinished transaction).

Also commit messages after lv remove - so free space is released in pool.
2012-01-25 11:27:42 +00:00
Alasdair Kergon
dee7712483 Make commented out code more obvious 2012-01-25 11:10:06 +00:00
Zdenek Kabelac
cfd3d9413b Thin skip activation when there are no thin message
If the list with thin messages is empty, do not touch thin pool device.
2012-01-25 09:17:15 +00:00
Zdenek Kabelac
5feef4f92b Thin correct activation order
When the message is passed only in resume path the order needs
to be corrected.
2012-01-25 09:15:44 +00:00
Zdenek Kabelac
9644179f39 Thin use suspend/resume_lv_origin
Use origin_only support for thin volume when thin snapshot is created.
2012-01-25 09:14:25 +00:00
Zdenek Kabelac
9142bc74bb Thin use origin_only for thin pools as well
Extend the usage of origin_only flag to allow resume of thin pool LV
(when it's active) to pass only the messages.

origin_only flag will skip detection of already resumed tree for thin_pool,
so we do not need to suspend the tree and we just send messages.
2012-01-25 09:13:10 +00:00
Zdenek Kabelac
9518d362ab Thin add support for origin_only suspend of thin volumes
Pass in the origin_only flag also for thin volumes - but curently the flag
is not used to its best.

FIXME: achieve the state where only  thin volume snapshot origin is
suspended without its childrens -  let's explore whether this may
happen automatically inside libdm (might be generic for other targets).
So the code would not need to annotate the node for this.
2012-01-25 09:10:13 +00:00
Zdenek Kabelac
529267fe5d Thin add messages only for activation tree
Extend lv_activate_opts with bool flag to know for which purpose
dtree is created - and add message only for activation tree
(since that's the only place that may send them).

Extend validation check for thin snapshot creation and test whether
active snapshot origin is suspended before its snapshot is created
(useful in recover scenarios) -  in this case also detect, whether
transaction has been already completed and avoid such suspend check
failure in that case.
2012-01-25 09:06:43 +00:00
Zdenek Kabelac
c3606d4127 Thin check for lv_thin_pool_percent error status
Check has been missing.
2012-01-25 09:02:35 +00:00
Zdenek Kabelac
d7a3cf4744 Update lv_info whats_new 2012-01-25 09:00:57 +00:00
Zdenek Kabelac
fd3e9e102d lv_info using -real layer only for origin_only LV
If the origin_only flag is passed for non lv_is_origin LVs,
the extension is not added.

Thin volumes may also use origin_only flag.
2012-01-25 09:00:18 +00:00
Zdenek Kabelac
7264da9af1 Thin prevent removal of its data and metadata LVs
LVs cannot be removed while there are linked to thin pool.
(Gives better error message, than validation).
2012-01-25 08:57:25 +00:00
Zdenek Kabelac
c0f8f6270e Thin fix transaction_id incrementation and code refactoring
Add pool_has_message and use it in attach_pool_message.
Also update header to make more obvious which segment type is
expected as parameter.
Rename  'read_only' to  'no_update' (no auto update transaction_id)
to better fit how it's used.
Fix problem when there was only one stacked message replaced with delete
message that caused unwanted transaction_id increase.
2012-01-25 08:55:19 +00:00
Zdenek Kabelac
13c67c55af Comment cleanups
Move comment where it applies and remove unused attribe when the var
is actually used.
2012-01-25 08:51:29 +00:00
Zdenek Kabelac
538e7737d2 Thin dependency scan support
Go through pool_lv and metadata_lv LVs when doing recursive scan.
2012-01-25 08:50:10 +00:00
Zdenek Kabelac
f72b203392 Thin add lv_thin_pool_transaction_id
Easy function to get transaction_id status value.
2012-01-25 08:48:42 +00:00
Zdenek Kabelac
ea617ea71c Thin send messages on activation resume code path
Using PRELOAD part would lead to problems when the problem
would happen before vg_write and vg_commit.
Also this change is necessary for snapshot creation sequence.
2012-01-25 08:46:21 +00:00
Alasdair Kergon
b05ae8b950 Caller is still entitled to reference an LV that's unlinked, so don't
tamper with struct contents.
2012-01-24 14:53:59 +00:00
Jonathan Earl Brassow
cb09dc1274 Use suspend|resume_origin_only when up-converting RAID LVs, as mirrors do.
Failure to do so results in "Performing unsafe table load while X device(s) are
known to be suspended" errors.  While fixing the problem in this way works and
is consistent with the way the mirror segment type does it, it would be nice
to find a solution that uses the generic suspend/resume calls.

Also included in this check-in are additions to the test suite that perform
conversions on RAID LVs under a snapshot.  These tests are disabled for the
time being due to a kernel bug that is yet to be tracked down.
2012-01-24 14:33:38 +00:00