mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix is_partitioned_dev not to attempt to reopen device.
This commit is contained in:
parent
9891603994
commit
6d25082d65
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.63 -
|
Version 2.02.63 -
|
||||||
================================
|
================================
|
||||||
|
Fix is_partitioned_dev not to attempt to reopen device.
|
||||||
Fix another thread race in clvmd.
|
Fix another thread race in clvmd.
|
||||||
Refactor management of vg->pvs list.
|
Refactor management of vg->pvs list.
|
||||||
Fix lcov rules and generate better coverage report.
|
Fix lcov rules and generate better coverage report.
|
||||||
|
@ -62,13 +62,8 @@ static int _has_partition_table(struct device *dev)
|
|||||||
uint16_t *part_magic;
|
uint16_t *part_magic;
|
||||||
struct partition *part;
|
struct partition *part;
|
||||||
|
|
||||||
if (!dev_open(dev)) {
|
|
||||||
stack;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!dev_read(dev, UINT64_C(0), sizeof(buf), &buf))
|
if (!dev_read(dev, UINT64_C(0), sizeof(buf), &buf))
|
||||||
goto_out;
|
return_0;
|
||||||
|
|
||||||
/* FIXME Check for other types of partition table too */
|
/* FIXME Check for other types of partition table too */
|
||||||
|
|
||||||
@ -88,10 +83,6 @@ static int _has_partition_table(struct device *dev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
if (!dev_close(dev))
|
|
||||||
stack;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,6 +247,15 @@ prepare_devs() {
|
|||||||
done
|
done
|
||||||
finish_udev_transaction
|
finish_udev_transaction
|
||||||
|
|
||||||
|
for i in `seq 1 $n`; do
|
||||||
|
local name="${PREFIX}$pvname$i"
|
||||||
|
dmsetup info -c $name
|
||||||
|
done
|
||||||
|
for i in `seq 1 $n`; do
|
||||||
|
local name="${PREFIX}$pvname$i"
|
||||||
|
dmsetup table $name
|
||||||
|
done
|
||||||
|
|
||||||
# set up some default names
|
# set up some default names
|
||||||
vg=${PREFIX}vg
|
vg=${PREFIX}vg
|
||||||
vg1=${PREFIX}vg1
|
vg1=${PREFIX}vg1
|
||||||
|
Loading…
Reference in New Issue
Block a user