| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
"pvcreate_each_params" was a temporary name used
to transition from the old "pvcreate_params".
Remove the old pvcreate_params struct and rename the
new pvcreate_each_params struct to pvcreate_params.
Rename various pvcreate_each_params terms to simply
pvcreate_params.
|
|
|
|
|
|
| |
New pv_create_args struct contains all the specific
parameters for creating a PV, independent of the
command.
|
| |
|
|
|
|
|
| |
Use the new pvcreate_each_device() function from
toollib.
|
|
|
|
|
| |
which has been replaced by an equivalent pvcreate_each params
function.
|
|
|
|
| |
And remove the pvcreate_single wrapper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the new pvcreate_each_device() function from
toollib, previously added for pvcreate, in place
of the old pvcreate_vol().
This also requires shifting the location where the
lock is acquired for the new VG name. The lock for
the new VG is supposed to be acquired before pvcreate.
This means splitting the vg_lock_newname() out of
vg_create(), and calling vg_lock_newname() directly
before pvcreate, and then calling the remainder of
vg_create() after pvcreate.
The new function vg_lock_and_create() now does
vg_lock_newname() + vg_create(), like the previous
version of vg_create().
The lock on the new VG name is released before the
pvcreate and reacquired after the pvcreate because
pvcreate needs to reset lvmcache, which doesn't work
when locks are held. An exception could likely be
made for the new VG name lock, which would allow
vgcreate to hold the new VG name lock across the
pvcreate step.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is common code for handling PV create/remove
that can be shared by pvcreate/vgcreate/vgextend/pvremove.
This does not change any commands to use the new code.
- Pull out the hidden equivalent of process_each_pv
into an actual top level process_each_pv.
- Pull the prompts to the top level, and do not
run any prompts while locks are held.
The orphan lock is reacquired after any prompts are
done, and the devices being created are checked for
any change made while the lock was not held.
Previously, pvcreate_vol() was the shared function for
creating a PV for pvcreate, vgcreate, vgextend.
Now, it will be toollib function pvcreate_each_device().
pvcreate_vol() was called effectively as a helper, from
within vgcreate and vgextend code paths.
pvcreate_each_device() will be called at the same level
as other process_each functions.
One of the main problems with pvcreate_vol() is that
it included a hidden equivalent of process_each_pv for
each device being created:
pvcreate_vol() -> _pvcreate_check() ->
find_pv_by_name() -> get_pvs() ->
get_pvs_internal() -> _get_pvs() -> get_vgids() ->
/* equivalent to process_each_pv */
dm_list_iterate_items(vgids)
vg = vg_read_internal()
dm_list_iterate_items(&vg->pvs)
pvcreate_each_device() reorganizes the code so that
each-VG-each-PV loop is done once, and uses the standard
process_each_pv function at the top level of the function.
|
|
|
|
|
|
|
|
| |
This uses the vg->pv_write_list in place of the
vg->pvs_to_write list, and eliminates the use of
pvcreate_params. The label remove and zeroing
steps are shifted out of vg_write() to the higher
level like pvcreate will do.
|
|
|
|
|
|
| |
The _check_old_pv_ext_for_vg() function only needs to
do pv_write(), so it can use the simpler pv_list structs
on the pv_write_list.
|
|
|
|
|
|
| |
This shifts the use of the 'pv_to_write' struct
and the 'pvcreate_params' struct to the one
caller of add_pv_to_vg, which is made static.
|
|
|
|
|
|
|
|
|
|
| |
The vg->pv_write_list contains pv_list structs for which
vg_write() should call pv_write().
The new list will replace vg->pvs_to_write that contains
vg_to_create structs which are used to perform higher-level
pvcreate-related operations. The higher level pvcreate
operations will be moved out of vg_write() to higher levels.
|
|
|
|
| |
This flag allows sanlock requests to avoid all blocking.
|
| |
|
|
|
|
|
| |
A snapshot can be created without a real origin LV
in this case, so there's no lock to use.
|
|
|
|
|
| |
Keep the buffer size defined at a single place and then use
its sizeof.
|
| |
|
|
|
|
| |
thin_pool_seg being NULL would be an internal error.
|
|
|
|
| |
Run all arithmetic in the same 'dev_t' type.
|
|
|
|
| |
Check return state like everywhere else.
|
|
|
|
|
| |
Since in _report_init() we check few times for cmd != NULL
keep it consistent and Coverity happier.
|
|
|
|
|
|
| |
Here is too complex for Coverity to guess
those pointers cannot be NULL, but it's
very easy to add little checks here.
|
| |
|
|
|
|
|
|
| |
When get_shared_library_path() would got zero length buffer,
it could have underflow in size calc later.
So just put extra small check for this case.
|
|
|
|
|
|
| |
Since we already check in few other places 'info' is not NULL,
do the same for others - however when info would be NULL
it more or less looks like internal error.
|
| |
|
|
|
|
|
| |
The test for string 'end' needs to account for ending \0,
which also needs to fit <SIZE.
|
|
|
|
|
| |
The default error value should be set indicating
an error.
|
|
|
|
|
|
|
| |
Move the lvmlockd-related setup functions into aux.
For check_lvmlockd_test, start a new instance of
lvmlockd --test for each shell test.
|
| |
|
|
|
|
| |
to all tests that don't already used vgcreate $SHARED
|
| |
|
|
|
|
|
| |
Don't be too much inventive and shutdown gcc6 warning:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
|
|
|
|
|
|
|
|
| |
Use #define instead, since we do not require actually buffer needs
to exists to eliminated new gcc6 warning:
clvm.h:53:19: warning: ‘CLVMD_SOCKNAME’ defined but not used
[-Wunused-const-variable]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reshuffle messages during pvremove.
Always print WARNING: when PV is in use so using options
--force --force doesn't make this important user
notification go away.
Simplify variable 'used' usage (so older gcc doesn't warn
about the use of unitilizied variable).
Add some '.' into messages.
|
| |
|
|
|
|
|
|
| |
When comparing unsigned with int, the comparision is made
as 'unsigned' type, so make it rather explicit which type
is being compared.
|
|
|
|
|
|
|
| |
Currently it's been checked for 'zero' header for thin-pool,
but lets use it always for cache as well - since it's relatively 'cheap'
detection of read 'error' problems as thin/cache tools
currently do not work fast enough in this case.
|
|
|
|
|
| |
Fix the compare with 'unsigned' sizeof() and error read -1 result.
So the read error is correctly recognized.
|
|
|
|
|
|
| |
It's disabled until we can fix it up.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
|
|
|
|
|
| |
Change while to for loop to prevent the daemon from getting stuck
when lvm is messed up.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
|
|
|
|
|
|
| |
export LVMDBUSD_SESSION=True to run on the session bus instead
of the system bus so that we can run the unit test without
installing the dbus conf file.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
|
|
|
|
|
| |
Reduced the size of LVs created and use actual PE numbers instead of hard
coding them to allow us to work with the loop back devices.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that the output of lvconvert --merge can vary some. The code
was blowing up as it was trying to parse a line of stdout to retrieve the
% complete, but the line did not have the needed format and an execption
was thrown. The uncaught exception caused the background thread to exit
without updating the job object, which caused the client to hang forever
waiting. Added a default exception handler to prevent unhandled execptions
causing hangs and removed the parameter skip_first_line as it's no longer
needed. The code checks to see if the line can be parsed before doing so.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
|
|
| |
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
| |
|
|
|
|
| |
python 3.5 renamed .pyo files to .opt-1.pyc.
|
| |
|