diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-05-22 18:26:20 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2018-06-08 11:53:14 -0400 |
commit | 72d711c8768805b5f8cf2d23c575dfd188993e12 (patch) | |
tree | 1a442b3c9c5d7eb4fb61c2bdd10c19386ae19d28 /drivers/md/dm-region-hash.c | |
parent | b2b04e7e2d3bffd301d1769700ba013f58ca01b7 (diff) | |
download | linux-stable-72d711c8768805b5f8cf2d23c575dfd188993e12.tar.gz linux-stable-72d711c8768805b5f8cf2d23c575dfd188993e12.tar.bz2 linux-stable-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; |