Lines Matching refs:bucket

551 #define bucket_lock_irqsave(bucket, flags) \  argument
552 spin_lock_irqsave(&(bucket)->lock, flags)
554 #define bucket_unlock_irqrestore(bucket, flags) \ argument
555 spin_unlock_irqrestore(&(bucket)->lock, flags)
560 struct hash_table_bucket *bucket; in hash_table_init() local
569 bucket = clone->ht + i; in hash_table_init()
571 INIT_HLIST_HEAD(&bucket->head); in hash_table_init()
572 spin_lock_init(&bucket->lock); in hash_table_init()
594 static struct dm_clone_region_hydration *__hash_find(struct hash_table_bucket *bucket, in __hash_find() argument
599 hlist_for_each_entry(hd, &bucket->head, h) { in __hash_find()
612 static inline void __insert_region_hydration(struct hash_table_bucket *bucket, in __insert_region_hydration() argument
615 hlist_add_head(&hd->h, &bucket->head); in __insert_region_hydration()
626 __find_or_insert_region_hydration(struct hash_table_bucket *bucket, in __find_or_insert_region_hydration() argument
631 hd2 = __hash_find(bucket, hd->region_nr); in __find_or_insert_region_hydration()
635 __insert_region_hydration(bucket, hd); in __find_or_insert_region_hydration()
684 struct hash_table_bucket *bucket; in hydration_update_metadata() local
694 bucket = get_hash_table_bucket(clone, hd->region_nr); in hydration_update_metadata()
697 bucket_lock_irqsave(bucket, flags); in hydration_update_metadata()
699 bucket_unlock_irqrestore(bucket, flags); in hydration_update_metadata()
856 struct hash_table_bucket *bucket; in hydrate_bio_region() local
860 bucket = get_hash_table_bucket(clone, region_nr); in hydrate_bio_region()
862 bucket_lock_irqsave(bucket, flags); in hydrate_bio_region()
864 hd = __hash_find(bucket, region_nr); in hydrate_bio_region()
868 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
874 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
883 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
888 bucket_lock_irqsave(bucket, flags); in hydrate_bio_region()
892 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
898 hd2 = __find_or_insert_region_hydration(bucket, hd); in hydrate_bio_region()
902 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
914 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
928 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
932 bucket_unlock_irqrestore(bucket, flags); in hydrate_bio_region()
1000 struct hash_table_bucket *bucket; in __start_next_hydration() local
1012 bucket = get_hash_table_bucket(clone, offset); in __start_next_hydration()
1013 bucket_lock_irqsave(bucket, flags); in __start_next_hydration()
1016 !__hash_find(bucket, offset)) { in __start_next_hydration()
1018 __insert_region_hydration(bucket, hd); in __start_next_hydration()
1019 bucket_unlock_irqrestore(bucket, flags); in __start_next_hydration()
1027 bucket_unlock_irqrestore(bucket, flags); in __start_next_hydration()