diff options
-rw-r--r-- | drivers/md/dm-snap.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index a7d60f644063..f40331cb1f6e 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #define DM_TRACKED_CHUNK_HASH(x) ((unsigned long)(x) & \ | 49 | #define DM_TRACKED_CHUNK_HASH(x) ((unsigned long)(x) & \ |
50 | (DM_TRACKED_CHUNK_HASH_SIZE - 1)) | 50 | (DM_TRACKED_CHUNK_HASH_SIZE - 1)) |
51 | 51 | ||
52 | struct exception_table { | 52 | struct dm_exception_table { |
53 | uint32_t hash_mask; | 53 | uint32_t hash_mask; |
54 | unsigned hash_shift; | 54 | unsigned hash_shift; |
55 | struct list_head *table; | 55 | struct list_head *table; |
@@ -73,8 +73,8 @@ struct dm_snapshot { | |||
73 | 73 | ||
74 | atomic_t pending_exceptions_count; | 74 | atomic_t pending_exceptions_count; |
75 | 75 | ||
76 | struct exception_table pending; | 76 | struct dm_exception_table pending; |
77 | struct exception_table complete; | 77 | struct dm_exception_table complete; |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * pe_lock protects all pending_exception operations and access | 80 | * pe_lock protects all pending_exception operations and access |
@@ -351,7 +351,7 @@ static void unregister_snapshot(struct dm_snapshot *s) | |||
351 | * The lowest hash_shift bits of the chunk number are ignored, allowing | 351 | * The lowest hash_shift bits of the chunk number are ignored, allowing |
352 | * some consecutive chunks to be grouped together. | 352 | * some consecutive chunks to be grouped together. |
353 | */ | 353 | */ |
354 | static int init_exception_table(struct exception_table *et, uint32_t size, | 354 | static int init_exception_table(struct dm_exception_table *et, uint32_t size, |
355 | unsigned hash_shift) | 355 | unsigned hash_shift) |
356 | { | 356 | { |
357 | unsigned int i; | 357 | unsigned int i; |
@@ -368,7 +368,8 @@ static int init_exception_table(struct exception_table *et, uint32_t size, | |||
368 | return 0; | 368 | return 0; |
369 | } | 369 | } |
370 | 370 | ||
371 | static void exit_exception_table(struct exception_table *et, struct kmem_cache *mem) | 371 | static void exit_exception_table(struct dm_exception_table *et, |
372 | struct kmem_cache *mem) | ||
372 | { | 373 | { |
373 | struct list_head *slot; | 374 | struct list_head *slot; |
374 | struct dm_exception *ex, *next; | 375 | struct dm_exception *ex, *next; |
@@ -385,7 +386,7 @@ static void exit_exception_table(struct exception_table *et, struct kmem_cache * | |||
385 | vfree(et->table); | 386 | vfree(et->table); |
386 | } | 387 | } |
387 | 388 | ||
388 | static uint32_t exception_hash(struct exception_table *et, chunk_t chunk) | 389 | static uint32_t exception_hash(struct dm_exception_table *et, chunk_t chunk) |
389 | { | 390 | { |
390 | return (chunk >> et->hash_shift) & et->hash_mask; | 391 | return (chunk >> et->hash_shift) & et->hash_mask; |
391 | } | 392 | } |
@@ -399,7 +400,7 @@ static void remove_exception(struct dm_exception *e) | |||
399 | * Return the exception data for a sector, or NULL if not | 400 | * Return the exception data for a sector, or NULL if not |
400 | * remapped. | 401 | * remapped. |
401 | */ | 402 | */ |
402 | static struct dm_exception *lookup_exception(struct exception_table *et, | 403 | static struct dm_exception *lookup_exception(struct dm_exception_table *et, |
403 | chunk_t chunk) | 404 | chunk_t chunk) |
404 | { | 405 | { |
405 | struct list_head *slot; | 406 | struct list_head *slot; |
@@ -450,7 +451,7 @@ static void free_pending_exception(struct dm_snap_pending_exception *pe) | |||
450 | atomic_dec(&s->pending_exceptions_count); | 451 | atomic_dec(&s->pending_exceptions_count); |
451 | } | 452 | } |
452 | 453 | ||
453 | static void insert_exception(struct exception_table *eh, | 454 | static void insert_exception(struct dm_exception_table *eh, |
454 | struct dm_exception *new_e) | 455 | struct dm_exception *new_e) |
455 | { | 456 | { |
456 | struct list_head *l; | 457 | struct list_head *l; |