1
0
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:
Alasdair Kergon 2010-04-06 17:36:41 +00:00
parent 9891603994
commit 6d25082d65
3 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.63 -
================================
Fix is_partitioned_dev not to attempt to reopen device.
Fix another thread race in clvmd.
Refactor management of vg->pvs list.
Fix lcov rules and generate better coverage report.

View File

@ -62,13 +62,8 @@ static int _has_partition_table(struct device *dev)
uint16_t *part_magic;
struct partition *part;
if (!dev_open(dev)) {
stack;
return -1;
}
if (!dev_read(dev, UINT64_C(0), sizeof(buf), &buf))
goto_out;
return_0;
/* 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;
}

View File

@ -247,6 +247,15 @@ prepare_devs() {
done
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
vg=${PREFIX}vg
vg1=${PREFIX}vg1