Change to using exception table pointers vs. just using the
whole struct from within 'stuct dm_snapshot'. Again, this is
to facilitate extraction of the exception table/cache code from
dm-snap.c.
static void snapshot_dtr(struct dm_target *ti)
@@ -950,7 +961,7 @@ static void pending_complete(struct dm_s
* Add a proper exception, and remove the
* in-flight exception from the list.
*/
- dm_insert_exception(&s->complete, e);
+ dm_insert_exception(s->complete, e);
out:
dm_remove_exception(&pe->e);
@@ -1036,7 +1047,7 @@ __find_pending_exception(struct dm_snaps
/*
* Is there a pending exception for this already ?
*/
- e = dm_lookup_exception(&s->pending, chunk);
+ e = dm_lookup_exception(s->pending, chunk);
if (e) {
/* cast the exception to a pending exception */
pe = container_of(e, struct dm_snap_pending_exception, e);
@@ -1056,7 +1067,7 @@ __find_pending_exception(struct dm_snaps
return NULL;
}
- e = dm_lookup_exception(&s->pending, chunk);
+ e = dm_lookup_exception(s->pending, chunk);
if (e) {
free_pending_exception(pe);
pe = container_of(e, struct dm_snap_pending_exception, e);
@@ -1076,7 +1087,7 @@ __find_pending_exception(struct dm_snaps
}
/* If the block is already remapped - use that, else remap it */
- e = dm_lookup_exception(&s->complete, chunk);
+ e = dm_lookup_exception(s->complete, chunk);
if (e) {
remap_exception(s, e, bio, chunk);
goto out_unlock;
@@ -1260,7 +1271,7 @@ static int __origin_write(struct list_he
* ref_count is initialised to 1 so pending_complete()
* won't destroy the primary_pe while we're inside this loop.
*/
- e = dm_lookup_exception(&snap->complete, chunk);
+ e = dm_lookup_exception(snap->complete, chunk);
if (e)
goto next_snapshot;
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
03-17-2009, 01:03 PM
Jonathan Brassow
dm-snap-exception_table-ptrs.patch
Change to using exception table pointers vs. just using the
whole struct from within 'stuct dm_snapshot'. Again, this is
to facilitate extraction of the exception table/cache code from
dm-snap.c.
static void snapshot_dtr(struct dm_target *ti)
@@ -950,7 +961,7 @@ static void pending_complete(struct dm_s
* Add a proper exception, and remove the
* in-flight exception from the list.
*/
- dm_insert_exception(&s->complete, e);
+ dm_insert_exception(s->complete, e);
out:
dm_remove_exception(&pe->e);
@@ -1036,7 +1047,7 @@ __find_pending_exception(struct dm_snaps
/*
* Is there a pending exception for this already ?
*/
- e = dm_lookup_exception(&s->pending, chunk);
+ e = dm_lookup_exception(s->pending, chunk);
if (e) {
/* cast the exception to a pending exception */
pe = container_of(e, struct dm_snap_pending_exception, e);
@@ -1056,7 +1067,7 @@ __find_pending_exception(struct dm_snaps
return NULL;
}
- e = dm_lookup_exception(&s->pending, chunk);
+ e = dm_lookup_exception(s->pending, chunk);
if (e) {
free_pending_exception(pe);
pe = container_of(e, struct dm_snap_pending_exception, e);
@@ -1076,7 +1087,7 @@ __find_pending_exception(struct dm_snaps
}
/* If the block is already remapped - use that, else remap it */
- e = dm_lookup_exception(&s->complete, chunk);
+ e = dm_lookup_exception(s->complete, chunk);
if (e) {
remap_exception(s, e, bio, chunk);
goto out_unlock;
@@ -1261,7 +1272,7 @@ static int __origin_write(struct list_he
* ref_count is initialised to 1 so pending_complete()
* won't destroy the primary_pe while we're inside this loop.
*/
- e = dm_lookup_exception(&snap->complete, chunk);
+ e = dm_lookup_exception(snap->complete, chunk);
if (e)
goto next_snapshot;
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel