diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2013-02-22 19:32:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 20:50:08 -0500 |
| commit | df8557982fb3fa0a1e638cd1bf7b7092a202fa32 (patch) | |
| tree | 559733a498baf93a329d191264c0e70a83b12777 /drivers/md/persistent-data | |
| parent | 2ef14f465b9e096531343f5b734cffc5f759f4a6 (diff) | |
drivers/md/persistent-data/dm-transaction-manager.c: rename HASH_SIZE
Fix the warning:
drivers/md/persistent-data/dm-transaction-manager.c:28:1: warning: "HASH_SIZE" redefined
In file included from include/linux/elevator.h:5,
from include/linux/blkdev.h:216,
from drivers/md/persistent-data/dm-block-manager.h:11,
from drivers/md/persistent-data/dm-transaction-manager.h:10,
from drivers/md/persistent-data/dm-transaction-manager.c:6:
include/linux/hashtable.h:22:1: warning: this is the location of the previous definition
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/persistent-data')
| -rw-r--r-- | drivers/md/persistent-data/dm-transaction-manager.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/persistent-data/dm-transaction-manager.c b/drivers/md/persistent-data/dm-transaction-manager.c index d247a35da3c6..7b17a1fdeaf9 100644 --- a/drivers/md/persistent-data/dm-transaction-manager.c +++ b/drivers/md/persistent-data/dm-transaction-manager.c | |||
| @@ -25,8 +25,8 @@ struct shadow_info { | |||
| 25 | /* | 25 | /* |
| 26 | * It would be nice if we scaled with the size of transaction. | 26 | * It would be nice if we scaled with the size of transaction. |
| 27 | */ | 27 | */ |
| 28 | #define HASH_SIZE 256 | 28 | #define DM_HASH_SIZE 256 |
| 29 | #define HASH_MASK (HASH_SIZE - 1) | 29 | #define DM_HASH_MASK (DM_HASH_SIZE - 1) |
| 30 | 30 | ||
| 31 | struct dm_transaction_manager { | 31 | struct dm_transaction_manager { |
| 32 | int is_clone; | 32 | int is_clone; |
| @@ -36,7 +36,7 @@ struct dm_transaction_manager { | |||
| 36 | struct dm_space_map *sm; | 36 | struct dm_space_map *sm; |
| 37 | 37 | ||
| 38 | spinlock_t lock; | 38 | spinlock_t lock; |
| 39 | struct hlist_head buckets[HASH_SIZE]; | 39 | struct hlist_head buckets[DM_HASH_SIZE]; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | /*----------------------------------------------------------------*/ | 42 | /*----------------------------------------------------------------*/ |
| @@ -44,7 +44,7 @@ struct dm_transaction_manager { | |||
| 44 | static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) | 44 | static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) |
| 45 | { | 45 | { |
| 46 | int r = 0; | 46 | int r = 0; |
| 47 | unsigned bucket = dm_hash_block(b, HASH_MASK); | 47 | unsigned bucket = dm_hash_block(b, DM_HASH_MASK); |
| 48 | struct shadow_info *si; | 48 | struct shadow_info *si; |
| 49 | struct hlist_node *n; | 49 | struct hlist_node *n; |
| 50 | 50 | ||
| @@ -71,7 +71,7 @@ static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) | |||
| 71 | si = kmalloc(sizeof(*si), GFP_NOIO); | 71 | si = kmalloc(sizeof(*si), GFP_NOIO); |
| 72 | if (si) { | 72 | if (si) { |
| 73 | si->where = b; | 73 | si->where = b; |
| 74 | bucket = dm_hash_block(b, HASH_MASK); | 74 | bucket = dm_hash_block(b, DM_HASH_MASK); |
| 75 | spin_lock(&tm->lock); | 75 | spin_lock(&tm->lock); |
| 76 | hlist_add_head(&si->hlist, tm->buckets + bucket); | 76 | hlist_add_head(&si->hlist, tm->buckets + bucket); |
| 77 | spin_unlock(&tm->lock); | 77 | spin_unlock(&tm->lock); |
| @@ -86,7 +86,7 @@ static void wipe_shadow_table(struct dm_transaction_manager *tm) | |||
| 86 | int i; | 86 | int i; |
| 87 | 87 | ||
| 88 | spin_lock(&tm->lock); | 88 | spin_lock(&tm->lock); |
| 89 | for (i = 0; i < HASH_SIZE; i++) { | 89 | for (i = 0; i < DM_HASH_SIZE; i++) { |
| 90 | bucket = tm->buckets + i; | 90 | bucket = tm->buckets + i; |
| 91 | hlist_for_each_entry_safe(si, n, tmp, bucket, hlist) | 91 | hlist_for_each_entry_safe(si, n, tmp, bucket, hlist) |
| 92 | kfree(si); | 92 | kfree(si); |
| @@ -115,7 +115,7 @@ static struct dm_transaction_manager *dm_tm_create(struct dm_block_manager *bm, | |||
| 115 | tm->sm = sm; | 115 | tm->sm = sm; |
| 116 | 116 | ||
| 117 | spin_lock_init(&tm->lock); | 117 | spin_lock_init(&tm->lock); |
| 118 | for (i = 0; i < HASH_SIZE; i++) | 118 | for (i = 0; i < DM_HASH_SIZE; i++) |
| 119 | INIT_HLIST_HEAD(tm->buckets + i); | 119 | INIT_HLIST_HEAD(tm->buckets + i); |
| 120 | 120 | ||
| 121 | return tm; | 121 | return tm; |
