diff --git a/driver/device-mapper/patches/00_bh-async-3 b/driver/device-mapper/patches/00_bh-async-3 index 2cc9b32e2..f997ae7c8 100644 --- a/driver/device-mapper/patches/00_bh-async-3 +++ b/driver/device-mapper/patches/00_bh-async-3 @@ -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 diff --git a/include/.symlinks b/include/.symlinks index 7231764a5..77de07693 100644 --- a/include/.symlinks +++ b/include/.symlinks @@ -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 diff --git a/lib/Makefile.in b/lib/Makefile.in index d275a41b7..e5e3edb11 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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 diff --git a/lib/dev-mgr/dev-cache.h b/lib/dev-mgr/dev-cache.h index d958d98bf..e0f5efee8 100644 --- a/lib/dev-mgr/dev-cache.h +++ b/lib/dev-mgr/dev-cache.h @@ -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; }; diff --git a/lib/formats/filter.c b/lib/filters/filter.c similarity index 100% rename from lib/formats/filter.c rename to lib/filters/filter.c diff --git a/lib/formats/filter.h b/lib/filters/filter.h similarity index 100% rename from lib/formats/filter.h rename to lib/filters/filter.h diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index d469d3fd7..e0c82a634 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -19,14 +19,10 @@ #include #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? */ diff --git a/tools/lvm.c b/tools/lvm.c index a691879f4..e52d77d41 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -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(); diff --git a/tools/toollib.h b/tools/toollib.h index aa791953c..42e180581 100644 --- a/tools/toollib.h +++ b/tools/toollib.h @@ -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 diff --git a/tools/tools.h b/tools/tools.h index f5684b871..9a548fa3d 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -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"