diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-05-23 00:26:20 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2018-06-08 17:53:14 +0200 |
commit | 72d711c8768805b5f8cf2d23c575dfd188993e12 (patch) | |
tree | 1a442b3c9c5d7eb4fb61c2bdd10c19386ae19d28 /drivers/md/dm-region-hash.c | |
parent | dm: report which conflicting type caused error during table_load() (diff) | |
download | linux-72d711c8768805b5f8cf2d23c575dfd188993e12.tar.xz linux-72d711c8768805b5f8cf2d23c575dfd188993e12.zip |
dm: adjust structure members to improve alignment
Eliminate most holes in DM data structures that were modified by
commit 6f1c819c21 ("dm: convert to bioset_init()/mempool_init()").
Also prevent structure members from unnecessarily spanning cache
lines.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-region-hash.c')
-rw-r--r-- | drivers/md/dm-region-hash.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index abf3521b80a8..c832ec398f02 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c @@ -63,27 +63,28 @@ struct dm_region_hash { /* hash table */ rwlock_t hash_lock; - mempool_t region_pool; unsigned mask; unsigned nr_buckets; unsigned prime; unsigned shift; struct list_head *buckets; + /* + * If there was a flush failure no regions can be marked clean. + */ + int flush_failure; + unsigned max_recovery; /* Max # of regions to recover in parallel */ spinlock_t region_lock; atomic_t recovery_in_flight; - struct semaphore recovery_count; struct list_head clean_regions; struct list_head quiesced_regions; struct list_head recovered_regions; struct list_head failed_recovered_regions; + struct semaphore recovery_count; - /* - * If there was a flush failure no regions can be marked clean. - */ - int flush_failure; + mempool_t region_pool; void *context; sector_t target_begin; |