]> sourceware.org Git - lvm2.git/log
lvm2.git
11 years agopython-lvm: Improve unit test case(s)
Tony Asleson [Mon, 1 Jul 2013 21:01:48 +0000 (17:01 -0400)]
python-lvm: Improve unit test case(s)

Create/remove PV
Create/remove snapshots (old type & thin)
PV lookups based on name and UUID
PV resize

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agoliblvm: Moved additional pv resize code
Tony Asleson [Fri, 28 Jun 2013 21:25:28 +0000 (17:25 -0400)]
liblvm: Moved additional pv resize code

The pv resize code required that a lvm_vg_write be done
to commit the change.  When the method to add the ability
to list all PVs, including ones that are not assocated with
a VG we had no way for the user to make the change persistent.
Thus additional resize code was move and now liblvm calls into
a resize function that does indeed write the changes out, thus
not requiring the user to explicitly write out he changes.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Bug fixes from unit tests.
Tony Asleson [Tue, 18 Jun 2013 19:13:27 +0000 (15:13 -0400)]
python-lvm: Bug fixes from unit tests.

After the last rebase, existing unit test case was
run which uncovered a number of errors that required
attention.

Uninitialized variables and changes to type of numeric
return type were addressed.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Change snapshot call impl.
Tony Asleson [Thu, 6 Jun 2013 20:41:35 +0000 (16:41 -0400)]
python-lvm: Change snapshot call impl.

Using the new object parameter creation to create the snapshot.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add thinp snapshot functionality
Tony Asleson [Thu, 6 Jun 2013 20:40:51 +0000 (16:40 -0400)]
lvm2app: Add thinp snapshot functionality

Added parameter object constructor for thinp and
changed the shapshot function to use it.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Bindings for thin pool, thin lv creation V3
Tony Asleson [Fri, 3 May 2013 23:37:52 +0000 (19:37 -0400)]
python-lvm: Bindings for thin pool, thin lv creation V3

V2: Bug fix.
V3: Use updated property interface, add constants for discard.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Added lv method getOrigin
Tony Asleson [Thu, 11 Apr 2013 20:49:08 +0000 (16:49 -0400)]
python-lvm: Added lv method getOrigin

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add function to retrieve the origin.
Tony Asleson [Thu, 11 Apr 2013 20:48:40 +0000 (16:48 -0400)]
lvm2app: Add function to retrieve the origin.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Add method to retrieve lv attr.
Tony Asleson [Wed, 10 Apr 2013 18:38:18 +0000 (14:38 -0400)]
python-lvm: Add method to retrieve lv attr.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add method to retrieve attr from lv.
Tony Asleson [Wed, 10 Apr 2013 18:37:56 +0000 (14:37 -0400)]
lvm2app: Add method to retrieve attr from lv.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Add pvCreate python method
Tony Asleson [Wed, 3 Apr 2013 21:54:12 +0000 (17:54 -0400)]
python-lvm: Add pvCreate python method

Added to base namespace.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolib2app: Added PV create. V2
Tony Asleson [Wed, 3 Apr 2013 21:53:21 +0000 (17:53 -0400)]
lib2app: Added PV create. V2

V2: Correct call to lock_vol

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolib2app: Fix warnings in lvm_list_pvs_free
Tony Asleson [Wed, 3 Apr 2013 21:07:08 +0000 (17:07 -0400)]
lib2app: Fix warnings in lvm_list_pvs_free

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years ago_get_pvs: Remove unused variable
Tony Asleson [Wed, 3 Apr 2013 21:05:00 +0000 (17:05 -0400)]
_get_pvs: Remove unused variable

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Set suppress to 1
Tony Asleson [Tue, 2 Apr 2013 21:10:02 +0000 (17:10 -0400)]
lvm2app: Set suppress to 1

Removes printing to stdout/stderr etc.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Add bindings for lvm_pv_remove
Tony Asleson [Tue, 2 Apr 2013 20:10:57 +0000 (16:10 -0400)]
python-lvm: Add bindings for lvm_pv_remove

Method off of base lvm namespace "pvRemove".

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Implement lvm_pv_remove V2
Tony Asleson [Tue, 2 Apr 2013 20:10:18 +0000 (16:10 -0400)]
lvm2app: Implement lvm_pv_remove V2

Code move and changes to support calling code from
command line and from library interface.

V2 Change lock_vol call

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add function to retrieve list of PVs V3
Tony Asleson [Tue, 19 Mar 2013 21:37:04 +0000 (17:37 -0400)]
lvm2app: Add function to retrieve list of PVs V3

As locks are held, you need to call the included function
to release the memory and locks when done transversing the
list of physical volumes.

V2: Rebase fix
V3: Prevent VGs from getting cached and then write protected.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Implement lv resize (v3)
Tony Asleson [Wed, 13 Mar 2013 22:07:16 +0000 (18:07 -0400)]
lvm2app: Implement lv resize (v3)

Simplified version of lv resize.

v3: Rebase changes to make work.  Needed to set sizeargs = 1
to indicate to resize that we are asking for a size based
resize.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Move core lv re-size code (v6)
Tony Asleson [Wed, 13 Mar 2013 22:00:29 +0000 (18:00 -0400)]
lvm2app: Move core lv re-size code (v6)

Moved to allow use from command line and for library use.

v3,v4,v5,v6: rebase changes

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Rework argument handling for lv resize
Tony Asleson [Tue, 8 Jan 2013 22:39:00 +0000 (16:39 -0600)]
lvm2app: Rework argument handling for lv resize

Extend the lv resize parameter structure to contain everything
the re-size functions need so that the command line does not
need to be present for lower level calls when we call from
library functions.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Move percent_of_extents to lvm-percent.[h|c]
Tony Asleson [Tue, 8 Jan 2013 20:29:56 +0000 (14:29 -0600)]
lvm2app: Move percent_of_extents to lvm-percent.[h|c]

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Implementation of pv resize (v6)
Tony Asleson [Wed, 13 Mar 2013 19:39:56 +0000 (14:39 -0500)]
lvm2app: Implementation of pv resize (v6)

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add thin and thin pool lv creation V5
Tony Asleson [Wed, 17 Apr 2013 06:29:21 +0000 (11:59 +0530)]
lvm2app: Add thin and thin pool lv creation V5

Add thin and thin pool lv creation support to lvm library

This is Mohan's thinp patch, re-worked to include suggestions
from Zdenek and Mohan.

V2: Remove const lvm_lv_params_create_thin
    Add const lvm_lv_params_skip_zero_get

V3: Changed get/set to use generic functions like current
    property

V4: Corrected macro in properties.c

V5: Fixed a bug in liblvm/lvm_lv.c function lvm_lv_create.
    incorrectly used pool instead of lv_name when doing the
    find_lv_in_vg call.

Based on work done by M. Mohan Kumar <mohan@in.ibm.com>

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agoWHATS_NEW: config/profile_dir
Peter Rajnoha [Tue, 2 Jul 2013 13:57:46 +0000 (15:57 +0200)]
WHATS_NEW: config/profile_dir

11 years agoWHATS_NEW: configuration profile support
Peter Rajnoha [Tue, 2 Jul 2013 13:51:21 +0000 (15:51 +0200)]
WHATS_NEW: configuration profile support

11 years agoreport: add vg_profile and lv_profile to report the profile attached to VG/LV
Peter Rajnoha [Tue, 2 Jul 2013 12:34:52 +0000 (14:34 +0200)]
report: add vg_profile and lv_profile to report the profile attached to VG/LV

vgs -o vg_profile ...
lvs -o lv_profile ...

11 years agoprofile: add default.profile and install it
Peter Rajnoha [Fri, 28 Jun 2013 12:08:04 +0000 (14:08 +0200)]
profile: add default.profile and install it

The default.profile contains all settings that are customizable
by a profile. This default profile can be copied across to create
new profiles.

11 years agoconf: add separate 'conf' dir for config files
Peter Rajnoha [Fri, 28 Jun 2013 08:46:00 +0000 (10:46 +0200)]
conf: add separate 'conf' dir for config files

11 years agoprofile: strictly require profiles to be valid
Peter Rajnoha [Thu, 27 Jun 2013 12:01:22 +0000 (14:01 +0200)]
profile: strictly require profiles to be valid

We must ensure that the profile is valid and contains
only items that are profilable - the check is forced
for profiles.

11 years agothin: make selected thinp settings profilable
Peter Rajnoha [Thu, 27 Jun 2013 09:22:02 +0000 (11:22 +0200)]
thin: make selected thinp settings profilable

These settins are customizable by profiles:

allocation/thin_pool_zero
allocation/thin_pool_discards
allocation/thin_pool_chunk_size
activation/thin_pool_autoextend_threshold
activation/thin_pool_autoextend_percent

11 years agolv: add lv_config_profile fn
Peter Rajnoha [Thu, 27 Jun 2013 09:17:16 +0000 (11:17 +0200)]
lv: add lv_config_profile fn

Returns LV's profile if it exists, VG's profile otherwise
(LV inherits VG's profile).

11 years agoconfig: add validation for configuration profiles
Peter Rajnoha [Wed, 26 Jun 2013 14:27:28 +0000 (16:27 +0200)]
config: add validation for configuration profiles

Besides the classical configuration checks (type checking and
checking whether the item is recognized by lvm tools) for profiles,
do an extra check whether the configuration setting is customizable
by a profile at all. Give a warning message if not.

11 years agoconfig: make it possible to run several instances of configuration check at once
Peter Rajnoha [Wed, 26 Jun 2013 12:53:57 +0000 (14:53 +0200)]
config: make it possible to run several instances of configuration check at once

Before, the status of the configuration check (config_def_check fn call)
was saved directly in global configuration definitinion array (as part
of the cfg_def_item_t/flags)

This patch introduces the "struct cft_check_handle" that defines
configuration check parameters as well as separate place to store
the status (status here means CFG_USED and CFG_VALID flags, formerly
saved in cfg_def_item_t/flags). This struct can hold config check
parameters as well as the status for each config tree separately,
thus making it possible to run several instances of config_def_check
without interference.

11 years agotoolcontext: add a few comments for struct cmd_context and rename config_valid -...
Peter Rajnoha [Wed, 26 Jun 2013 10:29:19 +0000 (12:29 +0200)]
toolcontext: add a few comments for struct cmd_context and rename config_valid -> config_initialized

Just to make it more clear and also not to confuse
config_valid with check against config definition
(and its 'valid' flag within the config defintion tree).

11 years agotools: add support for changing configuration profile for existing volumes (vgchange...
Peter Rajnoha [Tue, 25 Jun 2013 10:33:06 +0000 (12:33 +0200)]
tools: add support for changing configuration profile for existing volumes (vgchange/lvchange)

The command to change the profile for existing VG/LV:
"vgchange/lvchange --profile <profile_name>"

The command to detach any existing profile from VG/LV:
"vgchange/lvchange --detachprofile"

11 years agometadata: add support for storing profile name in metadata (during vgcreate/lvcreate)
Peter Rajnoha [Tue, 25 Jun 2013 10:32:09 +0000 (12:32 +0200)]
metadata: add support for storing profile name in metadata (during vgcreate/lvcreate)

If "vgcreate/lvcreate --profile <profile_name>" is used, the profile
name is automatically stored in metadata for making it possible to
load it automatically next time the VG/LV is used.

11 years agoconfig: add profile arg to find_config_tree_bool
Peter Rajnoha [Tue, 25 Jun 2013 10:31:53 +0000 (12:31 +0200)]
config: add profile arg to find_config_tree_bool

11 years agoconfig: add profile arg to find_config_tree_float
Peter Rajnoha [Tue, 25 Jun 2013 10:31:36 +0000 (12:31 +0200)]
config: add profile arg to find_config_tree_float

11 years agoconfig: add profile arg to find_config_tree_int64
Peter Rajnoha [Tue, 25 Jun 2013 10:31:24 +0000 (12:31 +0200)]
config: add profile arg to find_config_tree_int64

11 years agoconfig: add profile arg to find_config_tree_int
Peter Rajnoha [Tue, 25 Jun 2013 10:30:34 +0000 (12:30 +0200)]
config: add profile arg to find_config_tree_int

11 years agoconfig: add profile arg to find_config_tree_str_allow_empty
Peter Rajnoha [Tue, 25 Jun 2013 10:30:08 +0000 (12:30 +0200)]
config: add profile arg to find_config_tree_str_allow_empty

11 years agoconfig: add profile arg to find_config_tree_str
Peter Rajnoha [Tue, 25 Jun 2013 10:29:54 +0000 (12:29 +0200)]
config: add profile arg to find_config_tree_str

11 years agoconfig: add profile arg to find_config_tree_node
Peter Rajnoha [Tue, 25 Jun 2013 10:29:33 +0000 (12:29 +0200)]
config: add profile arg to find_config_tree_node

11 years agometadata: read VG/LV profile name from metadata if it exists and load it
Peter Rajnoha [Tue, 25 Jun 2013 10:28:36 +0000 (12:28 +0200)]
metadata: read VG/LV profile name from metadata if it exists and load it

This is per VG/LV profile loading on demand. The profile itself is saved
in struct volume_group/logical_volume as "profile" field so we can
reference it whenever needed.

11 years agoconfig: add override_config_tree_from_profile fn to add the profile to a configuratio...
Peter Rajnoha [Tue, 25 Jun 2013 10:27:37 +0000 (12:27 +0200)]
config: add override_config_tree_from_profile fn to add the profile to a configuration cascade

When placing the profile in a configuration cascade, this sequence is
used exactly:

CONFIG_STRING -> CONFIG_PROFILE -> CONFIG_FILE/MERGED_FILES

So if the profile is used, it overloads the lvm.conf (and any
existing tag configs). However, if "--config" is used to define
a custom configuration on command line, this overloads even the
profile config!

11 years agoconfig: add support for loading profiles
Peter Rajnoha [Tue, 25 Jun 2013 10:27:04 +0000 (12:27 +0200)]
config: add support for loading profiles

This patch adds --profile arg to lvm cmds and adds config/profile_dir
configuration setting to select the directory where profiles are stored
By default it's /etc/lvm/profile.

The profiles are added by using new "add_profile" fn and then loaded
using the "load_profile" fn. All profiles are stored in a cmd context
within the new "struct profile_params":

struct profile_params {
  const char *dir;
  struct profile *global_profile;
  struct dm_list profiles_to_load;
  struct dm_list profiles;
};

...where "dir" is the directory with profiles, "global_profile" is
the profile that is set globally via the --profile arg (IOW, not
set per VG/LV basis based on metadata record) and the "profiles"
is the list with loaded profiles.

11 years agoconfigure: add configure --with-default-profile-subdir
Peter Rajnoha [Tue, 25 Jun 2013 10:26:40 +0000 (12:26 +0200)]
configure: add configure --with-default-profile-subdir

Configuration profiles are selected configuration items that can
be loaded dynamically on demand and overlayed over existing
configuration on demand (either on cmd line by selecting the profile
name to be used globally or retrieved from metadata and used per
VG/LV basis only).

The default directory where profiles are stored is configurable
at compile time with --with-default-profile-subdir.

11 years agoconfig: add config_source_t type to identify configuration source
Peter Rajnoha [Tue, 25 Jun 2013 10:25:43 +0000 (12:25 +0200)]
config: add config_source_t type to identify configuration source

A helper type that helps with identification of the configuration source
which makes handling the configuration cascade a bit easier, mainly
removing and adding configuration trees to cascade dynamically.

Currently, the possible types are:

  CONFIG_UNDEFINED - configuration is not defined yet (not initialized)
  CONFIG_FILE - one file configuration
  CONFIG_MERGED_FILES - configuration that is a result of merging more files into one
  CONFIG_STRING - configuration string typed on cmd line directly
  CONFIG_PROFILE - profile configuration (the new type of configuration, patches will follow...)

Also, generalize existing "remove_overridden_config_tree" to work with
configuration type identification in a cascade. Before, it was just
the CONFIG_STRING we used. Now, we need some more to add in a
cascade (like the CONFIG_PROFILE). So, we have:

  struct dm_config_tree *remove_config_tree_by_source(struct cmd_context *cmd, config_source_t source);
  config_source_t config_get_source_type(struct dm_config_tree *cft);

... for removing the tree by its source type from the cascade and
simply getting the source type.

11 years agorefactor: factor out common part of the code to open and read config files
Peter Rajnoha [Tue, 25 Jun 2013 10:25:23 +0000 (12:25 +0200)]
refactor: factor out common part of the code to open and read config files

11 years agoarchive: add missing bit set
Zdenek Kabelac [Tue, 2 Jul 2013 09:07:15 +0000 (11:07 +0200)]
archive: add missing bit set

In the last update not all code paths have set the archived flag.
If we run in test mode or without archiving enabled - set the bit
as well - so test whether archiving has been called succesfully
will be ok. (in relase fix).

11 years agocleanup: swap initial assignment
Zdenek Kabelac [Sun, 30 Jun 2013 19:40:56 +0000 (21:40 +0200)]
cleanup: swap initial assignment

Easier to read code.

11 years agocleanup: stack usage
Zdenek Kabelac [Mon, 1 Jul 2013 09:27:11 +0000 (11:27 +0200)]
cleanup: stack usage

Shortening code with macros return_0, return_NULL.
Add some missing stack prints in error paths.

11 years agocleanup: introduce return_ECMD_FAILED macro
Zdenek Kabelac [Mon, 1 Jul 2013 09:27:22 +0000 (11:27 +0200)]
cleanup: introduce return_ECMD_FAILED macro

Use shortening macro for common code sequence
stack;
return ECMD_FAILED;

11 years agovg/lvchange: drop local archived handling
Zdenek Kabelac [Sun, 30 Jun 2013 16:03:34 +0000 (18:03 +0200)]
vg/lvchange: drop local archived handling

Drop code handling archived flag now handled implicitely.

11 years agoarchiver: do not archive vg more then once
Zdenek Kabelac [Sun, 30 Jun 2013 16:01:19 +0000 (18:01 +0200)]
archiver: do not archive vg more then once

Do not keep multiple archives for the executed command.
Reuse the ALLOCATABLE_PV from pv status for
ARCHIVED_VG vg status. Mark VG with the bit with the
first archivation.

11 years agocleanup: move bit flags in order
Zdenek Kabelac [Sun, 30 Jun 2013 15:06:09 +0000 (17:06 +0200)]
cleanup: move bit flags in order

Preseve the sequence of bits.

11 years agocleanup: simplify code around flock
Zdenek Kabelac [Sat, 29 Jun 2013 21:10:33 +0000 (23:10 +0200)]
cleanup: simplify code around flock

11 years agocleanup: more dmeventd code cleanup
Zdenek Kabelac [Sun, 30 Jun 2013 14:04:14 +0000 (16:04 +0200)]
cleanup: more dmeventd code cleanup

11 years agodmeventd: move code from signal handler
Zdenek Kabelac [Sun, 30 Jun 2013 13:53:42 +0000 (15:53 +0200)]
dmeventd: move code from signal handler

Instead of calling syslog() from signal event handler,
run all logging code in the main loop.

Also it needs to take the lock and check for list
only when really needed.

11 years agometadata: log_debug only when BA found in metadata
Peter Rajnoha [Thu, 27 Jun 2013 14:03:35 +0000 (16:03 +0200)]
metadata: log_debug only when BA found in metadata

...not the other way round as it was before. This way it makes
more sense as BA use is exceptional and it's useless to
contaminate the log with messages about BA not being found
in metadata.

11 years agocleanup: clear outdated comment (TODO already done)
Peter Rajnoha [Thu, 27 Jun 2013 13:26:39 +0000 (15:26 +0200)]
cleanup: clear outdated comment (TODO already done)

11 years agodmeventd: fix cleanup commit
Zdenek Kabelac [Tue, 25 Jun 2013 21:05:06 +0000 (23:05 +0200)]
dmeventd: fix cleanup commit

Fixing wrong rebase of cleanup commit.
Put back call to outth.

11 years agodebug: add pointer to -DDEBUG_POOL compilation
Zdenek Kabelac [Thu, 18 Feb 2010 15:38:32 +0000 (16:38 +0100)]
debug: add pointer to -DDEBUG_POOL compilation

Show 'at' pointer address with pool name.
It's useful for debugging to be able to locate pointer address in the
debug trace log. It's only available when compiled with extra debug
compilation flag DEBUG_POOL in make.tmpl.

11 years agothin: check for creation of pool
Zdenek Kabelac [Mon, 24 Jun 2013 18:54:05 +0000 (20:54 +0200)]
thin: check for creation of pool

11 years agocleanup: add dot to lvchange message
Zdenek Kabelac [Tue, 25 Jun 2013 11:43:35 +0000 (13:43 +0200)]
cleanup: add dot to lvchange message

11 years agocleanup: use "" around type in error message
Zdenek Kabelac [Mon, 24 Jun 2013 10:00:48 +0000 (12:00 +0200)]
cleanup: use "" around type in error message

A bit more cleaner error message for wrong discards paramater.

11 years agocleanup: move mirror check code closer
Zdenek Kabelac [Mon, 24 Jun 2013 09:55:18 +0000 (11:55 +0200)]
cleanup: move mirror check code closer

Group a bit more code related to mirrors.

11 years agocleanup: code swap
Zdenek Kabelac [Mon, 24 Jun 2013 09:48:08 +0000 (11:48 +0200)]
cleanup: code swap

Use easier to read positive query and indent line.

11 years agocleanup: use log_print instead of log_error
Zdenek Kabelac [Thu, 20 Jun 2013 12:08:25 +0000 (14:08 +0200)]
cleanup: use log_print instead of log_error

Since reduce the message has informational character and doesn't lead
to exit of the command - reduce the log level to info print as we
use for other similar types.

Reindent next print message.

11 years agocleanup: reformat code of dmeventd
Zdenek Kabelac [Thu, 21 Jun 2012 19:20:01 +0000 (21:20 +0200)]
cleanup: reformat code of dmeventd

11 years agocleanup: Remove message used for development
Jonathan Brassow [Mon, 24 Jun 2013 11:16:39 +0000 (06:16 -0500)]
cleanup:  Remove message used for development

Failed to clean out all messages used during development.

11 years agodev-type: dev_get_primary_dev: fix ret value if dev is a partition and we used sysfs
Peter Rajnoha [Sun, 23 Jun 2013 09:14:34 +0000 (11:14 +0200)]
dev-type: dev_get_primary_dev: fix ret value if dev is a partition and we used sysfs

11 years agoTEST: Test RAID syncaction, writemostly, & refresh under snapshots
Jonathan Brassow [Thu, 20 Jun 2013 16:48:15 +0000 (11:48 -0500)]
TEST: Test RAID syncaction, writemostly, & refresh under snapshots

Test the different RAID lvchange scenarios under snapshot as well.

This patch also updates calculations for where to write to an
underlying PV when testing various syncactions.

11 years agoClean-up: WHATS_NEW
Jonathan Brassow [Thu, 20 Jun 2013 00:55:34 +0000 (19:55 -0500)]
Clean-up: WHATS_NEW

Choosing between two entries and forgot to remove one.

11 years agoRAID/MIRROR: Honor mirror_segtype_default when upconverting linear LVs
Jonathan Brassow [Wed, 19 Jun 2013 22:50:10 +0000 (17:50 -0500)]
RAID/MIRROR: Honor mirror_segtype_default when upconverting linear LVs

If the user would upconvert a linear LV to a mirror without specifying
the segment type ("--type mirror" vs "--type raid1"), the "mirror"
segment type would be chosen without consulting the 'default_mirror_segtype'
setting in lvm.conf.  This is now used as the basis for determining
which should be used if left unspecified.

11 years agocleanup: use parsed yes_no_arg
Zdenek Kabelac [Mon, 17 Jun 2013 17:55:02 +0000 (19:55 +0200)]
cleanup: use parsed yes_no_arg

Do not parse yes_no_arg inside tools code and use already
available result as uint.

11 years agocleanup: return lv_is_ as 1 or 0
Zdenek Kabelac [Mon, 17 Jun 2013 17:46:22 +0000 (19:46 +0200)]
cleanup: return lv_is_ as 1 or 0

Do not return 64bit values - return just plain int 0 or 1

11 years agocleanup: easier to read loop code
Zdenek Kabelac [Tue, 18 Jun 2013 09:59:22 +0000 (11:59 +0200)]
cleanup: easier to read loop code

buffer_write now accepts const pointer
Simplify loops and drop goto when not needed.

11 years agolvmetad: fix compare function
Zdenek Kabelac [Tue, 18 Jun 2013 19:58:13 +0000 (21:58 +0200)]
lvmetad: fix compare function

Check for enough space in preallocated buffer.
Fixes problem, when lvm code started to suddenly allocate
too big memory chunks.

TODO: lvmetad protocol should announce needed size ahead,
so if metadata have 1MB we are not reallocating memory...

11 years agolvmetad: use dm_ malloc wrappers
Zdenek Kabelac [Tue, 18 Jun 2013 19:57:14 +0000 (21:57 +0200)]
lvmetad: use dm_ malloc wrappers

Use matching dm_ functions for internally used buffers.

11 years agovgcfgrestore: fix crash on restore of wrong vgname
Zdenek Kabelac [Tue, 18 Jun 2013 19:50:29 +0000 (21:50 +0200)]
vgcfgrestore: fix crash on restore of wrong vgname

When vgname has not existed in metadata, it has crashed on double free
in format_instance destroy() -  since VG was created, used FID and was
released - which also released FID, so further use was accessing bad
memory.

Fix it for this code path before release_vg() so FID will exists
when _vg_read_file_name() returns NULL.

11 years agoRAID: Remove optimization using static vars in lv_raid_dev_health
Jonathan Brassow [Mon, 17 Jun 2013 18:03:15 +0000 (13:03 -0500)]
RAID: Remove optimization using static vars in lv_raid_dev_health

Revert commit 37ffe6a.  If static variables are to be used then we
will put them elsewhere and limit the optimization to reporting
code, rather that have it be used in the general case.

11 years agoRAID: s/int/uint32_t for dev_count in dm_status_raid struct
Jonathan Brassow [Mon, 17 Jun 2013 17:58:38 +0000 (12:58 -0500)]
RAID:  s/int/uint32_t for dev_count in dm_status_raid struct

Device count is never negative.  Change 'dev_count' to be
uint32_t instead of int.

11 years agoTEST: Fix 'dd' overrunning device size and causing test failure
Jonathan Brassow [Mon, 17 Jun 2013 17:38:09 +0000 (12:38 -0500)]
TEST: Fix 'dd' overrunning device size and causing test failure

Assumed size of 4M was too large and the test was failing because
'dd' was failing to perform its write.

Calculate the size we need to write with 'dd' instead, so we
don't overrun the device.

11 years agodev-type: add/fix references for dev_types in non-linux case
Peter Rajnoha [Mon, 17 Jun 2013 13:17:15 +0000 (15:17 +0200)]
dev-type: add/fix references for dev_types in non-linux case

11 years agosnapshot: fix max size limit check for COW device
Zdenek Kabelac [Sun, 16 Jun 2013 19:32:11 +0000 (21:32 +0200)]
snapshot: fix max size limit check for COW device

Use proper max size as a multiple of extent size.
And use 64bit arithmentic for validation of minsize.
(in release fix).

11 years agocleanup: use struct assign
Zdenek Kabelac [Sun, 16 Jun 2013 19:07:39 +0000 (21:07 +0200)]
cleanup: use struct assign

Simplier code with struct assign.
Drop unneeded zeroing of zallocated memory.

11 years agoclean: remove unneeded assign
Zdenek Kabelac [Sun, 16 Jun 2013 19:05:30 +0000 (21:05 +0200)]
clean: remove unneeded assign

Since init_unknown_segtype returns zalloced memory,
NULL assign is not needed.

11 years agotests: more test run in cluster mode
Zdenek Kabelac [Sat, 15 Jun 2013 09:21:03 +0000 (11:21 +0200)]
tests: more test run in cluster mode

aux updates:

prepare_vg now created clustered VG for cluster tests.

since dm-raid doesn't work in cluster, skip the cluster
test when someone checks for dm-raid target until fixed.

11 years agocleanup: access pool segs with check
Zdenek Kabelac [Fri, 14 Jun 2013 20:02:12 +0000 (22:02 +0200)]
cleanup: access pool segs with check

Add some minor checks after first_seg(lv).
Use direct check for thin pool segment.
Drop some unneeded {}

11 years agocleanup: use simplier structure initialization
Zdenek Kabelac [Fri, 14 Jun 2013 20:00:44 +0000 (22:00 +0200)]
cleanup: use simplier structure initialization

And also use static struct for _out_spec.

11 years agocleanup: use unrelated temporary variables
Zdenek Kabelac [Fri, 14 Jun 2013 19:49:12 +0000 (21:49 +0200)]
cleanup: use unrelated temporary variables

use of tmp_rq2 is unrelated to tmp_rq - so use separate
variable.

11 years agocleanup: move string in the use-place
Zdenek Kabelac [Fri, 14 Jun 2013 19:48:33 +0000 (21:48 +0200)]
cleanup: move string in the use-place

11 years agocleanup: drop unused headers
Zdenek Kabelac [Fri, 14 Jun 2013 07:52:02 +0000 (09:52 +0200)]
cleanup: drop unused headers

Drop heades which do not provide any used symbols.

11 years agocleanup: add extra internal error
Zdenek Kabelac [Fri, 14 Jun 2013 07:51:09 +0000 (09:51 +0200)]
cleanup: add extra internal error

Ensure the target line will work only with segment with pool.

11 years agoconfig: skip close of stdin
Zdenek Kabelac [Fri, 14 Jun 2013 21:18:29 +0000 (23:18 +0200)]
config: skip close of stdin

If the used stream has been stdout, do not close it.

11 years agomirror: add missing error message
Zdenek Kabelac [Sat, 15 Jun 2013 16:43:36 +0000 (18:43 +0200)]
mirror: add missing error message

When a user has not proceeded with conversion,
print the error message why the command has failed.

11 years agolvmetad: add some message for error path
Zdenek Kabelac [Fri, 14 Jun 2013 21:17:28 +0000 (23:17 +0200)]
lvmetad: add some message for error path

Do not leave replay uninitialized for internal error.

11 years agotext: miscellaneous comments & message tweaks
Alasdair G Kergon [Sat, 15 Jun 2013 00:28:54 +0000 (01:28 +0100)]
text: miscellaneous comments & message tweaks

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