Lines Matching refs:bucket
570 #define bucket_lock_irqsave(bucket, flags) \ argument
571 spin_lock_irqsave(&(bucket)->lock, flags)
573 #define bucket_unlock_irqrestore(bucket, flags) \ argument
574 spin_unlock_irqrestore(&(bucket)->lock, flags)
576 #define bucket_lock_irq(bucket) \ argument
577 spin_lock_irq(&(bucket)->lock)
579 #define bucket_unlock_irq(bucket) \ argument
580 spin_unlock_irq(&(bucket)->lock)
585 struct hash_table_bucket *bucket; in hash_table_init() local
594 bucket = clone->ht + i; in hash_table_init()
596 INIT_HLIST_HEAD(&bucket->head); in hash_table_init()
597 spin_lock_init(&bucket->lock); in hash_table_init()
619 static struct dm_clone_region_hydration *__hash_find(struct hash_table_bucket *bucket, in __hash_find() argument
624 hlist_for_each_entry(hd, &bucket->head, h) { in __hash_find()
637 static inline void __insert_region_hydration(struct hash_table_bucket *bucket, in __insert_region_hydration() argument
640 hlist_add_head(&hd->h, &bucket->head); in __insert_region_hydration()
651 __find_or_insert_region_hydration(struct hash_table_bucket *bucket, in __find_or_insert_region_hydration() argument
656 hd2 = __hash_find(bucket, hd->region_nr); in __find_or_insert_region_hydration()
660 __insert_region_hydration(bucket, hd); in __find_or_insert_region_hydration()
709 struct hash_table_bucket *bucket; in hydration_update_metadata() local
719 bucket = get_hash_table_bucket(clone, hd->region_nr); in hydration_update_metadata()
722 bucket_lock_irqsave(bucket, flags); in hydration_update_metadata()
724 bucket_unlock_irqrestore(bucket, flags); in hydration_update_metadata()
883 struct hash_table_bucket *bucket; in hydrate_bio_region() local
887 bucket = get_hash_table_bucket(clone, region_nr); in hydrate_bio_region()
889 bucket_lock_irq(bucket); in hydrate_bio_region()
891 hd = __hash_find(bucket, region_nr); in hydrate_bio_region()
895 bucket_unlock_irq(bucket); in hydrate_bio_region()
901 bucket_unlock_irq(bucket); in hydrate_bio_region()
910 bucket_unlock_irq(bucket); in hydrate_bio_region()
915 bucket_lock_irq(bucket); in hydrate_bio_region()
919 bucket_unlock_irq(bucket); in hydrate_bio_region()
925 hd2 = __find_or_insert_region_hydration(bucket, hd); in hydrate_bio_region()
929 bucket_unlock_irq(bucket); in hydrate_bio_region()
941 bucket_unlock_irq(bucket); in hydrate_bio_region()
955 bucket_unlock_irq(bucket); in hydrate_bio_region()
959 bucket_unlock_irq(bucket); in hydrate_bio_region()
1026 struct hash_table_bucket *bucket; in __start_next_hydration() local
1038 bucket = get_hash_table_bucket(clone, offset); in __start_next_hydration()
1039 bucket_lock_irq(bucket); in __start_next_hydration()
1042 !__hash_find(bucket, offset)) { in __start_next_hydration()
1044 __insert_region_hydration(bucket, hd); in __start_next_hydration()
1045 bucket_unlock_irq(bucket); in __start_next_hydration()
1053 bucket_unlock_irq(bucket); in __start_next_hydration()