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:
parent
552c2479aa
commit
28f5d16b4f
@ -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
|
--- 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
|
+++ bh_async/include/linux/fs.h Thu Jul 12 07:54:26 2001
|
||||||
@@ -215,6 +215,7 @@
|
@@ -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_New, /* 1 if the buffer is new and not yet written out */
|
||||||
BH_Protected, /* 1 if the buffer is protected */
|
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_Async, /* 1 if the buffer is under end_buffer_io_async I/O */
|
||||||
|
|
||||||
BH_PrivateStart,/* not a state bit, but the first bit available
|
BH_PrivateStart,/* not a state bit, but the first bit available
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
../lib/config/config.h
|
../lib/config/config.h
|
||||||
../lib/dev-mgr/dev-manager.h
|
|
||||||
../lib/dev-mgr/dev-cache.h
|
../lib/dev-mgr/dev-cache.h
|
||||||
../lib/display/display.h
|
../lib/display/display.h
|
||||||
../lib/log/log.h
|
../lib/log/log.h
|
||||||
@ -9,3 +8,4 @@
|
|||||||
../lib/device/device.h
|
../lib/device/device.h
|
||||||
../lib/datastruct/hash.h
|
../lib/datastruct/hash.h
|
||||||
../lib/datastruct/list.h
|
../lib/datastruct/list.h
|
||||||
|
../lib/filters/filter.h
|
||||||
|
@ -23,12 +23,11 @@ VPATH = @srcdir@
|
|||||||
SOURCES=\
|
SOURCES=\
|
||||||
config/config.c \
|
config/config.c \
|
||||||
dev-mgr/dev-manager.c \
|
dev-mgr/dev-manager.c \
|
||||||
dev-mgr/hash.c \
|
|
||||||
device/device.c \
|
device/device.c \
|
||||||
display/display.c \
|
display/display.c \
|
||||||
display/metadata.c \
|
display/metadata.c \
|
||||||
|
filters/filter.c \
|
||||||
log/log.c \
|
log/log.c \
|
||||||
metadata/lvm_v1.c \
|
|
||||||
metadata/metadata.c \
|
metadata/metadata.c \
|
||||||
mm/pool.c \
|
mm/pool.c \
|
||||||
mm/dbg_malloc.c
|
mm/dbg_malloc.c
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* tools/lib/dev-manager.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2001 Sistina Software
|
* Copyright (C) 2001 Sistina Software
|
||||||
*
|
*
|
||||||
* This file is released under the GPL.
|
* This file is released under the GPL.
|
||||||
@ -19,7 +17,7 @@ struct device {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct dev_filter {
|
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;
|
void *private;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,14 +19,10 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "dbg_malloc.h"
|
#include "dbg_malloc.h"
|
||||||
#include "dev-manager.h"
|
#include "dev-cache.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "metadata.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)
|
pv_t *pv_read(struct dev_mgr *dm, const char *pv_name)
|
||||||
{
|
{
|
||||||
/* FIXME: Use config to select lvm_v1 format? Cache results? */
|
/* FIXME: Use config to select lvm_v1 format? Cache results? */
|
||||||
|
15
tools/lvm.c
15
tools/lvm.c
@ -58,7 +58,7 @@ static int _array_size;
|
|||||||
static int _num_commands;
|
static int _num_commands;
|
||||||
static struct command *_commands;
|
static struct command *_commands;
|
||||||
|
|
||||||
static struct dev_mgr *_dm;
|
static struct dev_filter *_filter;
|
||||||
static struct config_file *_cf;
|
static struct config_file *_cf;
|
||||||
|
|
||||||
static int _interactive;
|
static int _interactive;
|
||||||
@ -544,10 +544,6 @@ static int split(char *str, int *argc, char **argv, int max)
|
|||||||
return *argc;
|
return *argc;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dev_mgr *active_dev_mgr(void) {
|
|
||||||
return _dm;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct config_file *active_config_file(void) {
|
struct config_file *active_config_file(void) {
|
||||||
return _cf;
|
return _cf;
|
||||||
}
|
}
|
||||||
@ -596,11 +592,15 @@ static int init(void)
|
|||||||
__init_log(_cf);
|
__init_log(_cf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(_dm = init_dev_manager(_cf->root))) {
|
if ((dev_cache_init)) {
|
||||||
stack;
|
stack;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(_filter = config_filter_create(_cf->root))) {
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -619,7 +619,8 @@ static void __fin_commands(void)
|
|||||||
|
|
||||||
static void fin(void)
|
static void fin(void)
|
||||||
{
|
{
|
||||||
fin_dev_manager(_dm);
|
config_filter_destroy(_filter);
|
||||||
|
dev_cache_exit();
|
||||||
destroy_config_file(_cf);
|
destroy_config_file(_cf);
|
||||||
__fin_commands();
|
__fin_commands();
|
||||||
dump_memory();
|
dump_memory();
|
||||||
|
@ -23,6 +23,6 @@
|
|||||||
|
|
||||||
int autobackup_set (void);
|
int autobackup_set (void);
|
||||||
int init_autobackup (void);
|
int init_autobackup (void);
|
||||||
int do_autobackup(char *vg_name, vg_t * vg);
|
int do_autobackup(struct volume_group *vg);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
#include "metadata.h"
|
#include "metadata.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "dev-cache.h"
|
#include "dev-cache.h"
|
||||||
#include "dev-manager.h"
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
|
#include "filter.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "dbg_malloc.h"
|
#include "dbg_malloc.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user