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

11254 Commits

Author SHA1 Message Date
Zdenek Kabelac
ef7264807f cleanup: log_debug format matches args 2015-08-18 16:05:04 +02:00
Bryn M. Reeves
bc39506792 man: update dmstats.8.in examples 2015-08-18 14:40:45 +01:00
Zdenek Kabelac
28b4fa3e27 Revert "lvmcache: check for too long pvid"
This reverts commit 70db1d523d.
Since we use 'strncpy' even for case where it exactly matches
the buffer size and \0 is not expected to be added there.
2015-08-18 15:22:13 +02:00
Zdenek Kabelac
b193809987 debug: vgdisplay trace failing result code
Add stack on error path.
2015-08-18 15:00:08 +02:00
Zdenek Kabelac
a8fd88463e cleanup: trace error from lvmcache_update_vgname_and_id
Check result value from lvmcache_update_vgname_and_id().
2015-08-18 15:00:08 +02:00
Zdenek Kabelac
3a3e17d603 cleanup: check pthread result codes 2015-08-18 15:00:08 +02:00
Zdenek Kabelac
40af31729f cleanup: typo fix and drop \
Fix 'th e'  and use % directly.
2015-08-18 15:00:08 +02:00
Zdenek Kabelac
58f8f29c41 cleanup: add FMTssize_t
Add define to print nicely ssize_t type.
2015-08-18 15:00:08 +02:00
Zdenek Kabelac
3d08a49790 cleanup: add cast 2015-08-18 15:00:08 +02:00
Zdenek Kabelac
55a9262bdb cleanup: unused header files (Coverity) 2015-08-18 15:00:08 +02:00
Zdenek Kabelac
ba94d0f144 libdm: simplify dmstats formula.
Since we check for stats for not being 0,
simplify the operation and use a single division.
2015-08-18 15:00:08 +02:00
Zdenek Kabelac
ae4db9f302 lockd: check for failing unlock
Avoid ignoring unlocking error.
2015-08-18 15:00:07 +02:00
Zdenek Kabelac
70db1d523d lvmcache: check for too long pvid 2015-08-18 14:53:36 +02:00
Bryn M. Reeves
8e229cb7ea dmstats: reduce minimum field widths 2015-08-18 10:30:53 +01:00
Bryn M. Reeves
13d3eeb2ee dmstats: fix type formatting
Fix several instances of 'const char * const*' to be:

  'const char * const *'
2015-08-18 10:30:53 +01:00
David Teigland
dece918bc8 config: create lists of accepted values in descriptions 2015-08-17 14:50:41 -05:00
David Teigland
b091c37595 config: add empty lines around examples
When --withspaces is used, a blank line is
added before and after an Example section,
making the text less dense.
2015-08-17 13:52:34 -05:00
David Teigland
ca70770cfd config: recognize a blank comment line
Consider the comment line "#\n" to be a blank line, and
print a blank line at that position when --withspaces is set.
2015-08-17 13:52:34 -05:00
David Teigland
5243a81c29 config: explain automatic default values
Before printing a commented automatic config value,
print a line describing what it is.  Otherwise, the
commented value can look like it's a part of an
example preceding it.
2015-08-17 13:52:34 -05:00
Bryn M. Reeves
12acf852c5 dmsetup: check timerfd reads for valid byte count (Coverity)
The timerfd guarantees that it will return 8 bytes when a read(2)
is issued (a uint64_t giving the number of timer events during the
call). Check that it does so and log a non-fatal error if the byte
count is not 8.
2015-08-17 19:28:53 +01:00
Bryn M. Reeves
074b5de771 libdm: check for zero in _nr_areas() (Coverity) 2015-08-17 18:37:16 +01:00
Bryn M. Reeves
69fa16048a dmstats: check for zero in _nr_areas_from_step() (Coverity) 2015-08-17 18:37:16 +01:00
Bryn M. Reeves
b01e9651b0 dmsetup: make sure subcommand is initialised (Coverity) 2015-08-17 18:37:16 +01:00
Bryn M. Reeves
8967776713 libdm: do not read region before checking dms for NULL (Coverity)
dm_stats_get_area_start() attempts to assign a region pointer from
a stats handle before checking it is non-NULL: move the assignment
after the test.
2015-08-17 18:37:16 +01:00
Alasdair G Kergon
d1c65d1b28 post-release 2015-08-17 17:26:20 +01:00
Alasdair G Kergon
be1db6b6c1 pre-release 2015-08-17 17:20:14 +01:00
Bryn M. Reeves
4227b2ebb4 libdm-stats: only return uint64_t when required
Several interfaced in libdm-stats return a uint64_t when it is
only used to signal success/failure: change all these uses to
return a simple int instead.
2015-08-17 16:59:52 +01:00
Alasdair G Kergon
15e20bb5c0 conf: Regenerate example.conf. 2015-08-17 16:51:43 +01:00
Zdenek Kabelac
80bc87e377 cache: more comments for new setting 2015-08-17 17:26:39 +02:00
Zdenek Kabelac
77357081c8 tests: update thin test
Since we now let pass activation of thin-pool 'off-by-one' for
plain 'vgchange -ay' update the test to use higher TID.
2015-08-17 17:07:09 +02:00
Zdenek Kabelac
4b28383b1c cache: move detection code to cache_set_policy
Move code which runtime detects settings for cache_policy
out of config dir to cache seg handling code.

Also mark cache_mode as command profilable setting.
2015-08-17 15:52:06 +02:00
Zdenek Kabelac
94c56559ca dmsetup: fix usage of ifdefs 2015-08-17 15:52:06 +02:00
Bryn M. Reeves
427d0a5e92 libdm: ensure dm_stats_get_area_offset() returns a value 2015-08-17 14:40:48 +01:00
Alasdair G Kergon
623b46a17d device: Don't try to close config file on failure.
$file: open failed: Permission denied
Failed to load config file $file
Attempt to close device '$file' which is not open.
2015-08-17 12:57:01 +01:00
Zdenek Kabelac
a606966029 tests: Revert update for new thin pool messaging
This reverts commit 3dbb9a57ca.
Original code is back as the code restored previous TID handling.
2015-08-17 11:25:03 +02:00
Zdenek Kabelac
79ea81b8a8 thin: restore transaction_id handling
Revert back to already existing behavior which has been slightly
modified by a900d150e4.

At the end however it seem to be equal to change TID right with first
metadata write.

Existing code missed handling for 'unused' thin-pool which would
require to also check empty message list for TID==0.

So with the fix we now again preserve 'active' thin-pool volume
when first thin volume is created - this property was lost and caused
problems in cluster, where the lock was hold, but volume was no longer
active on the node.

Another missing part was the proper support for already increased,
but unfinished TID change.

So going back here with existing logic -

TID is increased with first MDA update.

Code allows start with either same TID or (TID-1).

If there are messages, TID must be lower by 1 for sending,
otherwise messages were already posted.
2015-08-17 11:25:03 +02:00
Zdenek Kabelac
d4c024c836 cache: use undefined settings for cache_policy
As cache_policy is evaluated in runtime, we no longer should use
CFG_COMMENTED, but have to switch to CFG_UNDEFINED.

So as long as the value is undefined, it's runtime evaluated.
Once it's set - it's always respected (no runtime fallback).

Also fix version of introduced settings to 2.2.128.
2015-08-17 11:25:03 +02:00
Alasdair G Kergon
b297d78367 WHATS_NEW: Update. 2015-08-16 01:16:16 +01:00
Bryn M. Reeves
4a6d5e2012 dmstats: fix --length argument
Commit f10ad95 introduced a regression causing the size of regions
passed in on the command line to be truncated to zero. Initialise
the 'this_len' variable to the supplied length to correct this.
2015-08-15 18:35:10 +01:00
Bryn M. Reeves
9d5cd4ca14 dmstats: fix new area count for 'create --areasize'
Commit f10ad95 introduced a regression in the calculation of the
number of areas in a region created with the --areasize switch:

vg_hex-lv_home: Created new region with 0 area(s) as region ID 1
vg_hex-lv_swap: Created new region with 0 area(s) as region ID 1

Fis this by using the correct region size when calculating the
value.
2015-08-15 00:42:51 +01:00
Bryn M. Reeves
0b487802a0 dmstats: change region fields prefix to 'region_' 2015-08-14 23:53:42 +01:00
Bryn M. Reeves
f3891e90e3 dmstats: make -v enable per area reports for 'stats list'
When dmstats is run with -v or higher enable a per-area reporting
mode for statistics regions. This will output one row per area
(rather than one row per region) and adds additional fields of use
when viewing areas:

 area_id    - index within the region assigned by libdm-stats
 area_start - the start location of the area in the containing
              device.
2015-08-14 22:03:37 +01:00
Bryn M. Reeves
0f3b81bb2e dmstats: add 'area_offset' field to stats reports 2015-08-14 22:03:37 +01:00
Bryn M. Reeves
00ed523659 libdm: add dm_stats_get_{current_}area_offset()
Add a method to retrieve the offset of an area within the
containing region (rather than the offset within the containing
device returned by dm_stats_get_area_start()).

Although users of the library can calculate this themselves it is
better to provide this through a method call to avoid users making
assumptions about the structure of regions and areas.
2015-08-14 22:03:37 +01:00
Bryn M. Reeves
77fae3d852 libdm: ensure dm_stats_get_area_start includes region offset
The dm_stats_get_area_start (and its '_current_' variant) methods
are expected to return the start sector of the area in the
containing device.

Make sure the call adds region->start to the returned value.
2015-08-14 22:03:37 +01:00
Bryn M. Reeves
16ff2d927f dmsetup: add support for 'stats report --raw'
Add a '--raw' switch to stats reports that causes us to report the
basic counter values rather than derived metrics for each visible
statistics region.
2015-08-14 22:03:37 +01:00
Bryn M. Reeves
fc7a27bc3d dmsetup: add prefixes for all report types
Add prefixes to all dmsetup report types to allow the 'group_all'
option to be effective:

  DR_NAME       name_
  DR_INFO       info_
  DR_DEPS       deps_
  DR_TREE       tree_
  DR_NAME       splitname_
2015-08-14 22:03:37 +01:00
Bryn M. Reeves
666722324f dmstats: add 'stat_' prefix to stats report columns 2015-08-14 22:03:37 +01:00
Marian Csontos
bfb58b7e1c spec: Add cache-*.profile 2015-08-14 21:45:11 +02:00
Bryn M. Reeves
8852b25fc7 dmsetup: do not track moving average for interval estimate
When run with full verbosity dmsetup or dmstats reports will
output a figure that tracks a moving average over a window of the
last two intervals:

Interval     #3        time delta:    999991087ns
Interval     #3     mean duration:    999907064ns, current err: -8913ns
End interval #3          duration:    999991087ns
Adjusted sample interval duration:    999991087ns

Due to the narrow window this is a very crude estimate and is only
of use to someone debugging or modifying the stats clock: remove
the value and the global variables used to track it.

Anyone with a particular use for this information can construct a
better mean by calculating the value of a greater number of
intervals.
2015-08-14 13:55:26 +01:00