]> sourceware.org Git - lvm2.git/log
lvm2.git
7 years agospec: Use %global instead of %define for constants
Marian Csontos [Fri, 16 Sep 2016 15:23:32 +0000 (17:23 +0200)]
spec: Use %global instead of %define for constants

Using %define is now discouraged by Fedora Packaging Guidelines

7 years agospec: Update requirements for lockd
Marian Csontos [Fri, 16 Sep 2016 15:21:24 +0000 (17:21 +0200)]
spec: Update requirements for lockd

lockd requires sanlock >= 3.3.0

7 years agospec: Profiles are not %config(noreplace)
Marian Csontos [Wed, 14 Sep 2016 12:39:44 +0000 (14:39 +0200)]
spec: Profiles are not %config(noreplace)

These files are just examples and should not be edited by user.

7 years agoman: Make dmfilemapd.8 optional dev-mcsontos-filemapd
Marian Csontos [Thu, 16 Mar 2017 11:26:51 +0000 (12:26 +0100)]
man: Make dmfilemapd.8 optional

7 years agospec: lvmchange is built-in command
Marian Csontos [Thu, 16 Mar 2017 10:44:10 +0000 (11:44 +0100)]
spec: lvmchange is built-in command

7 years agoman: Handle empty MAN8GENERATED
Marian Csontos [Thu, 16 Mar 2017 10:33:07 +0000 (11:33 +0100)]
man: Handle empty MAN8GENERATED

7 years agotests: better disk delay
Zdenek Kabelac [Thu, 16 Mar 2017 07:49:52 +0000 (08:49 +0100)]
tests: better disk delay

Delay only writable extents.
Skip zeroing for earlier lvcreate finish.

7 years agotests: add missing --yes
Zdenek Kabelac [Thu, 16 Mar 2017 07:44:44 +0000 (08:44 +0100)]
tests: add missing --yes

7 years agotools: Drop unused e2fsadm refs (replaced by fsadm).
Alasdair G Kergon [Thu, 16 Mar 2017 02:24:39 +0000 (02:24 +0000)]
tools: Drop unused e2fsadm refs (replaced by fsadm).

7 years agoman: Include lvmchange/lvmsar/lvmsadc content in lvm.8
Alasdair G Kergon [Thu, 16 Mar 2017 02:09:51 +0000 (02:09 +0000)]
man: Include lvmchange/lvmsar/lvmsadc content in lvm.8

Remove separate lvmchange man page as the external command has also been
removed.

7 years agoman: Reinstate previous lvmsar and lvmsadc pages.
Alasdair G Kergon [Thu, 16 Mar 2017 01:49:40 +0000 (01:49 +0000)]
man: Reinstate previous lvmsar and lvmsadc pages.

Avoid listing all the common options for obsolete commands.

7 years agolvmsar/lvmsadc: Mention dmstats when run.
Alasdair G Kergon [Thu, 16 Mar 2017 01:36:02 +0000 (01:36 +0000)]
lvmsar/lvmsadc: Mention dmstats when run.

7 years agolvmchange: Move to a built-in command.
Alasdair G Kergon [Thu, 16 Mar 2017 01:09:29 +0000 (01:09 +0000)]
lvmchange: Move to a built-in command.

Has been obsolete since LVM1 and it's clear we'll never implement this.

7 years agoman: Remove blank lines from pregenerated files
Alasdair G Kergon [Thu, 16 Mar 2017 00:50:27 +0000 (00:50 +0000)]
man: Remove blank lines from pregenerated files

7 years agoman: reinstate lvmchange man page for now
Alasdair G Kergon [Thu, 16 Mar 2017 00:46:35 +0000 (00:46 +0000)]
man: reinstate lvmchange man page for now

7 years agomirror: revert 76f6951c3e8f0933df9730a42e9c46f273d1da24
Zdenek Kabelac [Thu, 16 Mar 2017 00:17:57 +0000 (01:17 +0100)]
mirror: revert 76f6951c3e8f0933df9730a42e9c46f273d1da24

Effectively revert whole  76f6951c3e8f0933df9730a42e9c46f273d1da24.
We need to figure out some other solution.

At this moment usage of --config  with 'repair' of blocked mirror
is 'freezing' combination.

7 years agoraid: use 64bit arithmetic
Zdenek Kabelac [Wed, 15 Mar 2017 23:51:52 +0000 (00:51 +0100)]
raid: use 64bit arithmetic

Coverity - keep  multiplication for size cals in 64bit
(otherwise it's just 32b x 32b)

7 years agocoverity: make sure segtype pointer is valid
Zdenek Kabelac [Wed, 15 Mar 2017 23:46:48 +0000 (00:46 +0100)]
coverity: make sure segtype pointer is valid

7 years agolibdm: fix endless loop
Zdenek Kabelac [Wed, 15 Mar 2017 23:36:06 +0000 (00:36 +0100)]
libdm: fix endless loop

Coverity noticed endless loop (i not being changed).

TODO: test coverage

7 years agothin: remove unneeed test for NULL
Zdenek Kabelac [Wed, 15 Mar 2017 23:34:31 +0000 (00:34 +0100)]
thin: remove unneeed test for NULL

In this API NULL is not valid parameter so do not check for it.

7 years agocoverity: update models
Zdenek Kabelac [Tue, 14 Mar 2017 13:15:55 +0000 (14:15 +0100)]
coverity: update models

Latest versions do get quite  strange - so let's use suggestions
from their authors...

7 years agomirror: avoid scanning
Zdenek Kabelac [Wed, 15 Mar 2017 23:00:52 +0000 (00:00 +0100)]
mirror: avoid scanning

While mirror is blocked we can't try to scan device.
Regression introduce by previous commit
76f6951c3e8f0933df9730a42e9c46f273d1da24.

7 years agoman: Minor clarifications and grammar corrections for lvmraid.7
Jonathan Brassow [Wed, 15 Mar 2017 23:19:29 +0000 (18:19 -0500)]
man:  Minor clarifications and grammar corrections for lvmraid.7

7 years agoman: remove blank lines from end/des files
David Teigland [Wed, 15 Mar 2017 20:59:43 +0000 (15:59 -0500)]
man: remove blank lines from end/des files

which produce unwanted blank lines in some output
formats.

7 years agohelp: fix missing newlines
David Teigland [Wed, 15 Mar 2017 16:40:59 +0000 (11:40 -0500)]
help: fix missing newlines

Recent commits to remove newlines from man output
accidentally removed some newlines from help output.

7 years agoman: remove blank lines in included files
David Teigland [Wed, 15 Mar 2017 16:30:34 +0000 (11:30 -0500)]
man: remove blank lines in included files

7 years agoman: remove blank lines
David Teigland [Wed, 15 Mar 2017 16:05:31 +0000 (11:05 -0500)]
man: remove blank lines

Blank lines in the man source sometimes appear as extra
blank lines in the output, so remove them.

7 years agoman: specify man-generator path
Alasdair G Kergon [Wed, 15 Mar 2017 01:36:12 +0000 (01:36 +0000)]
man: specify man-generator path

7 years agomake: Support for 'make -R'.
Alasdair G Kergon [Wed, 15 Mar 2017 01:31:11 +0000 (01:31 +0000)]
make: Support for 'make -R'.

Aim to be self-sufficient.

7 years agoman: remove more unnecessary line breaks
David Teigland [Tue, 14 Mar 2017 21:28:20 +0000 (16:28 -0500)]
man: remove more unnecessary line breaks

in case they cause extra blank lines in some output formats.

7 years agoman: remove redundant line breaks
David Teigland [Tue, 14 Mar 2017 19:58:30 +0000 (14:58 -0500)]
man: remove redundant line breaks

unecessary .br and .P

7 years agoargs: clarify repeated --options lists
David Teigland [Tue, 14 Mar 2017 18:52:09 +0000 (13:52 -0500)]
args: clarify repeated --options lists

7 years agoman clvmd: mention attempt for deactivate
David Teigland [Tue, 14 Mar 2017 15:17:46 +0000 (10:17 -0500)]
man clvmd: mention attempt for deactivate

attempt is always the case, but mention it again

7 years agoman: Adjust some wording and update examples style.
Alasdair G Kergon [Tue, 14 Mar 2017 14:55:36 +0000 (14:55 +0000)]
man: Adjust some wording and update examples style.

7 years agoman: Revise internal man page generation process.
Alasdair G Kergon [Tue, 14 Mar 2017 00:47:46 +0000 (00:47 +0000)]
man: Revise internal man page generation process.

For each section 8 man page, a .8_gen file is created from one of:
  .8_main            - Old-style man page - content used directly
  .8_des and .8_end  - Description and end section of a generated page
  .8_pregen      - Pre-generated page used if the generator fails

Other man sections are not generated and use the suffix .5_main or .7_main.

Developers should use 'make generate' to regenerate the .8_pregen files.

7 years agocommands: fix command matching for unused options
David Teigland [Mon, 13 Mar 2017 17:54:56 +0000 (12:54 -0500)]
commands: fix command matching for unused options

When a given command:

- matches command definition A based on required options,
  but uses optional options that are not accepted by A.

- matches command definition B based on required options,
  (but fewer required items than A), and uses no
  unaccepted optional options.

then B is the correct choice.  Command A would fail because
of the unaccepted optional options.  The logic was mistakenly
letting A win because it had a greater number of required option
matches, without accounting for the optional option mismatches.

7 years agocommands: fix lvcreate mirrors/stripes options
David Teigland [Fri, 10 Mar 2017 21:57:26 +0000 (15:57 -0600)]
commands: fix lvcreate mirrors/stripes options

Systematically outline every combination of:
--type striped, --type mirror, --type raid, --mirrors, --stripes
and make sure each is assigned to one specific cmd def.

This revealed that a new command def is needed for
lvcreate that uses both --mirrors and --stripes
but no --type option.

The use of LVCREATE_RAID shortcut for an option set
resulted in mirrors/stripes being included in optional
opts set when they were already in the required list.

7 years agolvmetad: fix segfault on i386
Christian Brauner [Sat, 11 Mar 2017 00:08:43 +0000 (01:08 +0100)]
lvmetad: fix segfault on i386

Sending %d as format argument in lvmetad_vg_remove_pending() will cause
segfaults in config_make_nodes_v() when va_arg() casts to int64_t. Also, it is
clearly advertised in the lvm source code that using plain %d is prohibited, so
let's switch to FMTd64.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoraid: check more cautious on region size changes
Heinz Mauelshagen [Mon, 13 Mar 2017 16:46:56 +0000 (17:46 +0100)]
raid: check more cautious on region size changes

Add additional checks to avoid calling _region_size_change_requested()
with bogus actual arguments.

7 years agodmfilemapd: ensure path argument is absolute
Bryn M. Reeves [Mon, 13 Mar 2017 11:44:05 +0000 (11:44 +0000)]
dmfilemapd: ensure path argument is absolute

Require that the path argument to dmfilemapd be an absolute path
and document this in tool output, libdevmapper.h and dmfilemapd.8.

The check is also enforced by dm_stats_start_filemapd() to avoid
forking a new process with an invalid path argument.

7 years agodmfilemapd: return error for wrong number of args
Bryn M. Reeves [Mon, 13 Mar 2017 11:09:11 +0000 (11:09 +0000)]
dmfilemapd: return error for wrong number of args

The initial check on argc incorrectly returns 1 when the wrong
number of arguments are present, causing a segfault in main()
when no arguments are given:

  # dmfilemapd
  Wrong number of arguments.
  usage: dmfilemapd <fd> <group_id> <path> <mode> [<foreground>[<log_level>]]
  Segmentation fault (core dumped)

7 years agoman: fix typo
Heinz Mauelshagen [Fri, 10 Mar 2017 21:48:16 +0000 (22:48 +0100)]
man: fix typo

7 years agoreport: fix lv_size with reshape space allocated
Heinz Mauelshagen [Fri, 10 Mar 2017 21:44:32 +0000 (22:44 +0100)]
report: fix lv_size with reshape space allocated

Commit f4b30b0daef3 was about displaying visible LV size
when reshape space is allocated.  Take parity devices
into account when displaying the user visible LV size.

7 years agocommands: use correct relative signs with mirror option
David Teigland [Fri, 10 Mar 2017 21:22:13 +0000 (15:22 -0600)]
commands: use correct relative signs with mirror option

As was recently done with relative signes for sizes/extents,
limit the signs used with the mirrors option, e.g.
lvcreate --mirrors now does not accept or advertise an
optional minus sign with the value.  lvconvert --mirrors
accepts +|-.

7 years agoman: add more info/examples to lvmraid(7)
Heinz Mauelshagen [Fri, 10 Mar 2017 21:40:22 +0000 (22:40 +0100)]
man: add more info/examples to lvmraid(7)

Add a warning about maximum supported numbers of stripes
with striped LVs realtive to RAID conversions.

Add examples for a more elaborate, multi-step conversion
from linear to striped (and vice versa).

Shrink lvs examples output.

Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978

7 years agocommands: fix lvconvert options for mirrors/stripes
David Teigland [Fri, 10 Mar 2017 20:05:15 +0000 (14:05 -0600)]
commands: fix lvconvert options for mirrors/stripes

The LVCONVERT_RAID shortcut for including options ended
up including mirrors/stripes as optional opts in defs where
they were already required, or in defs where they would
not be used.  Remove the option set and specify in each
case only the options wanted.

7 years agoraid: fix compile time warning
Heinz Mauelshagen [Fri, 10 Mar 2017 19:37:42 +0000 (20:37 +0100)]
raid: fix compile time warning

7 years agotests: cache profile and metadata2
Zdenek Kabelac [Fri, 10 Mar 2017 18:01:46 +0000 (19:01 +0100)]
tests: cache profile and metadata2

New tests trying to cover support syntax variants.
A lot it still missing...

7 years agocleanup: use FMTu
Zdenek Kabelac [Thu, 9 Mar 2017 22:41:54 +0000 (23:41 +0100)]
cleanup: use FMTu

Replace some PRIu with FMTu for formating strings.

7 years agocleanup: easier code
Zdenek Kabelac [Wed, 8 Mar 2017 13:28:28 +0000 (14:28 +0100)]
cleanup: easier code

7 years agocache: enhance lvdisplay for cache volumes
Zdenek Kabelac [Wed, 1 Mar 2017 23:15:11 +0000 (00:15 +0100)]
cache: enhance lvdisplay for cache volumes

Better support for lvdisplay.
By default info about running (in kernel) cache status is printed.
To get 'segtype' info, user runs: 'lvdisplay -m',  example:

  --- Logical volume ---
  LV Path                /dev/vg/lvol0
  LV Name                lvol0
  VG Name                vg
  LV UUID                Y4uWuN-TBGk-duer-aPWl-yBWn-iFFR-RU1gg1
  LV Write Access        read/write
  LV Creation host, time linux, 2017-03-01 20:52:39 +0100
  LV Cache pool name     lvol2
  LV Cache origin name   lvol0_corig
  LV Status              available
  # open                 0
  LV Size                12,00 MiB
  Cache used blocks      10,42%
  Cache metadata blocks  0,49%
  Cache dirty blocks     0,00%
  Cache read hits/misses 112 / 34
  Cache wrt hits/misses  133 / 0
  Cache demotions        0
  Cache promotions       20
  Current LE             3
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Segments ---
  Logical extents 0 to 2:
    Type cache
    Chunk size 64,00 KiB
    Metadata format 1
    Mode writethrough
    Policy smq
      Setting migration_threshold=100000

7 years agocache: enable usage of --cachemetadataformat
Zdenek Kabelac [Sun, 26 Feb 2017 19:18:37 +0000 (20:18 +0100)]
cache: enable usage of --cachemetadataformat

lvcreate and lvconvert may select cache metadata format when caching LV.
By default lvm2 picks best available format.

7 years agocache: allow to specify cachemetadataformat
Zdenek Kabelac [Fri, 3 Mar 2017 10:33:10 +0000 (11:33 +0100)]
cache: allow to specify  cachemetadataformat

OO_LVCREATE_CACHE accepts --cachemetadataformat.

Support new option --cachemetadataformat auto|1|2 for caching.
Word 'auto' can be also be given as '0'.

7 years agocache: reporting cache metadata format
Zdenek Kabelac [Thu, 23 Feb 2017 16:41:59 +0000 (17:41 +0100)]
cache: reporting cache metadata format

Report CMFmt column with cache metadata format version.

Report KMFmt column with 'kernel cache metadata format version' for device.
(a value reported from status).

(Update 'CacheMode' to name 'Cache' as primary segtype).

7 years agocache: validation for cache_metadata_format
Zdenek Kabelac [Sun, 26 Feb 2017 20:22:43 +0000 (21:22 +0100)]
cache: validation for cache_metadata_format

Only  cache-pool segtype may store cache_metadata_format.
Only supported values are 0,1,2
Format 2 requires LV status uses LV_METADATA_FORMAT.
Format 0 (unselected) or 1 shall not set this 'incompatible' status.

7 years agocache: use DM_CACHE_FEATURE_METADATA2 with libdm
Zdenek Kabelac [Sat, 25 Feb 2017 11:49:55 +0000 (12:49 +0100)]
cache: use DM_CACHE_FEATURE_METADATA2 with libdm

Call libdm  with new feature flag when metadata format 2 is selected
and available in kernel cache target.

7 years agocache: LV supports cache segs with metadata format
Zdenek Kabelac [Wed, 1 Mar 2017 11:26:56 +0000 (12:26 +0100)]
cache: LV supports cache segs with metadata format

Cache pool read/writes metadata_format within its segment type..

For CachePoolLV unselected metadata format is NOT stored in metadata.

For CacheLV when metadata format is not present/selected in lvm2 metadata,
it's automatically assumed to be the version 1 (backward compatible).

To ensure older lvm2 will not 'miss-read' metadata with new version 2,
such LV is marked with METADATA_FORMAT status flag (segment is
specifying metadata format). So when cache uses metadata format 2,
it will become inaccesible on older system without such support.
(kernel dm cache < 1.10,  lvm2 < 2.02.169).

7 years agocache: introduce allocation/cache_metadata_format
Zdenek Kabelac [Sun, 26 Feb 2017 19:19:07 +0000 (20:19 +0100)]
cache: introduce allocation/cache_metadata_format

Add new profilable configation setting to let user select
which metadata format of a created cache pool he wish to use.

By default the 'best' available format is autodetected at runtime,
but user may enforce format 1 or 2 ATM.

Code also detects availability for metadata2 supporting cache target.

In case of troubles user may easily Disable usage of this feature
by placing 'metadata2' into global/cache_disabled_features list.

7 years agolibdm: maintain binary interface for new FEATURE flag
Zdenek Kabelac [Fri, 24 Feb 2017 21:41:42 +0000 (22:41 +0100)]
libdm: maintain binary interface for new FEATURE flag

Older library version was not detecting unknown 'feature' bits
and could let start target without needed option.

New versioned symbol now checks for supported feature bits.
_Base version keeps accepting only previously known features and
mask/ignores unknown bits.

NB: if the older binary passed in 'random' bits, it will not get
metadata2 by chance. New linked binary get new validation function.
Library user is required to not pass 'trash' for unsupported bits,
as such calls will be rejected.

7 years agolibdm: support cache metadata2 feature flag
Zdenek Kabelac [Thu, 23 Feb 2017 22:38:06 +0000 (23:38 +0100)]
libdm: support cache metadata2 feature flag

Dm cache target version 1.10 introduces new cache metadata format
(upstream kernel >=4.11).

New format is enable by passing new target feature flag metadata2.
Interace side on libdm uses DM_CACHE_FEATURE_METADATA2.
This feature bit is now also recognized on status
and set in 'feature_flags' field of dm_status_cache structure.

Code also adds check for 'highest' supported feature flag bit.
So it rejects properly any 'unknown' feature bit set by application.

7 years agolibdm: better code to enforce writethrough
Zdenek Kabelac [Thu, 23 Feb 2017 22:35:40 +0000 (23:35 +0100)]
libdm: better code to enforce writethrough

Better code to enforce writethrough caching for cleaner policy.
Only check for cleaner when DM_CACHE_FEATURE_PASSTHROUGH or
DM_CACHE_FEATURE_WRITEBACK is set.

7 years agolibdm: passthrough checks traling space char
Zdenek Kabelac [Sun, 26 Feb 2017 18:31:06 +0000 (19:31 +0100)]
libdm: passthrough checks traling space char

When checking for passthrough length, check also for extra ' ' char
just like with other feature strings.

7 years agotests: use LVM_SYSTEM_DIR for etc
Zdenek Kabelac [Thu, 2 Mar 2017 22:01:30 +0000 (23:01 +0100)]
tests: use LVM_SYSTEM_DIR for etc

Instead of hardcoding etc/ dir  use $LVM_SYSTEM_DIR.

7 years agocleanup: minor cosmetics
Zdenek Kabelac [Tue, 28 Feb 2017 11:31:36 +0000 (12:31 +0100)]
cleanup: minor cosmetics

Update some return value to match return type.
Drop unused function and declaration.

7 years agocache: improve profile support for cache_set_policy
Zdenek Kabelac [Tue, 7 Mar 2017 22:54:01 +0000 (23:54 +0100)]
cache: improve profile support for cache_set_policy

7 years agopool: rework handling of passed args
Zdenek Kabelac [Thu, 9 Mar 2017 15:24:28 +0000 (16:24 +0100)]
pool: rework handling of passed args

As now we can properly recognize all paramerters for pool creation,
we may drop PASS_ARG_  defines and rely on '_UNSELECTED' or 0 entries
as being those without user given args.

When setting are not given on command line - 'update' function
fill them from profiles or configuration. For this  'profile' arg
was needed to be passed around and since  'VG' itself is not needed,
it's been all replaced with 'cmd, profile, extents_size' args.

7 years agothin: single formula for estimation
Zdenek Kabelac [Thu, 9 Mar 2017 14:02:07 +0000 (15:02 +0100)]
thin: single formula for estimation

Share the same formula for estimation chunk size or metadata size.
Use uint32_t matching type.

7 years agoparser: enable --metadataprofile for pool lvconvert
Zdenek Kabelac [Fri, 10 Mar 2017 12:02:55 +0000 (13:02 +0100)]
parser: enable --metadataprofile for pool lvconvert

Lvconvert can use values from profile when caching.

7 years agoparser: allow --zero for pool conversion
Zdenek Kabelac [Fri, 3 Mar 2017 10:31:31 +0000 (11:31 +0100)]
parser: allow --zero for pool conversion

7 years agolvconvert: share function for cache params
Zdenek Kabelac [Mon, 27 Feb 2017 13:54:08 +0000 (14:54 +0100)]
lvconvert: share function for cache params

Reuse same code for getting/setting cache parameters with lvcreate.

So there is single one place how to get vars from profiles and configs.

Variables declarations are moved to start of function and
there is no need to initialize them as they are always
defined by functions get_cache_params() and get_pool_params().

7 years agolvcreate: do not round cache volumes on cache chunks
Zdenek Kabelac [Thu, 9 Mar 2017 16:15:56 +0000 (17:15 +0100)]
lvcreate: do not round cache volumes on cache chunks

Since cache chunk might be huge and there is no technical need
to enforce rounding and there is actually more 'real' VG space
used then necessary - keep rounding on 'chunk' bounrary only
for thin volumes - where it's the space used anyway.

NB: we support conversion of any-size 'existing' LV into cached LV.

7 years agolvcreate: respecting profile settings
Zdenek Kabelac [Fri, 10 Mar 2017 12:04:30 +0000 (13:04 +0100)]
lvcreate: respecting profile settings

7 years agocache: extend usability of cache_set_params
Zdenek Kabelac [Mon, 27 Feb 2017 13:53:45 +0000 (14:53 +0100)]
cache: extend usability of cache_set_params

Fix missing reset of '*settings' pointer when no args were given.

Handle cache_chunk settings like all other settings, so it is properly
updated only with non-zero settings and the existing cache-pool
chunk_size is not being reconfigured.

7 years agocache: improve support for profile for cache settings
Zdenek Kabelac [Sun, 5 Mar 2017 16:42:15 +0000 (17:42 +0100)]
cache: improve support for profile for cache settings

User can specify metadata profile which stores important cache
geometry data for easy configuration.

Fix missing support for getting chunk_size, cache_mode, cache_policy
for a cache/cache pools volumes from configuration or metadata profile.

7 years agocache: get and set cache params
Zdenek Kabelac [Thu, 9 Mar 2017 15:20:44 +0000 (16:20 +0100)]
cache: get and set cache params

7 years agolvconvert: replacing with goto
Zdenek Kabelac [Thu, 9 Mar 2017 17:10:35 +0000 (18:10 +0100)]
lvconvert: replacing with goto

Split-off patch that just replaces returns with 'goto bad'
so there is single place to release  policy_settings.

In the next patch we will start to use some shared
function call between lvconvert and lvcreate
(effectively restoring previous logic which has got lost).

7 years agocache: set chunk_size as first param
Zdenek Kabelac [Thu, 9 Mar 2017 14:54:30 +0000 (15:54 +0100)]
cache: set chunk_size as first param

7 years agocache: use UNSELECTED enum
Zdenek Kabelac [Fri, 3 Mar 2017 13:52:32 +0000 (14:52 +0100)]
cache: use UNSELECTED enum

Switch from _UNDEFINED to _UNSELECTED which is more describing
its value 0, while value -1 is better match for UNDEFINED.

7 years agothin: add new ZERO/DISCARDS_UNSELECTED
Zdenek Kabelac [Fri, 3 Mar 2017 19:46:13 +0000 (20:46 +0100)]
thin: add new ZERO/DISCARDS_UNSELECTED

To more easily recognize unselected state from select '0' state
add new 'THIN_ZERO_UNSELECTED' enum.
Same applies to THIN_DISCARDS_UNSELECTED.

For those we no longer need to use PASS_ARG_ZERO or PASS_ARG_DISCARDS.

7 years agopool: drop duplicated sign test
Zdenek Kabelac [Thu, 9 Mar 2017 16:09:31 +0000 (17:09 +0100)]
pool: drop duplicated sign test

Avoid duplicate testing of '-' sign.
Already checked with arg_from_list_is_negative().

7 years agopool: split chunk size validation
Zdenek Kabelac [Sun, 5 Mar 2017 16:41:16 +0000 (17:41 +0100)]
pool: split chunk size validation

Move cache and thin bits into their respective manipulation files.
When possible directly call respective chunk_size validator.

7 years agothin: getting default chunk_size from single place
Zdenek Kabelac [Wed, 1 Mar 2017 10:23:26 +0000 (11:23 +0100)]
thin: getting default chunk_size from single place

Basically code moving operation to have a single place resolving
thin_pool_chunk_size_policy.

Supported are generic & performance profiles.

Function is now shared between thin manipulation code and configuration
_CFG logic to obtain defaults and handle correct reporting upward coding
stack.

7 years agocache: properly translate DM_THIN_DISCARDS
Zdenek Kabelac [Tue, 7 Mar 2017 22:55:08 +0000 (23:55 +0100)]
cache: properly translate DM_THIN_DISCARDS

DM status uses DM defines which need to be translated to LVM enum.

7 years agolvcreate: avoid rejecting --metadataprofile
Zdenek Kabelac [Thu, 2 Mar 2017 22:02:28 +0000 (23:02 +0100)]
lvcreate: avoid rejecting  --metadataprofile

Likely user normaly have used 'shortcut' --profile option which
is (for lvcreate) decoded as metadataprofile.

However full option was rejected.

7 years agolvconvert: validate name before prompt
Zdenek Kabelac [Fri, 24 Feb 2017 11:56:40 +0000 (12:56 +0100)]
lvconvert: validate name before prompt

Before prompting make sure name fits.

7 years agolvconvert: indent and code simplification
Zdenek Kabelac [Fri, 24 Feb 2017 11:52:19 +0000 (12:52 +0100)]
lvconvert: indent and code simplification

Simple modifications to existing  _lvconvert_to_pool().

7 years agoraid: enhance lv_raid_convert() header relative to reshaping
Heinz Mauelshagen [Fri, 10 Mar 2017 18:26:02 +0000 (19:26 +0100)]
raid: enhance lv_raid_convert() header relative to reshaping

7 years agolvcreate: fix "striped" limit
Heinz Mauelshagen [Fri, 10 Mar 2017 17:57:06 +0000 (18:57 +0100)]
lvcreate: fix "striped" limit

Fix regression limiting number of stripes to 8.
Raise back to 128 as before.

Resolves: rhbz1389546

7 years agocommands: fix missing skip condition in coverity fixes
David Teigland [Fri, 10 Mar 2017 17:49:24 +0000 (11:49 -0600)]
commands: fix missing skip condition in coverity fixes

Fix for commit 5e6ea4b7

7 years agodaemons: use DEFAULT_PROC_DIR in dmfilemapd
Bryn M. Reeves [Fri, 10 Mar 2017 17:25:11 +0000 (17:25 +0000)]
daemons: use DEFAULT_PROC_DIR in dmfilemapd

Include defaults.h and use it to obtain the default procfs mount
point in dmfilemapd.

7 years agodaemons: cleanup dmeventd references from dmfilemapd/Makefile.in
Bryn M. Reeves [Fri, 10 Mar 2017 17:12:04 +0000 (17:12 +0000)]
daemons: cleanup dmeventd references from dmfilemapd/Makefile.in

7 years agocommands: coverity fixes
David Teigland [Fri, 10 Mar 2017 16:19:21 +0000 (10:19 -0600)]
commands: coverity fixes

7 years agolibdm: use correct value for NR_FILEMAPD_ARGS
Bryn M. Reeves [Fri, 10 Mar 2017 16:52:27 +0000 (16:52 +0000)]
libdm: use correct value for NR_FILEMAPD_ARGS

The argument count for the file mapping daemon needs to account
for the program's name in argv[0] to avoid indexing off the end
of the argument array.

7 years agodmsetup: always initialise 'dms' in _stats_update_file()
Bryn M. Reeves [Fri, 10 Mar 2017 16:44:08 +0000 (16:44 +0000)]
dmsetup: always initialise 'dms' in _stats_update_file()

7 years agolibdm: make dm_stats_destroy(NULL) a no-op
Bryn M. Reeves [Fri, 10 Mar 2017 16:41:28 +0000 (16:41 +0000)]
libdm: make dm_stats_destroy(NULL) a no-op

Test for NULL in dm_stats_destroy() and return immediately if
the struct dm_stats pointer is NULL (similar to free(NULL)).

This simplifies cleanup code which otherwise needs to:

  out:
    if (dms)
        dm_stats_destroy(dms);
    return;

7 years agolibdm: dm_stats_start_filemapd() mode can never be < 0
Bryn M. Reeves [Fri, 10 Mar 2017 14:42:23 +0000 (14:42 +0000)]
libdm: dm_stats_start_filemapd() mode can never be < 0

7 years agoraid: fix compile time warning
Heinz Mauelshagen [Fri, 10 Mar 2017 13:43:37 +0000 (14:43 +0100)]
raid: fix compile time warning

7 years agoman: add man-generator and build artefacts to .gitignore
Bryn M. Reeves [Fri, 10 Mar 2017 13:14:02 +0000 (13:14 +0000)]
man: add man-generator and build artefacts to .gitignore

7 years agotools: add generated headers to .gitignore
Bryn M. Reeves [Fri, 10 Mar 2017 13:13:41 +0000 (13:13 +0000)]
tools: add generated headers to .gitignore

7 years agodmsetup: always initialise 'mode' in filemap create functions
Bryn M. Reeves [Fri, 10 Mar 2017 12:04:02 +0000 (12:04 +0000)]
dmsetup: always initialise 'mode' in filemap create functions

Older compilers cannot tell that the 'mode' variable is only
used in branches in which it is assigned:

dmsetup.c:5651: warning: "mode" may be used uninitialized in this function
dmsetup.c:5023: warning: "mode" may be used uninitialized in this function

Avoid this by always assigning the variable a value.

This page took 0.068726 seconds and 5 git commands to generate.