| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The block of code that acquires the global lock for
process_each_pv() was in the wrong location given
the way report_type is munged, and does not equal
PVS until later in the function.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When ignoring 'listed' volume, print info message.
(So the final command error message is a bit less confusing,
i.e. when user tries to deactive virtual origin:
> lvchange -an vg/lvol2_vorigin
Ignoring virtual origin logical volume vg/lvol2_vorigin.
One or more specified logical volume(s) not found.
(Reapplied after revert.)
|
|
|
|
|
|
| |
Add a workaround for a bug somewhere that can cause
a pv with no mda to appear in both its real vg and
in the orphan vg when not using lvmetad.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "warnings" arg was used to enable logging of warnings
when reading a pv. This arg is turned into a set of flags
with the WARN_PV_READ flag matching the existing behavior.
A new flag WARN_INCONSISTENT is added that will cause
vg_read_internal() to log the "vg is not consistent"
warning, and the various callers do not need to log
this warning themselves.
A new vg_read flag READ_WARN_INCONSISTENT is used from
reporting to enable the WARN_INCONSISTENT flag in
vg_read_internal.
|
|
|
|
| |
In the non-repair case.
|
|
|
|
|
|
| |
Process pvs by iterating through vgs, then iterating through
devs if the command wants to process non-pv devices. The
process_single function can always use the vg and pv args.
|
|
|
|
|
|
|
| |
The ENABLE_ALL_DEVS flag is added to the command structure
for commands that should process all devs (pvs and non-pvs)
when they call process_each_pv and the command includes the
--all arg. This will be used in a later process_each_pv patch.
|
|
|
|
|
| |
The failed_lvnames arg is no longer used since the
cmd_vg replicator wrapper was removed.
|
|
|
|
| |
Include in the error message the lv name args that were not found.
|
|
|
|
|
|
| |
- Copy the same form as the new process_each_vg.
- Replace unused struct cmd_vg and cmd_vg_read() replicator
code with struct vg and vg_read() directly.
|
|
|
|
|
|
|
|
| |
- Split the collecting of arguments from processing them.
- The split allows the two different loops through vgs to
be replaced by a single loop.
- Replace unused struct cmd_vg and cmd_vg_read() replicator
code with struct vg and vg_read() directly.
|
|
|
|
|
|
|
| |
The ALL_VGS_IS_DEFAULT flag is added to the command structure
for commands that should process all vgs when they call
process_each_vg or process_each_lv with no args.
This will be used in later patches to process_each functions.
|
|
|
|
|
|
| |
This reverts commit 7f4b1e7411d7ff59abe2063db7273fd600e2bf72.
will reapply this on top of toollib patch set
|
|
|
|
|
|
|
|
|
| |
Do not let fly metadata with just 'minor' set
(since they would not be readable on older version)
Be permissive with invalid major/minor number and
just report them as problem, but allow to use
such metadata with default major:minor.
|
|
|
|
| |
Use consistently int32_t for major, minor.
|
|
|
|
|
|
|
| |
Last commit c710f02e0181cc2db5455f0c98033247a70ecc30
converting code to use lv_update_and_reload()
intoduced invalid test for error result.
Fix it and properly check for if (!...)
|
|
|
|
|
|
|
| |
Use nice instruction_HLT macro
Use log_debug_mem()
Don't actually log things after we prohibit 'mmap'.
Move initialization of strerror & udev before blocking mmap.
|
|
|
|
|
| |
It's shown on comand line help and it's accepted argument,
so provide matching man entry.
|
|
|
|
|
| |
Since we want to backup metadata, this is the point
we no longer want to hold memory locked.
|
|
|
|
|
|
|
|
|
| |
We do not need to restore LV content on error path - since
for reactivation we always use ondisk/commited metadata,
so passed data are never used.
Drop some unneded extra message, since the called function
repeated logs same info.
|
|
|
|
|
|
| |
Shift backup after final metadata commit.
Synchronize with wiping.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move common code for reading and processing
of --persistent arguments for lvcreate and lvchange
into lvmcmdline.
Reuse validate_major_minor() routine for validation.
Don't blindly activate LVs after change in cluster
and instead only local reactivation is supported.
(we have now many limited targets now).
Dropping 'sigint_caught()' handling, since
prompt() is resolving this case itself.
|
|
|
|
| |
Validate major, minor numbers after reading them from metadata.
|
| |
|
|
|
|
| |
Since for other enums we use 'Y' or 'N' use it with 'AE' as well.
|
|
|
|
| |
Synchronize things before checking for locally active volume.
|
|
|
|
| |
Avoid doing buffered operation within memory lock.
|
|
|
|
|
| |
strerror may mmap ram if it was not yet used.
dm_udev_get_sync_support may initilize udev if it was still not used.
|
|
|
|
|
|
|
| |
Add code to trap both mmap implementation on 32bit arch.
Use dlsym()
Use hlt instraction instead of int3 - generates usable stack trace
when problem is catched.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PIE documentation:
:
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html
http://lfs.osuosl.org/hlfs/view/unstable/glibc/chapter02/pie.html
suggest to suply -fPIE (or -fpie) with -pie
during executable compilation.
When -fPIC and -fPIE are used together - -fPIE wins
Drop usage of -DPIE - we are not using this flag anywhere
TODO: cleanup linking flags
|
|
|
|
|
|
| |
Don't install trap for mlockall case
Add another code path for -fPIE compilation,
in this case the address of mmap function is 'plt' address.
|
| |
|
| |
|
|
|
|
| |
Avoid unnecessary converions of pool.
|
| |
|
|
|
|
|
| |
Would be better to define what is supported not what isn't, but this'll
have to do for now.
|
|
|
|
|
| |
--cachepool can't take a thin pool and --thinpool can't take a
cache pool.
|
|
|
|
|
| |
Refuse use of -m and -s with cache LVs until full support
can be provided.
|
|
|
|
|
| |
metadata.h is meant to be internal to the library.
metadata-exported.h contains the things needed by tools.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we want to support conversion of VG to clustered type,
we currently need to relock active LV to get proper DLM lock.
So add extra loop after change of VG clustered attribute
to exlusively activate all active top level LVs.
When doing change -cy -> -cn we should validate LVs are not
active on other cluster nodes - we could be sure about this only
when with local exclusive activation - for other types
we require user to deactivate volumes first.
As a workaround for this limitation there is always
locking_type = 0 which amongs other skip the detection
of active LVs.
FIXME:
clvmd should handle looks for cluster locking type all the time.
|
|
|
|
|
|
| |
Add function to detect whether locking could be used to
query for lock type so we could recognize exclusive
activation.
|
|
|
|
|
|
| |
Failure to copy the 'feature_flags' lvconvert_param to the matching
lv_segment field meant that when a user specified the cachemode argument,
the request was not honored.
|
|
|
|
|
|
| |
Use 'lv_is_mirror' instead of 'lv_is_mirrored && !lv_is_raid' - both
are the same as asking if the non-RAID mirror implementation is being
used.
|
|
|
|
|
|
|
|
|
| |
While we could probably reacquire some type of lock when
going from non-clustered to clustered vg, we don't have any
single road back to drop the lock and keep LV active.
For now keep it safe and prohibit conversion when LV
is active in the VG.
|
|
|
|
|
|
|
|
|
|
| |
Code should not just pass va_list arg through the function
as args could be passed in many strange ways.
Use va_copy().
For details look in i.e.:
http://julipedia.meroh.net/2011/09/using-vacopy-to-safely-pass-ap.html
|
|
|
|
| |
Add dev_is_rotational() for future use by allocation code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to enforce consistent macro usage along these lines:
lv_is_mirror - mirror that uses the original dm-raid1 implementation
(segment type "mirror")
lv_is_mirror_type - also includes internal mirror image and log LVs
lv_is_raid - raid volume that uses the new dm-raid implementation
(segment type "raid")
lv_is_raid_type - also includes internal raid image / log / metadata LVs
lv_is_mirrored - LV is mirrored using either kernel implementation
(excludes non-mirror modes like raid5 etc.)
lv_is_pvmove - internal pvmove volume
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cmirrord has endian bugs, which cause failure to lvcreate a mirrored lv
on s390.
- data_size is uint32, should not use xlate64 to convert, which will
cause data_size 0 after xlate.
- request_type and data_size still used by local(v5_data_switch),
should convert later. If request_type xlate too early, it will
cause request_type judge error; if data_size xlate too early, it
will cause coredump in case DM_ULOG_CLEAR_REGION.
- when receiving package in clog_request_from_network. vp[0] will always
be little endian. We could use xlate64(vp[0]) == vp[0] to decide if
the local node is little endian or not.
Signed-off-by: Lidong Zhong<lzhong@suse.com> & Liuhua Wang <lwang@suse.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
|