]> sourceware.org Git - lvm2.git/commit
Avoid scanning all pvs in the system if operating on a device with mdas.
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 18 Mar 2010 17:29:12 +0000 (17:29 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 18 Mar 2010 17:29:12 +0000 (17:29 +0000)
commit39f92f3cfdf36ca30364b661fa713136bd43b0aa
treeb2277492f9df6d0ade1d1eefd7ad689662ffe013
parent9cc29191d40819461dd0d7a4242c029b1ef43ab2
Avoid scanning all pvs in the system if operating on a device with mdas.

When we pv_read() a device that has an orphan vgname, we might need to scan
the system to be sure this is true.  However, if the PV has mdas, there's
no way possible for it to have an orphan vgname unless it is a true orphan.
Some areas of the code were optimized to take advantage of this fact, while
others were not (we would still do the expensive scan if a device had mdas
but had an orphan VG).

This patch unifies the code so that every place we are operating on such
a PV, we skip the expensive scan if there are mdas.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Petr Rockai <prockai@redhat.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
lib/metadata/metadata.c
tools/toollib.c
This page took 0.026516 seconds and 5 git commands to generate.