1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-11-02 04:23:50 +03:00

Add internal cache holding a 'hint' list of the PVs belonging to each VG.

A substantial speed-up - particularly in readline mode.
If the hints turn out to be wrong, the relevant parts get thrown away.
vgscan destroys it totally.  In both cases it then rebuilds itself as
required.
This commit is contained in:
Alasdair Kergon
2001-12-13 00:07:29 +00:00
parent c3475af809
commit d4de7934f8
10 changed files with 344 additions and 100 deletions

View File

@@ -29,8 +29,11 @@ int vgscan(int argc, char **argv)
return EINVALID_CMD_LINE;
}
log_verbose("Wiping cache of LVM-capable devices");
persistent_filter_wipe(fid->cmd->filter);
log_verbose("Wiping cache of LVM-capable devices");
persistent_filter_wipe(fid->cmd->filter);
log_verbose("Wiping internal cache of PVs in VGs");
vgcache_destroy();
log_print("Reading all physical volumes (this may take a while...)");
@@ -62,9 +65,7 @@ static int vgscan_single(const char *vg_name)
}
*********/
log_print("%d logical volumes in volume group %s activated",
log_print("%d logical volumes in volume group %s activated",
activate_lvs_in_vg(vg), vg_name);
return 0;