FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 03-17-2009, 01:03 PM
Jonathan Brassow
 
Default dm-snap-exception-function-changes-5.patch

Index: linux-2.6/drivers/md/dm-snap.c
================================================== =================
--- linux-2.6.orig/drivers/md/dm-snap.c
+++ linux-2.6/drivers/md/dm-snap.c
@@ -444,6 +444,25 @@ static struct dm_exception *dm_lookup_ex
return NULL;
}

+static struct dm_exception *dm_alloc_exception(struct dm_exception_table *et)
+{
+ struct dm_exception_table_internal *eti;
+
+ eti = container_of(et, struct dm_exception_table_internal, et);
+
+ return eti->alloc_exception(eti->alloc_context);
+}
+
+static void dm_free_exception(struct dm_exception_table *et,
+ struct dm_exception *e)
+{
+ struct dm_exception_table_internal *eti;
+
+ eti = container_of(et, struct dm_exception_table_internal, et);
+
+ return eti->free_exception(e, eti->free_context);
+}
+
static struct dm_exception *alloc_completed_exception(void *unused)
{
struct dm_exception *e;
@@ -505,7 +524,7 @@ static void dm_insert_exception(struct d
new_e->new_chunk == (dm_chunk_number(e->new_chunk) +
dm_consecutive_chunk_count(e) + 1)) {
dm_consecutive_chunk_count_inc(e);
- free_completed_exception(new_e, NULL);
+ dm_free_exception(eh, new_e);
return;
}

@@ -515,7 +534,7 @@ static void dm_insert_exception(struct d
dm_consecutive_chunk_count_inc(e);
e->old_chunk--;
e->new_chunk--;
- free_completed_exception(new_e, NULL);
+ dm_free_exception(eh, new_e);
return;
}

@@ -536,7 +555,7 @@ static int dm_add_exception(void *contex
struct dm_snapshot *s = context;
struct dm_exception *e;

- e = alloc_completed_exception(NULL);
+ e = dm_alloc_exception(s->complete);
if (!e)
return -ENOMEM;

@@ -967,7 +986,7 @@ static void pending_complete(struct dm_s
goto out;
}

- e = alloc_completed_exception(NULL);
+ e = dm_alloc_exception(s->complete);
if (!e) {
down_write(&s->lock);
__invalidate_snapshot(s, -ENOMEM);
@@ -978,7 +997,7 @@ static void pending_complete(struct dm_s

down_write(&s->lock);
if (!s->valid) {
- free_completed_exception(e, NULL);
+ dm_free_exception(s->complete, e);
error = 1;
goto out;
}

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 12:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org