1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

clean-ups: remove unused var, add 'static' for local fn, adjust test

For the test clean-up, I was providing too many devices to the first
command - possibly allowing it to allocate in the wrong place.  I was
also not providing a device for the second command - virtually ensuring
the test was not performing correctly at times.
This commit is contained in:
Jonathan Brassow 2017-06-14 14:49:42 -05:00
parent ddb14b6b05
commit 1f57a5263e
2 changed files with 3 additions and 4 deletions

View File

@ -2877,7 +2877,6 @@ static int _raid_allow_extraction(struct logical_volume *lv,
char *dev_health;
char *sync_action;
struct lv_segment *seg = first_seg(lv);
struct cmd_context *cmd = lv->vg->cmd;
/* If in-sync or hanlding repairs, allow to proceed. */
if (_raid_in_sync(lv) || lv->vg->cmd->handles_missing_pvs)
@ -6510,7 +6509,7 @@ has_enough_space:
* Returns: 1 if the state is detected, 0 otherwise.
* FIXME: would be better to return -1,0,1 to allow error report.
*/
int _lv_raid_has_primary_failure_on_recover(struct logical_volume *lv)
static int _lv_raid_has_primary_failure_on_recover(struct logical_volume *lv)
{
char *tmp_dev_health;
char *tmp_sync_action;

View File

@ -228,9 +228,9 @@ done
# - DO allow removal of secondaries while syncing
###########################################
aux delay_dev $dev2 0 100
lvcreate -aey -l 2 -n $lv1 $vg $dev1 $dev2
lvcreate -aey -l 2 -n $lv1 $vg $dev1
lvconvert -y -m 1 $vg/$lv1 \
--config 'global { mirror_segtype_default = "raid1" }'
--config 'global { mirror_segtype_default = "raid1" }' $dev2
lvs --noheadings -o attr $vg/$lv1 | grep '^[[:space:]]*r'
not lvconvert --yes -m 0 $vg/$lv1 $dev1
lvconvert --yes -m 0 $vg/$lv1 $dev2