1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-26 07:33:16 +03:00

Right, a simple build (without options) is working again.

This commit is contained in:
Alasdair Kergon
2008-11-03 22:14:30 +00:00
parent 645aa55abc
commit a2bfad1c29
109 changed files with 1406 additions and 1388 deletions

View File

@@ -51,7 +51,7 @@
# endif
#endif
static LIST_INIT(_open_devices);
static DM_LIST_INIT(_open_devices);
/*-----------------------------------------------------------------
* The standard io loop that keeps submitting an io until it's
@@ -431,7 +431,7 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
if ((flags & O_CREAT) && !(flags & O_TRUNC))
dev->end = lseek(dev->fd, (off_t) 0, SEEK_END);
list_add(&_open_devices, &dev->open_list);
dm_list_add(&_open_devices, &dev->open_list);
log_debug("Opened %s %s%s%s", dev_name(dev),
dev->flags & DEV_OPENED_RW ? "RW" : "RO",
@@ -480,12 +480,12 @@ static void _close(struct device *dev)
log_sys_error("close", dev_name(dev));
dev->fd = -1;
dev->block_size = -1;
list_del(&dev->open_list);
dm_list_del(&dev->open_list);
log_debug("Closed %s", dev_name(dev));
if (dev->flags & DEV_ALLOCED) {
dm_free((void *) list_item(dev->aliases.n, struct str_list)->
dm_free((void *) dm_list_item(dev->aliases.n, struct str_list)->
str);
dm_free(dev->aliases.n);
dm_free(dev);
@@ -537,11 +537,11 @@ int dev_close_immediate(struct device *dev)
void dev_close_all(void)
{
struct list *doh, *doht;
struct dm_list *doh, *doht;
struct device *dev;
list_iterate_safe(doh, doht, &_open_devices) {
dev = list_struct_base(doh, struct device, open_list);
dm_list_iterate_safe(doh, doht, &_open_devices) {
dev = dm_list_struct_base(doh, struct device, open_list);
if (dev->open_count < 1)
_close(dev);
}