1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00
Commit Graph

6355 Commits

Author SHA1 Message Date
Zdenek Kabelac
489bf2fbdf Minor consistency update for debugging messages
Use mlock/munlock for debugging lines.
2012-02-01 10:48:22 +00:00
Zdenek Kabelac
8d2d4f2026 User correct base dir for lcov reports
Fix problem when srcdir != builddir.
2012-02-01 10:46:45 +00:00
Alasdair Kergon
1368dc905a lost line 2012-02-01 02:11:43 +00:00
Alasdair Kergon
72abf1d880 Track unreserved space for all alloc policies and then permit NORMAL to place
log and data on same single PV.
2012-02-01 02:10:45 +00:00
Alasdair Kergon
f2e3d659ea lp.pool may be (null) too 2012-02-01 01:54:20 +00:00
Alasdair Kergon
b6d7a48480 Automatically detect whether corosync clvmd needs to use confdb or cmap. (fabio) 2012-01-31 21:21:53 +00:00
Zdenek Kabelac
15fd61e492 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
400dede7a6 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
91c631c558 post-release 2012-01-27 01:23:40 +00:00
Zdenek Kabelac
599771c9b0 Build test run target only for $(TESTING)
Add libraries properly in LDLIBS.
2012-01-26 21:40:36 +00:00
Zdenek Kabelac
7012268499 Thin for_each_sub_lv
Adapt to scan thin dependency LVs
2012-01-26 21:39:32 +00:00
Zdenek Kabelac
6255e1b5f0 If clvmd is not started, die test instead of skipping it 2012-01-26 18:25:46 +00:00
Zdenek Kabelac
eb2dd721ab 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
a1991f101d pre-release 2012-01-26 14:02:42 +00:00
Alasdair Kergon
b475be8d77 pre-release 2012-01-26 10:11:30 +00:00
Zdenek Kabelac
b39b36eeb5 Cosmetic change use return macro with implicit stack 2012-01-25 22:38:40 +00:00
Zdenek Kabelac
42beb34826 Set missing header define 2012-01-25 22:37:48 +00:00
Zdenek Kabelac
4125cf5067 Fix leak of hash table
Minor leak on command initialization.
2012-01-25 22:36:33 +00:00
Zdenek Kabelac
96bffe6a4a 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
254944d890 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
b45035ee14 Test for uname result
in fail path initialize to 0.
2012-01-25 22:17:57 +00:00
Zdenek Kabelac
209da6efee Fix missing dmt destructor
Also always initialize maj,min,patchlevel when success is returned.
2012-01-25 22:16:04 +00:00
Zdenek Kabelac
a980f56d2a Free allocated segment type in error path 2012-01-25 21:54:00 +00:00
Zdenek Kabelac
1ef10bd81a Limit alignment to 32bit values
to get the same behavior on 32/64 machines.
2012-01-25 21:52:53 +00:00
Zdenek Kabelac
fc5c61df97 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
0e6cacbbb6 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
e6771e50a9 Check for correctness of uint64 value if exists 2012-01-25 21:43:51 +00:00
Zdenek Kabelac
d85050930b Add breaks for cases 2012-01-25 21:42:09 +00:00
Zdenek Kabelac
5f3191097d Ensure reply struct has all fields defined
Reply is returned by value.
2012-01-25 21:31:59 +00:00
Zdenek Kabelac
6e2761e928 Check and print perror for syscalls 2012-01-25 21:30:27 +00:00
Alasdair Kergon
a2167d2d1d & -> && 2012-01-25 17:14:56 +00:00
Zdenek Kabelac
b185993628 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
ca12090800 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
e8905d9816 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
a16915cb0b Clean var declarations to the front of the function 2012-01-25 13:06:57 +00:00
Zdenek Kabelac
10e80a212f 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
9b1fe5a062 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
c3f0ed04a6 Make commented out code more obvious 2012-01-25 11:10:06 +00:00
Zdenek Kabelac
89764fd494 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
c771a70882 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
3dadb176ce 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
2258242f6c 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
efc8ca105d 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
78c3b21bfa 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
1dede50c85 Thin check for lv_thin_pool_percent error status
Check has been missing.
2012-01-25 09:02:35 +00:00
Zdenek Kabelac
c0663a97a5 Update lv_info whats_new 2012-01-25 09:00:57 +00:00
Zdenek Kabelac
3c4be983d5 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
0926438aad 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
d55aa53816 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
5c8b148605 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