master - lvcreate: use cmd defs to deny unspported lockd cases
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8e8755319c8a8848b8b...
Commit: 8e8755319c8a8848b8bcd830a6341eccf750f798
Parent: d93a2bb74177397430ec21d6062987cb7da91217
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Sep 14 12:20:29 2017 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Sep 14 12:28:48 2017 -0500
lvcreate: use cmd defs to deny unspported lockd cases
In a shared VG, lvconvert must be used to create thin pools
and cache pools, not the lvcreate variants of those commands.
Deny these cases early in lvcreate using the new command defs.
Denying these cases deeper in the code was missing some
cleanup of the partially completed command.
---
lib/locking/lvmlockd.c | 7 +++++++
tools/lvcreate.c | 12 +++++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index f4047d9..058d4b5 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -2385,6 +2385,10 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
return 1;
} else if (seg_is_cache(lp) || seg_is_cache_pool(lp)) {
+ /*
+ * This should not happen because the command defs are
+ * checked and excluded for shared VGs early in lvcreate.
+ */
log_error("Use lvconvert for cache with lock type %s", vg->lock_type);
return 0;
@@ -2440,6 +2444,9 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
/*
* Creating a thin pool and a thin lv in it. We could
* probably make this work.
+ *
+ * This should not happen because the command defs are
+ * checked and excluded for shared VGs early in lvcreate.
*/
log_error("Create thin pool and thin LV separately with lock type %s",
vg->lock_type);
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index d2199f5..8aa16f2 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -1634,8 +1634,18 @@ static int _lvcreate_single(struct cmd_context *cmd, const char *vg_name,
lp->snapshot ? " as snapshot of " : "",
lp->snapshot ? lp->origin_name : "", lp->segtype->name);
- if (is_lockd_type(vg->lock_type))
+ if (is_lockd_type(vg->lock_type)) {
+ if (cmd->command->command_enum == lvcreate_thin_vol_and_thinpool_CMD ||
+ cmd->command->command_enum == lvcreate_cachepool_CMD ||
+ cmd->command->command_enum == lvcreate_cache_vol_with_new_origin_CMD ||
+ cmd->command->command_enum == lvcreate_thin_vol_with_thinpool_or_sparse_snapshot_CMD ||
+ cmd->command->command_enum == lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool_CMD) {
+ log_error("Use lvconvert to create thin pools and cache pools in a shared VG.");
+ goto out;
+ }
+
lp->needs_lockd_init = 1;
+ }
if (!lv_create_single(vg, lp))
goto_out;
6 years, 7 months
master - revert tidy: prefer not using else after return
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d93a2bb74177397430e...
Commit: d93a2bb74177397430ec21d6062987cb7da91217
Parent: 29834b6e918e4b3774fd82aec0cfd2cbb5d162bb
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Sep 14 12:15:59 2017 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Sep 14 12:28:48 2017 -0500
revert tidy: prefer not using else after return
Revert the lvmlockd.c changes from:
commit 0bf836aa14f98eb83969a6e81695a024f56a5eb5
"tidy: prefer not using else after return"
The commit introduced at least one regression, which broke
lvcreate of a thin pool in a shared VG.
---
lib/locking/lvmlockd.c | 43 ++++++++++++++++++++-----------------------
1 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index a0e3f03..f4047d9 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -1646,15 +1646,15 @@ int lockd_gl(struct cmd_context *cmd, const char *def_mode, uint32_t flags)
*/
log_error("Global lock failed: held by other host.");
return 0;
+ } else {
+ /*
+ * We don't intend to reach this. We should check
+ * any known/possible error specifically and print
+ * a more helpful message. This is for completeness.
+ */
+ log_error("Global lock failed: error %d.", result);
+ return 0;
}
-
- /*
- * We don't intend to reach this. We should check
- * any known/possible error specifically and print
- * a more helpful message. This is for completeness.
- */
- log_error("Global lock failed: error %d.", result);
- return 0;
}
allow:
@@ -2380,16 +2380,15 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
if (!_lvmlockd_connected)
return 0;
- if (!lp->needs_lockd_init)
+ if (!lp->needs_lockd_init) {
/* needs_lock_init is set for LVs that need a lockd lock. */
return 1;
- if (seg_is_cache(lp) || seg_is_cache_pool(lp)) {
+ } else if (seg_is_cache(lp) || seg_is_cache_pool(lp)) {
log_error("Use lvconvert for cache with lock type %s", vg->lock_type);
return 0;
- }
- if (!seg_is_thin_volume(lp) && lp->snapshot) {
+ } else if (!seg_is_thin_volume(lp) && lp->snapshot) {
struct logical_volume *origin_lv;
/*
@@ -2414,9 +2413,8 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
}
lv->lock_args = NULL;
return 1;
- }
- if (seg_is_thin(lp)) {
+ } else if (seg_is_thin(lp)) {
if ((seg_is_thin_volume(lp) && !lp->create_pool) ||
(!seg_is_thin_volume(lp) && lp->snapshot)) {
struct lv_list *lvl;
@@ -2437,9 +2435,8 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
}
lv->lock_args = NULL;
return 1;
- }
- if (seg_is_thin_volume(lp) && lp->create_pool) {
+ } else if (seg_is_thin_volume(lp) && lp->create_pool) {
/*
* Creating a thin pool and a thin lv in it. We could
* probably make this work.
@@ -2447,21 +2444,21 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
log_error("Create thin pool and thin LV separately with lock type %s",
vg->lock_type);
return 0;
- }
- if (!seg_is_thin_volume(lp) && lp->create_pool) {
+ } else if (!seg_is_thin_volume(lp) && lp->create_pool) {
/* Creating a thin pool only. */
/* lv_name_lock = lp->pool_name; */
+ } else {
+ log_error("Unknown thin options for lock init.");
+ return 0;
}
- log_error("Unknown thin options for lock init.");
- return 0;
+ } else {
+ /* Creating a normal lv. */
+ /* lv_name_lock = lv_name; */
}
- /* Creating a normal lv. */
- /* lv_name_lock = lv_name; */
-
/*
* The LV gets its own lock, so set lock_args to non-NULL.
*
6 years, 7 months
master - kernel: Refresh dm-ioctl.h
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=29834b6e918e4b3774f...
Commit: 29834b6e918e4b3774fd82aec0cfd2cbb5d162bb
Parent: 71dbe0fe26937137cb0b2ef00cbbef4a729d4e94
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Sep 14 17:50:56 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Sep 14 17:50:56 2017 +0100
kernel: Refresh dm-ioctl.h
Adds DM_DEV_ARM_POLL
---
libdm/misc/dm-ioctl.h | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libdm/misc/dm-ioctl.h b/libdm/misc/dm-ioctl.h
index cdb0c4c..79f574c 100644
--- a/libdm/misc/dm-ioctl.h
+++ b/libdm/misc/dm-ioctl.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
- * Copyright (C) 2004 - 2015 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004 - 2017 Red Hat, Inc. All rights reserved.
*
* This file is released under the LGPL.
*/
@@ -242,7 +242,8 @@ enum {
/* Added later */
DM_LIST_VERSIONS_CMD,
DM_TARGET_MSG_CMD,
- DM_DEV_SET_GEOMETRY_CMD
+ DM_DEV_SET_GEOMETRY_CMD,
+ DM_DEV_ARM_POLL_CMD,
};
#define DM_IOCTL 0xfd
@@ -257,6 +258,7 @@ enum {
#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
+#define DM_DEV_ARM_POLL _IOWR(DM_IOCTL, DM_DEV_ARM_POLL_CMD, struct dm_ioctl)
#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
@@ -269,9 +271,9 @@ enum {
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
#define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 31
+#define DM_VERSION_MINOR 36
#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2015-03-12)"
+#define DM_VERSION_EXTRA "-ioctl (2017-06-09)"
/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
6 years, 7 months
v2_02_174 annotated tag has been created
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b284bbc415cbdcb631e...
Commit: b284bbc415cbdcb631e0e1c0290b53460d8a2459
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2017-09-13 19:49 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2017-09-13 19:49 +0000
annotated tag: v2_02_174 has been created
at b284bbc415cbdcb631e0e1c0290b53460d8a2459 (tag)
tagging 71dbe0fe26937137cb0b2ef00cbbef4a729d4e94 (commit)
replaces v2.02.174
Release 2.02.174
Assorted fixes and small improvements, including an extension to
dmsetup for activating more than one device with a single command.
As of this release, we're also pushing the code to github:
https://github.com/lvmteam/lvm2
and will handle any issues reported at
https://github.com/lvmteam/lvm2/issues
81 files changed, 1782 insertions(+), 857 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlm5i+gACgkQIoGRwVZ+LBeHHACg2LHa45lSYhQUV0HQ6XVGKlrU
zvoAoJpgGiqP7LWnAob7TlC3Ok7mdGJ8
=hX4F
-----END PGP SIGNATURE-----
Alasdair G Kergon (1):
post-release
6 years, 7 months
v2_02_173 annotated tag has been created
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7e9d7a481be5042b433...
Commit: 7e9d7a481be5042b433bc8986b7e39b6c1dba763
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2017-07-20 15:59 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2017-07-20 15:59 +0000
annotated tag: v2_02_173 has been created
at 7e9d7a481be5042b433bc8986b7e39b6c1dba763 (tag)
tagging 88f15659374042f7657d73393f73e267d752b4e1 (commit)
replaces v2_02_172
Release 2.02.173
A variety of fixes including some important ones for clvmd to avoid some
reported crashes after machines have gone down. Work is continuing to
improve the recently-added raid enhancements and in particular reshaping
so please continue to use these with caution.
371 files changed, 3942 insertions(+), 2646 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAllw1xQACgkQIoGRwVZ+LBd1XwCgrXO1CO1t7RNxKyA0IkdTSzi9
R70An0Whqb/fJaxeAyrgzcJ5cDRZ0uYo
=YeKN
-----END PGP SIGNATURE-----
Alasdair G Kergon (10):
post-release
clvmd: add debuglog mutex
clvmd: add client id to debug log messages
clvmd: Fix client list corruption
lvmetad: Suppress accept error on clean shutdown
commands: fix lvm shell segfaults
docs: Refresh kernel target docs
format_text: Extend FIXME to reduce label scans
raid: avoid lv_size compiler warning
pre-release
David Teigland (8):
lvmlockd: use lock on thin pool when command names tdata
lvmlockd: fix revert in lvcreate
lvmlockd: use DM_UUID_LEN for buffer size
commands: centralize shell vs script vs command decision
commands: fix handing of ENO_SUCH_CMD in script
lvm: run help from -h|--help
lvm: report error if options are set before command
pvs: use dummy structs in duplicate processing
Eric Ren (3):
comment: update
cleanup: fix some typos
man: specify slow device when creating origin LV
Heinz Mauelshagen (7):
test: return 0 if ignoring 'a' device health chars is requested
raid: fix allocation/activation of reshape space
lvconvert: allow reshaping in the cluster and on open devices
report: fix data_offset/new_data_offset reporting
raid: use return_0 for better backtracking
raid: add data_offset incompatibility segment type flag
raid: add validation checks for segment data_offset member
Huan Zhang (1):
lvmlockd: miss adopt orphaned resources
Marian Csontos (1):
tests: utils.sh six stacktrace
Peter Rajnoha (1):
udev: also create /dev/disk/by-part{label,uuid} and gpt-auto-root symlinks
Zdenek Kabelac (187):
fsadm: fix shell globbing
fsadm: remove surrounding $()
fsadm: split local var dev
fsadm: no mixing string and array
fsadm: add -r to read
fsadm: make if statement more clear
blkdeactivate: replace obsoleted syntax
blkdeactivate: double quote
blkdeactivate: drop unused var
blkdeactivate: split local declaration and assign
blkdeactivate: more readable if-then-else-fi
blkdeactivate: quote literal
lvmconf: fix test for setting external locking type
lvmconf: double quote
lvmconf: prefer well defined and
lvmdump: double quote
lvmdump: replace printf
lvmdump: drop extra $
lvmdump: legacy syntax
lvmdump: drop useless cat
lvmdump: replace individual redirects
lvmconf_lockingtype2: preferable syntax
lvmconf_lockingtype2: double quote
lvm2_cluster_activation_red_hat.sh: double quote
vgimportclone.sh: no mixing string and array
vgimportclone.sh: double quote
vgimportclone.sh: cannot trap signal 9
vgimportclone.sh: avoid legacy syntax
vgimportclone.sh: add -r to read
vgimportclone.sh: drop extra $
vgimportclone.sh: use well defined tests
vgimportclone.sh: do not quote regex
clvmd_fix_conf.sh: legacy code
clvmd_fix_conf.sh: double quote
tests: aux.sh double quote
tests: aux.sh use pgrep
tests: aux.sh drop unnecessary $
tests: aux.sh no mixing string
tests: aux.sh using grep -c
tests: aux.sh separately assign
tests: aux.sh array assing
tests: aux.sh add -r to read
tests: aux.sh fix pid handling
tests: check.sh double quote
tests: check.sh assign separately
tests: check.sh no mixing string
tests: check.sh using grep -F
tests: check.sh drop unnecessary $
tests: check.sh better if
tests: check.sh eliminate useless cat
tests: inittest.sh double quote and mixing string
tests: lvm-wrapper.sh double quote
tests: lvm-wrapper.sh legacy syntax
tests: utils.sh double quote
tests: utils.sh no mixed string array
tests: utils.sh arithmetic
tests: utils.sh avoid iterating over ls output
tests: utils.sh separately assign
tests: get.sh double quote
tests: get.sh declare and assign separately
tests: api updates
tests: check.sh uses array for list
tests: check LV in proper VG
tests: aux do not specify bitmap for raid0
tests: aux prepares lvmdbusd
tests: correcting globbing usage
tests: aux.sh use subshell for simple redirection
raid: ensure enum is defined
man_generator: release buffer after use
coverity: just make impossible division by zero
tests: aux.sh fix pattern
tests: export many shell vars with 1 command
tests: aux.sh check cd result
tests: aux.sh drop useless echo
tests: aux.sh use grep -E
tests: aux.sh replace sed call
tests: aux.sh double quote
tests: aux.sh check for already present config
tests: get.sh use simplier tr
tests: utils.sh assign directly
tests: correcting usage of '==' in bash
tests: double quote
tests: use bash
tests: drop wc -l when grep -c works
tests: use bash array
tests: replace egrep
tests: use read -r
tests: scripts double quote
tests: cleanup msg
tests: aux.sh move corosyn
tests: aux.sh common pattern for starting daemons
tests: aus.sh avoid duplicating arg list
tests: aux.sh tweaks
tests: math drop uncessary $/${}
tests: avoid masking return values
tests: fix possible misspelling
tests: drop unneeded cat
tests: drop unneeded echo
tests: drop unneeded check
tests: drop unneeded ;
tests: drop useless literal
tests: drop extra sourcing of utils
tests: fix quoting
tests: replace legacy code
tests: fix tests variable
tests: add space to split words
tests: replace cat usage
tests: check result directly
tests: improve loop
tests: secure rm call
tests: assign as string
tests: correcting usage of $@
tests: check mirror_images_on fixed
tests: fix working with devs in array
tests: fix caller of mirror_images_on
tests: mixes string and array
tests: cleaner written eval
tests: use well defined test
tests: simplify and doublequote
tests: fix array usage
tests: assign path
tests: using prepare_vg
tests: avoid using readarray
cleanup: whitespace
tests: improve test logic
tests: avoid unbound shell var usage
tests: correct typo
tests: double quote
tests: check.sh simplify in_sync
tests: hardening - no unbound vars
tests: improve logic for a race to catch abortion
tests: aux.sh better loop logic
tests: more vars bounded
tests: more exact test
tests: drop type
tests: bounds still more vars
tests: utils.sh drop gdb_commands.txt
tests: fix detection of running dmeventd after test
tests: use properly quoted device list
tests: properly check variables were defined
tests: fix for new hardened bash
tests: add some delay after dmsetup
tests: delay read of cache pool data
tests: bound variables
tests: wait for udev to minize race windows
tests: aux.sh better teardown loop
tests: skip test for non dirty cache
tests: aux.sh integrate both teardown loops
tests: aux.sh fix double quote
tests: add udev_wait before tearing scsi_debug
tests: utils.sh looks for more dumps
tests: use get_devs
lvmetad: fix memory leaks
devcache: correct logging severity for connection
clvmd: fix valgrind warning
clvmd: fix valgrind memory report
lvmcmdline: validate size as double
numbers: strtod or strtoul need reset of errno
cleanup: drop const from allocated value
cleanup: shorten dump output code
cleanup: drop extra compare
lvmcmdline: enhance acceptance of size numbers
dev-cache: avoid hashing same data again
lvmetad: cleanup
tests: extend lvcreate size validation
tests: utils.sh look for more coredump places
tests: aux.sh also uses increseed hardening protection
tests: aux.sh correcting bounder values
test: repeat rediscovery few times
tests: aux.sh some backward compatible updates
tests: better support for unbound vars for older shell
lvmcmdline: restore digit check
lvmcmdline: enhance locales check
tests: aux.sh limit device
tests: avoid endless loops
tests: aus.sh better defaults
tests: aux.sh fix wait_pvmove_lv_ready
dmsetup: simplify check of parsed cookie value
cleanup: constify used parameter
cleanup: add braces in macro
tidy: prefer not using else after return
tidy: else after continue
tidy: drop unneeded return
tidy: name all parameters
tidy: drop unneeded cast
tests: aus.sh fix md teardown
raid: move syncing with udev into function
6 years, 7 months
v2.02.174 annotated tag has been created
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=761691e233fabddfbf6...
Commit: 761691e233fabddfbf678b3a988fce99d39591f4
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2017-09-13 19:38 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2017-09-13 19:38 +0000
annotated tag: v2.02.174 has been created
at 761691e233fabddfbf678b3a988fce99d39591f4 (tag)
tagging 918f0a92daef84867e0df4b422c3de2a36997f17 (commit)
replaces v2_02_172
Release 2.02.174
Assorted fixes and small improvements, including an extension to
dmsetup for activating more than one device with a single command.
As of this release, we're also pushing the code to github:
https://github.com/lvmteam/lvm2
and will handle any issues reported at
https://github.com/lvmteam/lvm2/issues
81 files changed, 1782 insertions(+), 857 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlm5iu8ACgkQIoGRwVZ+LBdCwgCfWI67MvWO3jaZ0/xvgwl5qjU1
KBwAoM8aCqMfl6N6X8jDEhR8FGDoKJ62
=oAdS
-----END PGP SIGNATURE-----
Alasdair G Kergon (24):
post-release
clvmd: add debuglog mutex
clvmd: add client id to debug log messages
clvmd: Fix client list corruption
lvmetad: Suppress accept error on clean shutdown
commands: fix lvm shell segfaults
docs: Refresh kernel target docs
format_text: Extend FIXME to reduce label scans
raid: avoid lv_size compiler warning
pre-release
post-release
dmsetup: Add concise table output format.
make generate
dmsetup: Add minor number to concise table output format.
tools: Introduce exit code EINIT_FAILED.
toolcontext: Improve invalid units error message.
ioctl: Allow minor without major.
dmsetup: Add --concise to dmsetup create.
lvmconfig: Add options to produce file preamble
pvcreate: Disallow --bootloaderareasize with --restorefile.
pvcreate: Wipe cached bootloaderarea when wiping label.
pvcreate: Use maximum metadata area size with --restorefile
README: Include new github links
pre-release
David Teigland (24):
lvmlockd: use lock on thin pool when command names tdata
lvmlockd: fix revert in lvcreate
lvmlockd: use DM_UUID_LEN for buffer size
commands: centralize shell vs script vs command decision
commands: fix handing of ENO_SUCH_CMD in script
lvm: run help from -h|--help
lvm: report error if options are set before command
pvs: use dummy structs in duplicate processing
vgchange: separate change locktype and allow recovery
vgchange: split out code for lockstart and lockstop
vgchange: split out code for systemid
man: remove hyphen escapes from source
commands: expand comment on configuring option vals
lvmlockd: fix lm running check during adoption
lvmlockd: global name doesn't apply to sanlock
commands: recognize -? for help
commands: recognize lvm command -?
lvmlockd: zero extended lvmlock LV
lvmlockd: add comment about temp ls name
lvmlockd: fix mutex unlock
man lvmthin: change fsck references
lvmlockd: print error about starting lock manager
lvmlockd: fix check for no running lock manager
lvmlockd: always disallow mirror splitting
Eric Ren (3):
comment: update
cleanup: fix some typos
man: specify slow device when creating origin LV
Heinz Mauelshagen (8):
test: return 0 if ignoring 'a' device health chars is requested
raid: fix allocation/activation of reshape space
lvconvert: allow reshaping in the cluster and on open devices
report: fix data_offset/new_data_offset reporting
raid: use return_0 for better backtracking
raid: add data_offset incompatibility segment type flag
raid: add validation checks for segment data_offset member
raid: more validation checks for segment data_offset member
Huan Zhang (1):
lvmlockd: miss adopt orphaned resources
Marian Csontos (1):
tests: utils.sh six stacktrace
Peter Rajnoha (3):
udev: also create /dev/disk/by-part{label,uuid} and gpt-auto-root symlinks
pvcreate: fix check for 2nd mda at end of disk fits if using pvcreate --restorefile
test: pvcreate-bootloaderarea: pvcreate --restorefile --bootloaderarea not supported anymore
Zdenek Kabelac (218):
fsadm: fix shell globbing
fsadm: remove surrounding $()
fsadm: split local var dev
fsadm: no mixing string and array
fsadm: add -r to read
fsadm: make if statement more clear
blkdeactivate: replace obsoleted syntax
blkdeactivate: double quote
blkdeactivate: drop unused var
blkdeactivate: split local declaration and assign
blkdeactivate: more readable if-then-else-fi
blkdeactivate: quote literal
lvmconf: fix test for setting external locking type
lvmconf: double quote
lvmconf: prefer well defined and
lvmdump: double quote
lvmdump: replace printf
lvmdump: drop extra $
lvmdump: legacy syntax
lvmdump: drop useless cat
lvmdump: replace individual redirects
lvmconf_lockingtype2: preferable syntax
lvmconf_lockingtype2: double quote
lvm2_cluster_activation_red_hat.sh: double quote
vgimportclone.sh: no mixing string and array
vgimportclone.sh: double quote
vgimportclone.sh: cannot trap signal 9
vgimportclone.sh: avoid legacy syntax
vgimportclone.sh: add -r to read
vgimportclone.sh: drop extra $
vgimportclone.sh: use well defined tests
vgimportclone.sh: do not quote regex
clvmd_fix_conf.sh: legacy code
clvmd_fix_conf.sh: double quote
tests: aux.sh double quote
tests: aux.sh use pgrep
tests: aux.sh drop unnecessary $
tests: aux.sh no mixing string
tests: aux.sh using grep -c
tests: aux.sh separately assign
tests: aux.sh array assing
tests: aux.sh add -r to read
tests: aux.sh fix pid handling
tests: check.sh double quote
tests: check.sh assign separately
tests: check.sh no mixing string
tests: check.sh using grep -F
tests: check.sh drop unnecessary $
tests: check.sh better if
tests: check.sh eliminate useless cat
tests: inittest.sh double quote and mixing string
tests: lvm-wrapper.sh double quote
tests: lvm-wrapper.sh legacy syntax
tests: utils.sh double quote
tests: utils.sh no mixed string array
tests: utils.sh arithmetic
tests: utils.sh avoid iterating over ls output
tests: utils.sh separately assign
tests: get.sh double quote
tests: get.sh declare and assign separately
tests: api updates
tests: check.sh uses array for list
tests: check LV in proper VG
tests: aux do not specify bitmap for raid0
tests: aux prepares lvmdbusd
tests: correcting globbing usage
tests: aux.sh use subshell for simple redirection
raid: ensure enum is defined
man_generator: release buffer after use
coverity: just make impossible division by zero
tests: aux.sh fix pattern
tests: export many shell vars with 1 command
tests: aux.sh check cd result
tests: aux.sh drop useless echo
tests: aux.sh use grep -E
tests: aux.sh replace sed call
tests: aux.sh double quote
tests: aux.sh check for already present config
tests: get.sh use simplier tr
tests: utils.sh assign directly
tests: correcting usage of '==' in bash
tests: double quote
tests: use bash
tests: drop wc -l when grep -c works
tests: use bash array
tests: replace egrep
tests: use read -r
tests: scripts double quote
tests: cleanup msg
tests: aux.sh move corosyn
tests: aux.sh common pattern for starting daemons
tests: aus.sh avoid duplicating arg list
tests: aux.sh tweaks
tests: math drop uncessary $/${}
tests: avoid masking return values
tests: fix possible misspelling
tests: drop unneeded cat
tests: drop unneeded echo
tests: drop unneeded check
tests: drop unneeded ;
tests: drop useless literal
tests: drop extra sourcing of utils
tests: fix quoting
tests: replace legacy code
tests: fix tests variable
tests: add space to split words
tests: replace cat usage
tests: check result directly
tests: improve loop
tests: secure rm call
tests: assign as string
tests: correcting usage of $@
tests: check mirror_images_on fixed
tests: fix working with devs in array
tests: fix caller of mirror_images_on
tests: mixes string and array
tests: cleaner written eval
tests: use well defined test
tests: simplify and doublequote
tests: fix array usage
tests: assign path
tests: using prepare_vg
tests: avoid using readarray
cleanup: whitespace
tests: improve test logic
tests: avoid unbound shell var usage
tests: correct typo
tests: double quote
tests: check.sh simplify in_sync
tests: hardening - no unbound vars
tests: improve logic for a race to catch abortion
tests: aux.sh better loop logic
tests: more vars bounded
tests: more exact test
tests: drop type
tests: bounds still more vars
tests: utils.sh drop gdb_commands.txt
tests: fix detection of running dmeventd after test
tests: use properly quoted device list
tests: properly check variables were defined
tests: fix for new hardened bash
tests: add some delay after dmsetup
tests: delay read of cache pool data
tests: bound variables
tests: wait for udev to minize race windows
tests: aux.sh better teardown loop
tests: skip test for non dirty cache
tests: aux.sh integrate both teardown loops
tests: aux.sh fix double quote
tests: add udev_wait before tearing scsi_debug
tests: utils.sh looks for more dumps
tests: use get_devs
lvmetad: fix memory leaks
devcache: correct logging severity for connection
clvmd: fix valgrind warning
clvmd: fix valgrind memory report
lvmcmdline: validate size as double
numbers: strtod or strtoul need reset of errno
cleanup: drop const from allocated value
cleanup: shorten dump output code
cleanup: drop extra compare
lvmcmdline: enhance acceptance of size numbers
dev-cache: avoid hashing same data again
lvmetad: cleanup
tests: extend lvcreate size validation
tests: utils.sh look for more coredump places
tests: aux.sh also uses increseed hardening protection
tests: aux.sh correcting bounder values
test: repeat rediscovery few times
tests: aux.sh some backward compatible updates
tests: better support for unbound vars for older shell
lvmcmdline: restore digit check
lvmcmdline: enhance locales check
tests: aux.sh limit device
tests: avoid endless loops
tests: aus.sh better defaults
tests: aux.sh fix wait_pvmove_lv_ready
dmsetup: simplify check of parsed cookie value
cleanup: constify used parameter
cleanup: add braces in macro
tidy: prefer not using else after return
tidy: else after continue
tidy: drop unneeded return
tidy: name all parameters
tidy: drop unneeded cast
tests: aus.sh fix md teardown
raid: move syncing with udev into function
raid: reshape synchronization point
tidy: declaration names match implementation
thin: warn about too big chunks size
man: fix generated paths
libdm: log_warn
makefiles: RT_LIB
makefiles: use gcc warns with gcc only
makefiles: fixing linking
makefiles: cleanups
tests: update makefile
configure: improve test for realtime clock
configure: tune BUILD_DMEVENTD
makefiles: fix tested vars
makefiles: script executable missed dynamic
makefiles: add DEFS_$@ for cxx
tests: update makefiles
tests: update checked message
libdm: fix errpath for control node creation
lvmlockd: shorter code
lvmcache: check for lvmcache_foreach_mda return code
debug: add stack trace point
locking: avoid descriptor leak for nonblocking mode
daemonize: more unified code
lvmlockd: avoid double unlock of client_mutex
lvmlockctl: fix check for failing close
lvmlockd: log pthread_join errno code
reporting: validate time parsing with strtol
dmsetup: add missing -- for option
dmsetup: validate strtol reading
cleanup: easier to read code
deamonize: restore detection of errors
Zhang Huan (1):
lvmlockd: reduce io impact for finding sanlock lv free lock offset
6 years, 7 months
master - post-release
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=71dbe0fe26937137cb0...
Commit: 71dbe0fe26937137cb0b2ef00cbbef4a729d4e94
Parent: 918f0a92daef84867e0df4b422c3de2a36997f17
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Sep 13 20:46:25 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Sep 13 20:46:25 2017 +0100
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index e9ea5c9..eda932e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.174(2)-git (2017-09-13)
+2.02.175(2)-git (2017-09-13)
diff --git a/VERSION_DM b/VERSION_DM
index 0dd3535..8a32c45 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.143-git (2017-09-13)
+1.02.144-git (2017-09-13)
diff --git a/WHATS_NEW b/WHATS_NEW
index 090f377..8e8ed2c 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.175 -
+======================================
+
Version 2.02.174 - 13th September 2017
======================================
Prevent raid1 split with trackchanges in a shared VG.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index fbf144c..a100689 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.144 -
+======================================
+
Version 1.02.143 - 13th September 2017
======================================
Restore umask when creation of node fails.
6 years, 7 months
master - pre-release
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=918f0a92daef84867e0...
Commit: 918f0a92daef84867e0df4b422c3de2a36997f17
Parent: 901c919d2208f9a13b1c46cc4755620c3b1b0a07
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Sep 13 20:38:29 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Sep 13 20:38:29 2017 +0100
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 4 ++--
WHATS_NEW_DM | 4 ++--
man/lvmconfig.8_pregen | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/VERSION b/VERSION
index cbce772..e9ea5c9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.174(2)-git (2017-07-20)
+2.02.174(2)-git (2017-09-13)
diff --git a/VERSION_DM b/VERSION_DM
index a338597..0dd3535 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.143-git (2017-07-20)
+1.02.143-git (2017-09-13)
diff --git a/WHATS_NEW b/WHATS_NEW
index e6cc18d..090f377 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,5 @@
-Version 2.02.174 -
-=================================
+Version 2.02.174 - 13th September 2017
+======================================
Prevent raid1 split with trackchanges in a shared VG.
Avoid double unlocking of client & lockspace mutexes in lvmlockd.
Fix leaking of file descriptor for non-blocking filebased locking.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 766eb20..fbf144c 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.143 -
-=================================
+Version 1.02.143 - 13th September 2017
+======================================
Restore umask when creation of node fails.
Add --concise to dmsetup create for many devices with tables in one command.
Accept minor number without major in library when it knows dm major number.
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index c60f899..0b7fea6 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -399,13 +399,13 @@ settings, also display comments about deprecation.
.ad l
\fB--withgeneralpreamble\fP
.br
-Display general file preamble at start of output.
+Include general config file preamble.
.ad b
.HP
.ad l
\fB--withlocalpreamble\fP
.br
-Display local file preamble at start of output.
+Include local config file preamble.
.ad b
.HP
.ad l
6 years, 7 months
master - deamonize: restore detection of errors
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=03efec27123efb43c33...
Commit: 03efec27123efb43c3350ceaf5675fd68d8b3f50
Parent: 3071837e21fae8907c1d584f9181e0589b9ce7e2
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 6 11:47:53 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 6 11:47:53 2017 +0200
deamonize: restore detection of errors
Keep forked environment for daemon more strick and check even
for nearly impossible to happen errors.
---
daemons/clvmd/clvmd.c | 16 +++++++++++-----
libdaemon/server/daemon-server.c | 19 +++++++++++++------
2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index 46f5f44..9dbda89 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -1111,12 +1111,18 @@ static void be_daemon(int timeout)
}
/* Detach ourself from the calling environment */
- (void) dup2(devnull, STDIN_FILENO);
- (void) dup2(devnull, STDOUT_FILENO);
- (void) dup2(devnull, STDERR_FILENO);
+ if ((dup2(devnull, STDIN_FILENO) == -1) ||
+ (dup2(devnull, STDOUT_FILENO) == -1) ||
+ (dup2(devnull, STDERR_FILENO) == -1)) {
+ perror("Error setting terminal FDs to /dev/null");
+ log_error("Error setting terminal FDs to /dev/null: %m");
+ exit(5);
+ }
- if (devnull > STDERR_FILENO)
- (void) close(devnull);
+ if ((devnull > STDERR_FILENO) && close(devnull)) {
+ log_sys_error("close", "/dev/null");
+ exit(7);
+ }
if (chdir("/")) {
log_error("Error setting current directory to /: %m");
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 0950c2e..2ffdf40 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -377,15 +377,22 @@ static void _daemonise(daemon_state s)
exit(WEXITSTATUS(child_status));
}
- if (chdir("/"))
+ if (chdir("/")) {
+ perror("Cannot chdir to /");
exit(1);
+ }
- (void) dup2(fd, STDIN_FILENO);
- (void) dup2(fd, STDOUT_FILENO);
- (void) dup2(fd, STDERR_FILENO);
+ if ((dup2(fd, STDIN_FILENO) == -1) ||
+ (dup2(fd, STDOUT_FILENO) == -1) ||
+ (dup2(fd, STDERR_FILENO) == -1)) {
+ perror("Error setting terminal FDs to /dev/null");
+ exit(2);
+ }
- if (fd > STDERR_FILENO)
- (void) close(fd);
+ if ((fd > STDERR_FILENO) && close(fd)) {
+ perror("Failed to close /dev/null descriptor");
+ exit(3);
+ }
/* Switch to sysconf(_SC_OPEN_MAX) ?? */
if (getrlimit(RLIMIT_NOFILE, &rlim) < 0)
6 years, 7 months