Zdenek Kabelac
63c052b9e2
coverity: ensure thin_pool_seg is not NULL
...
thin_pool_seg being NULL would be an internal error.
2016-02-23 21:40:17 +01:00
Zdenek Kabelac
dbc71dc05e
gcc: cleanup some sign warnings
...
When comparing unsigned with int, the comparision is made
as 'unsigned' type, so make it rather explicit which type
is being compared.
2016-02-23 12:25:25 +01:00
Zdenek Kabelac
cc23fdbd13
cleanup: update messages
2016-02-11 18:38:40 +01:00
Zdenek Kabelac
032cf8ade6
cleanup: relocate function to vg.c
2016-02-11 18:35:06 +01:00
Zdenek Kabelac
acf7815aca
cleanup: stripes_extents
...
Simplify calculation of extents rounding needed for
segment size.
Segment size has to divisible by 'extent count' needed to contain
whole stripe. LVM currently does not support stripes across segment.
In case the stripe size is bigger then extent size,
require bigger rounding.
2016-02-11 18:35:06 +01:00
Zdenek Kabelac
3f916e8285
lvresize: check for given parameters
...
Check ac_ value as passed args.
Also drop reseting 'computed' values - since they get
assigned values later.
2016-02-11 18:35:06 +01:00
Zdenek Kabelac
fcbef05aae
doc: change fsf address
...
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Zdenek Kabelac
cc53a23d82
cleanup: join if/else
2016-01-21 12:11:37 +01:00
Zdenek Kabelac
7b5a8f61a7
cleanup: drop extra cmd passed arg
...
Use vg->cmd when needed cmd struct.
2016-01-20 13:44:47 +01:00
Zdenek Kabelac
b64703401d
cleanup: relocate size assign
...
Directly set thin-pool size when thin data LV size changes.
2016-01-20 13:44:47 +01:00
Zdenek Kabelac
ca878a3426
cleanup: adjust once
2016-01-20 13:44:47 +01:00
Zdenek Kabelac
178cbb580a
cleanup: update check function
...
Use display_lvname().
Use lv_is_lockd_sanlock_lv().
Order 'error' checks ahead of 'ignore' ones.
2016-01-20 13:44:47 +01:00
Zdenek Kabelac
4b9ae55a8d
cleanup: shuffle check of threshold
...
Check first threshold and then policy_amount.
2016-01-20 13:44:47 +01:00
Zdenek Kabelac
c99ca6f430
cleanup: use log_print
...
Using log_print for ignoring message instead of log_warn.
Add some missing '.'.
2016-01-20 13:44:47 +01:00
Zdenek Kabelac
88400b599e
lvmanip: fix last commit and drop else
...
In last commit when removing if() branch
this 'else' now has to be dropped.
2016-01-14 11:55:47 +01:00
Zdenek Kabelac
c9a813bff8
cleanup: spaces
2016-01-14 11:34:05 +01:00
Zdenek Kabelac
7d2b7f2bd8
cleanup: replace log_warn
2016-01-14 11:34:05 +01:00
Zdenek Kabelac
2567d03e95
cleanup: explicit prohibition for virtual segs
...
Internal _alloc_init() is only called from allocate_extents(),
which already does prevent usage of virtual segments.
So mark as internal error early and do not process it any further.
2016-01-14 11:34:05 +01:00
Zdenek Kabelac
4310dfd4e1
cleanup: simplier formula
2016-01-14 11:34:05 +01:00
Zdenek Kabelac
ebcfd09ba9
cleanup: more readable check
2016-01-14 11:34:05 +01:00
Zdenek Kabelac
753a496348
snapshot: relocate alloc_snapshot_seg
...
Move alloc_snapshot_seg to snapshot_manip and make it local static.
2016-01-14 11:34:05 +01:00
Zdenek Kabelac
cd8e95d933
lvrename: always allow to rename pools
...
Since we mark cache-pool as 'hidden/private' while it is in-use,
we may still allow user to change it's name.
It should not cause any harm and user may prefer better naming
for a cache-pool in use.
2015-12-10 21:01:24 +01:00
Zdenek Kabelac
bf4b74c5eb
cache: support stacked rename
...
Preserve skip_pool flag when running for_each_sub_lv() so
lvrename continues to work when thin-pool is using cached
data LV.
2015-12-10 21:01:24 +01:00
David Teigland
bdba4e7a93
lvrename: move the lvmlockd LV lock
...
The function it was in is used for various
internal renaming of hidden LVs where a lock
from lvmlockd does not apply.
2015-12-09 11:59:49 -06:00
Zdenek Kabelac
b2e13ac552
coverity: add few internal errors
...
Mark impossible paths with internal errors.
Also replace 'strcmp() with more readable seg_is...()
2015-11-13 11:18:27 +01:00
Zdenek Kabelac
70af08122e
cleanup: missing check for PV2
...
Patch missed also check this pointer dereference.
2015-11-13 11:17:06 +01:00
Zdenek Kabelac
e4c9b390ca
cleanup: update comment
2015-11-09 12:21:17 +01:00
Zdenek Kabelac
9b9b5d0ea2
cleanup: use 64bit multiply for print
2015-11-09 10:22:52 +01:00
Zdenek Kabelac
5ba219e87a
cleanup: use display_lvname
2015-11-09 10:22:51 +01:00
Zdenek Kabelac
04f76d9020
cleanup: use NAME_LEN
...
Let's have instant check for max name len when creating
subLV name.
2015-11-09 10:22:51 +01:00
Zdenek Kabelac
07046e994f
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.
2015-11-09 10:22:49 +01:00
Zdenek Kabelac
0c380c316c
cleanup: relocate error capture
...
Capture internal error before allocation anything.
2015-11-09 10:21:09 +01:00
Zdenek Kabelac
856e11e11c
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.
2015-11-09 10:19:20 +01:00
Alasdair G Kergon
8096f2224c
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.
2015-11-05 23:40:47 +00:00
Zdenek Kabelac
175119fdcd
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.
2015-10-29 12:14:20 +01:00
Marian Csontos
1af2ab10d0
cleanup: snapshots of snapshots message
...
No plans to support thick snapshost of snapshots.
2015-10-27 11:42:48 +01:00
Zdenek Kabelac
40eea582ae
lv_manip: ensure it will fit bellow threshold
...
Use single code to evaluate if the percentage value has
crossed threshold.
Recalculate amount value to always fit bellow
threshold so there are not need any extra reiterations
to reach this state in case policy amount is too small.
2015-10-25 21:03:11 +01:00
Alasdair G Kergon
51735f09f7
thin: Fix typo in policy threshold message.
2015-10-23 15:38:31 +01:00
Zdenek Kabelac
1a2d0a0c72
cleanup: indents
2015-10-22 22:46:10 +02:00
Zdenek Kabelac
19e272ba53
lib: better reporting of threshold
...
Simplify code reporting warning about incorrect thresholds.
2015-10-22 22:06:14 +02:00
Zdenek Kabelac
7c36d7c90c
thin: enforce local activation when creation new thin
...
As we need to check how full thin-pool is - require thin-pool is
locally active.
2015-10-14 01:00:35 +02:00
Zdenek Kabelac
c7b4359ff4
thin: check for overflown pool earlier
...
Check for pool early before we actually start to modify metadata.
This requires locally active thin-pool.
2015-10-13 14:37:07 +02:00
Peter Rajnoha
e04424e87e
report: identify LV hodling sanlock locks as 'private,lockd,sanlock' within lv_role report field
...
Before this patch:
$ lvs -a -o name,layout,role test/lvmlock
LV Layout Role
[lvmlock] linear public
With this patch applied:
$ lvs -a -o name,layout,role test/lvmlock
LV Layout Role
[lvmlock] linear private,lockd,sanlock
2015-10-08 13:44:29 +02:00
Zdenek Kabelac
a139275eca
alloc: fix update or area_len
...
Commit: 192d9ad977
changed logic for area_len formula - so it returns
different values.
Placing () to restore previous behaviour and make it
explicit.
2015-10-01 15:02:49 +02:00
Alasdair G Kergon
4a74e19f80
alloc: Move _calc_area_multiple.
2015-09-24 17:56:19 +01:00
Alasdair G Kergon
e773e71910
stripes: Introduce _round_to_stripe_boundary.
2015-09-24 17:50:53 +01:00
Alasdair G Kergon
39a97d86f0
segtypes: Add and use new segtype macros.
...
Includes fixing an inverted raid10 segtype check in _raid_add_target_line.
2015-09-24 14:59:07 +01:00
Alasdair G Kergon
41fe225b0d
style: lv_manip.c changes
2015-09-24 13:43:58 +01:00
Heinz Mauelshagen
192d9ad977
style: Miscellaneous tidying up of metadata/lv*
2015-09-23 14:37:52 +01:00
Alasdair G Kergon
214e2cddf6
segtypes: Use SEG_TYPE_NAME_ string constants.
2015-09-22 19:04:12 +01:00