Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176534
b: refs/heads/master
c: d32a6ea
h: refs/heads/master
v: v3
  • Loading branch information
Jon Brassow authored and Alasdair G Kergon committed Dec 10, 2009
1 parent e8c8dfe commit 6f28c60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e201b35132a1f02c931a0a06760766c846bb49b
refs/heads/master: d32a6ea65fbc33621f9c790da3dff10201640b2a
16 changes: 4 additions & 12 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,6 @@ static uint32_t exception_hash(struct exception_table *et, chunk_t chunk)
return (chunk >> et->hash_shift) & et->hash_mask;
}

static void insert_exception(struct exception_table *eh,
struct dm_snap_exception *e)
{
struct list_head *l = &eh->table[exception_hash(eh, e->old_chunk)];
list_add(&e->hash_list, l);
}

static void remove_exception(struct dm_snap_exception *e)
{
list_del(&e->hash_list);
Expand Down Expand Up @@ -457,10 +450,9 @@ static void free_pending_exception(struct dm_snap_pending_exception *pe)
atomic_dec(&s->pending_exceptions_count);
}

static void insert_completed_exception(struct dm_snapshot *s,
struct dm_snap_exception *new_e)
static void insert_exception(struct exception_table *eh,
struct dm_snap_exception *new_e)
{
struct exception_table *eh = &s->complete;
struct list_head *l;
struct dm_snap_exception *e = NULL;

Expand Down Expand Up @@ -518,7 +510,7 @@ static int dm_add_exception(void *context, chunk_t old, chunk_t new)
/* Consecutive_count is implicitly initialised to zero */
e->new_chunk = new;

insert_completed_exception(s, e);
insert_exception(&s->complete, e);

return 0;
}
Expand Down Expand Up @@ -925,7 +917,7 @@ static void pending_complete(struct dm_snap_pending_exception *pe, int success)
* Add a proper exception, and remove the
* in-flight exception from the list.
*/
insert_completed_exception(s, e);
insert_exception(&s->complete, e);

out:
remove_exception(&pe->e);
Expand Down

0 comments on commit 6f28c60

Please sign in to comment.