1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Misc structural changes.

This commit is contained in:
Alasdair Kergon 2001-10-01 19:36:06 +00:00
parent 552c2479aa
commit 28f5d16b4f
10 changed files with 15 additions and 21 deletions

View File

@ -56,9 +56,9 @@ diff -urN 2.4.7pre6/include/linux/fs.h bh_async/include/linux/fs.h
--- 2.4.7pre6/include/linux/fs.h Wed Jul 11 06:03:19 2001
+++ bh_async/include/linux/fs.h Thu Jul 12 07:54:26 2001
@@ -215,6 +215,7 @@
BH_Mapped, /* 1 if the buffer has a disk mapping */
BH_New, /* 1 if the buffer is new and not yet written out */
BH_Protected, /* 1 if the buffer is protected */
BH_JBD, /* 1 if it has an attached journal_head */
+ BH_Async, /* 1 if the buffer is under end_buffer_io_async I/O */
BH_PrivateStart,/* not a state bit, but the first bit available

View File

@ -1,5 +1,4 @@
../lib/config/config.h
../lib/dev-mgr/dev-manager.h
../lib/dev-mgr/dev-cache.h
../lib/display/display.h
../lib/log/log.h
@ -9,3 +8,4 @@
../lib/device/device.h
../lib/datastruct/hash.h
../lib/datastruct/list.h
../lib/filters/filter.h

View File

@ -23,12 +23,11 @@ VPATH = @srcdir@
SOURCES=\
config/config.c \
dev-mgr/dev-manager.c \
dev-mgr/hash.c \
device/device.c \
display/display.c \
display/metadata.c \
filters/filter.c \
log/log.c \
metadata/lvm_v1.c \
metadata/metadata.c \
mm/pool.c \
mm/dbg_malloc.c

View File

@ -1,6 +1,4 @@
/*
* tools/lib/dev-manager.h
*
* Copyright (C) 2001 Sistina Software
*
* This file is released under the GPL.
@ -19,7 +17,7 @@ struct device {
};
struct dev_filter {
int (*fn)(struct device *dev, struct dev_cache_filter *f);
int (*passes_filter)(struct dev_cache_filter *f, struct device *dev);
void *private;
};

View File

@ -19,14 +19,10 @@
#include <string.h>
#include "dbg_malloc.h"
#include "dev-manager.h"
#include "dev-cache.h"
#include "log.h"
#include "metadata.h"
/* FIXME: Use registered fn ptrs to avoid including this? */
/* Split into external/internal hdr files? */
#include "lvm_v1.h"
pv_t *pv_read(struct dev_mgr *dm, const char *pv_name)
{
/* FIXME: Use config to select lvm_v1 format? Cache results? */

View File

@ -58,7 +58,7 @@ static int _array_size;
static int _num_commands;
static struct command *_commands;
static struct dev_mgr *_dm;
static struct dev_filter *_filter;
static struct config_file *_cf;
static int _interactive;
@ -544,10 +544,6 @@ static int split(char *str, int *argc, char **argv, int max)
return *argc;
}
struct dev_mgr *active_dev_mgr(void) {
return _dm;
}
struct config_file *active_config_file(void) {
return _cf;
}
@ -596,11 +592,15 @@ static int init(void)
__init_log(_cf);
}
if (!(_dm = init_dev_manager(_cf->root))) {
if ((dev_cache_init)) {
stack;
goto out;
}
if (!(_filter = config_filter_create(_cf->root))) {
goto out;
}
ret = 1;
out:
@ -619,7 +619,8 @@ static void __fin_commands(void)
static void fin(void)
{
fin_dev_manager(_dm);
config_filter_destroy(_filter);
dev_cache_exit();
destroy_config_file(_cf);
__fin_commands();
dump_memory();

View File

@ -23,6 +23,6 @@
int autobackup_set (void);
int init_autobackup (void);
int do_autobackup(char *vg_name, vg_t * vg);
int do_autobackup(struct volume_group *vg);
#endif

View File

@ -30,10 +30,10 @@
#include "metadata.h"
#include "config.h"
#include "dev-cache.h"
#include "dev-manager.h"
#include "device.h"
#include "display.h"
#include "errors.h"
#include "filter.h"
#include "list.h"
#include "log.h"
#include "dbg_malloc.h"