1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/vgcache/vgcache.h
Alasdair Kergon faa556e759 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.
2001-12-13 00:07:29 +00:00

37 lines
630 B
C

/*
* Copyright (C) 2001 Sistina Software (UK) Limited.
*
* This file is released under the LGPL.
*
*/
#ifndef _LVM_VGCACHE_H
#define _LVM_VGCACHE_H
#include <sys/types.h>
#include <asm/page.h>
#include "dev-cache.h"
#include "list.h"
struct vgname_entry {
struct list pvdevs;
char *vgname;
};
struct pvdev_list {
struct list list;
struct device *dev;
};
int vgcache_init();
void vgcache_destroy();
/* Return list of PVs in named VG */
struct list *vgcache_find(const char *vg_name);
/* Add/delete a device */
int vgcache_add(const char *vg_name, struct device *dev);
void vgcache_del(const char *vg_name);
#endif