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-25-2009, 08:38 PM
Jonathan Brassow
 
Default DM Snapshot: change parameters to __lookup_pending_exception

Patch name: dm-snap-change-parameters-to-__lookup_pending_exception.patch

Change the parameter to '__lookup_pending_exception' so that it takes
the exception table, not the snapshot structure. This is necessary
for future patches, because other structures (in addition to dm_snapshot)
will have exception tables that this function will need to operate on.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>

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
@@ -835,9 +835,9 @@ static void start_copy(struct dm_snap_pe
}

static struct dm_snap_pending_exception *
-__lookup_pending_exception(struct dm_snapshot *s, chunk_t chunk)
+__lookup_pending_exception(struct dm_exception_table *pending, chunk_t chunk)
{
- struct dm_exception *e = dm_lookup_exception(s->pending, chunk);
+ struct dm_exception *e = dm_lookup_exception(pending, chunk);

if (!e)
return NULL;
@@ -866,7 +866,7 @@ __find_pending_exception(struct dm_snaps
{
struct dm_snap_pending_exception *pe2;

- pe2 = __lookup_pending_exception(s, chunk);
+ pe2 = __lookup_pending_exception(s->pending, chunk);
if (pe2) {
dm_free_exception(s->pending, &pe->e);
return pe2;
@@ -944,7 +944,7 @@ static int snapshot_map(struct dm_target
* writeable.
*/
if (bio_rw(bio) == WRITE) {
- pe = __lookup_pending_exception(s, chunk);
+ pe = __lookup_pending_exception(s->pending, chunk);
if (!pe) {
up_write(&s->lock);
tmp_e = dm_alloc_exception(s->pending);
@@ -1148,7 +1148,7 @@ static int __origin_write(struct list_he
*/
BUG_ON(rtn != -ENOENT);

- pe = __lookup_pending_exception(snap, chunk);
+ pe = __lookup_pending_exception(snap->pending, chunk);
if (!pe) {
up_write(&snap->lock);
tmp_e = dm_alloc_exception(snap->pending);

--
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 06:13 AM.

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