summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cmirrord: avoid resync buffer overflow in LOG_SPRINTdev-mcsontos-cmirrord-testFerenc Wágner2015-08-181-2/+3
| | | | | Use snprintf() instead of sprintf() to exclude the possibility of overflowing the resync history buffers.
* cmirrord: avoid debugging buffer overflow in LOG_SPRINTFerenc Wágner2015-08-181-2/+3
| | | | | Use snprintf() instead of sprintf() to exclude the possibility of overflowing the debugging history buffers.
* cmirrord: fix stack smashingFerenc Wágner2015-08-181-4/+14
| | | | | | | | With clusters larger than 3 nodes, the 32-byte debug buffer in cpg_join_callback() is too small to contain all the node IDs, because 32-bit identifiers are generally rendered in 10 decimal digits. No fixed size is good in all cases, but this is conditionally logged debug info, so we can simply truncate it. Double the size, nevertheless.
* cmirrord: document the --foreground and --help optionsFerenc Wágner2015-08-181-1/+7
|
* cmirrord: introduce the --foreground option to avoid daemonizationFerenc Wágner2015-08-181-3/+39
| | | | Also add the compulsory --help option.
* cmirrord: move generic setup from daemonize() to init_all()Ferenc Wágner2015-08-181-10/+10
| | | | | Pidfile creation, removal and signal setup are applicable to foreground processes as well.
* dmstats: reduce minimum field widthsBryn M. Reeves2015-08-181-19/+19
|
* dmstats: fix type formattingBryn M. Reeves2015-08-181-2/+2
| | | | | | Fix several instances of 'const char * const*' to be: 'const char * const *'
* config: create lists of accepted values in descriptionsDavid Teigland2015-08-171-279/+419
|
* config: add empty lines around examplesDavid Teigland2015-08-171-54/+83
| | | | | | When --withspaces is used, a blank line is added before and after an Example section, making the text less dense.
* config: recognize a blank comment lineDavid Teigland2015-08-171-0/+5
| | | | | Consider the comment line "#\n" to be a blank line, and print a blank line at that position when --withspaces is set.
* config: explain automatic default valuesDavid Teigland2015-08-171-0/+3
| | | | | | | 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.
* dmsetup: check timerfd reads for valid byte count (Coverity)Bryn M. Reeves2015-08-171-1/+8
| | | | | | | 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.
* libdm: check for zero in _nr_areas() (Coverity)Bryn M. Reeves2015-08-171-0/+3
|
* dmstats: check for zero in _nr_areas_from_step() (Coverity)Bryn M. Reeves2015-08-171-0/+4
|
* dmsetup: make sure subcommand is initialised (Coverity)Bryn M. Reeves2015-08-171-1/+2
|
* libdm: do not read region before checking dms for NULL (Coverity)Bryn M. Reeves2015-08-171-1/+2
| | | | | | 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.
* post-releaseAlasdair G Kergon2015-08-174-2/+8
|
* pre-releasev2_02_128Alasdair G Kergon2015-08-177-7/+7
|
* libdm-stats: only return uint64_t when requiredBryn M. Reeves2015-08-172-41/+43
| | | | | | 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.
* conf: Regenerate example.conf.Alasdair G Kergon2015-08-171-23/+46
|
* cache: more comments for new settingZdenek Kabelac2015-08-172-1/+3
|
* tests: update thin testZdenek Kabelac2015-08-171-3/+4
| | | | | Since we now let pass activation of thin-pool 'off-by-one' for plain 'vgchange -ay' update the test to use higher TID.
* cache: move detection code to cache_set_policyZdenek Kabelac2015-08-173-28/+35
| | | | | | | 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.
* dmsetup: fix usage of ifdefsZdenek Kabelac2015-08-171-3/+3
|
* libdm: ensure dm_stats_get_area_offset() returns a valueBryn M. Reeves2015-08-171-0/+1
|
* device: Don't try to close config file on failure.Alasdair G Kergon2015-08-175-7/+18
| | | | | | $file: open failed: Permission denied Failed to load config file $file Attempt to close device '$file' which is not open.
* tests: Revert update for new thin pool messagingZdenek Kabelac2015-08-172-3/+6
| | | | | This reverts commit 3dbb9a57ca684271dbbc26300aa2e35da9608aa3. Original code is back as the code restored previous TID handling.
* thin: restore transaction_id handlingZdenek Kabelac2015-08-173-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert back to already existing behavior which has been slightly modified by a900d150e4658a5d72c39acdd4fefd069b8f00b8. 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.
* cache: use undefined settings for cache_policyZdenek Kabelac2015-08-171-5/+5
| | | | | | | | | | 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.
* WHATS_NEW: Update.Alasdair G Kergon2015-08-162-7/+6
|
* dmstats: fix --length argumentBryn M. Reeves2015-08-151-1/+1
| | | | | | 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.
* dmstats: fix new area count for 'create --areasize'Bryn M. Reeves2015-08-151-2/+2
| | | | | | | | | | | 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.
* dmstats: change region fields prefix to 'region_'Bryn M. Reeves2015-08-141-1/+1
|
* dmstats: make -v enable per area reports for 'stats list'Bryn M. Reeves2015-08-142-10/+39
| | | | | | | | | | | 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.
* dmstats: add 'area_offset' field to stats reportsBryn M. Reeves2015-08-141-2/+30
|
* libdm: add dm_stats_get_{current_}area_offset()Bryn M. Reeves2015-08-143-3/+31
| | | | | | | | | | 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.
* libdm: ensure dm_stats_get_area_start includes region offsetBryn M. Reeves2015-08-141-1/+2
| | | | | | | | 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.
* dmsetup: add support for 'stats report --raw'Bryn M. Reeves2015-08-141-4/+12
| | | | | | 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.
* dmsetup: add prefixes for all report typesBryn M. Reeves2015-08-141-5/+5
| | | | | | | | | | | 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_
* dmstats: add 'stat_' prefix to stats report columnsBryn M. Reeves2015-08-141-3/+3
|
* spec: Add cache-*.profileMarian Csontos2015-08-141-0/+2
|
* dmsetup: do not track moving average for interval estimateBryn M. Reeves2015-08-141-10/+3
| | | | | | | | | | | | | | | | | | | 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.
* WHATS_NEW_DM: recent commits (stats field split and timestamp headers)Bryn M. Reeves2015-08-141-0/+4
|
* dmstats: make 'dmstats list' use common report infrastructureBryn M. Reeves2015-08-141-103/+44
| | | | | | | | | | | | | | | | | | | | | Unlike 'info -c' and 'stats report' the 'dmstats list' subcommand does its own report processing. This complicates the handling of the DR_STATS and DR_STATS_META fields and leads to inconsistent behaviour between the different commands. In particular it causes 'stats list' to segfault when using 'all' field options: Segmentation fault (core dumped) Delete _stats_list() entirely and adapt _stats_report so that it can correctly format a DR_STATS_META-only report request. This requires passing the subcommand into _report_init() where it is used in addition to the command name to select the default set of report fields for the 'list' and 'report' stats subcommands. With this change both 'list' and 'report' dmstats report will use the correct report object type and ensure that it is initialised appropriately for the field selection in use.
* dmstats: separate stats meta fields into their own report typeBryn M. Reeves2015-08-141-49/+53
| | | | | | | | | | | | | | | | Although statistics and meta fields (region and area properties) share the same object type the state of the handle they expect differs: meta only expects a dm_stats_list() operation to have been performed whereas statistics require a fully populated handle. Distinguish between these requirements by separating the fields into two distinct report types: DR_STATS = 32, DR_STATS_META = 64 The new category is described as "Mapped Device Statistics Region Information" in the help text.
* dmstats: cleanup _do_stats_create_regions()Bryn M. Reeves2015-08-141-4/+6
| | | | | | Make the use of the this_start and this_len variables easier to follow and clarify the use of zero start and len arguments to request a whole-device region.
* dmstats: add 'interval' and 'interval_ns' report fieldsBryn M. Reeves2015-08-142-0/+49
| | | | | | | Add a pair of fields to expose the current per-interval duation estimate. The 'interval' field provides a real value in units of seconds and the 'interval_ns' field provides the same quantity expressed as a whole number of nanoseconds.
* libdm: do not in include internal bits/time.h headerNatanael Copa2015-08-141-1/+0
| | | | | | | | | | | | | | | Do not include bits/time.h as it is an internal libc header file. A comment at the top of the glibc specific bits/time.h says: "Never include this file directly; use <time.h> instead." This fixes the following build error with musl libc: libdm-timestamp.c:37:23: fatal error: bits/time.h: No such file or directory --- Compile tested with Alpine Linx (musl libc) and ubuntu 15.04 libdm/libdm-timestamp.c | 1 - 1 file changed, 1 deletion(-)
* dmsetup: Fix dmsetup return code.Alasdair G Kergon2015-08-141-3/+6
|