Lines Matching refs:bucket
564 #define bucket_lock_irqsave(bucket, flags) \ argument
565 spin_lock_irqsave(&(bucket)->lock, flags)
567 #define bucket_unlock_irqrestore(bucket, flags) \ argument
568 spin_unlock_irqrestore(&(bucket)->lock, flags)
570 #define bucket_lock_irq(bucket) \ argument
571 spin_lock_irq(&(bucket)->lock)
573 #define bucket_unlock_irq(bucket) \ argument
574 spin_unlock_irq(&(bucket)->lock)
579 struct hash_table_bucket *bucket; in hash_table_init() local
588 bucket = clone->ht + i; in hash_table_init()
590 INIT_HLIST_HEAD(&bucket->head); in hash_table_init()
591 spin_lock_init(&bucket->lock); in hash_table_init()
613 static struct dm_clone_region_hydration *__hash_find(struct hash_table_bucket *bucket, in __hash_find() argument
618 hlist_for_each_entry(hd, &bucket->head, h) { in __hash_find()
631 static inline void __insert_region_hydration(struct hash_table_bucket *bucket, in __insert_region_hydration() argument
634 hlist_add_head(&hd->h, &bucket->head); in __insert_region_hydration()
645 __find_or_insert_region_hydration(struct hash_table_bucket *bucket, in __find_or_insert_region_hydration() argument
650 hd2 = __hash_find(bucket, hd->region_nr); in __find_or_insert_region_hydration()
654 __insert_region_hydration(bucket, hd); in __find_or_insert_region_hydration()
703 struct hash_table_bucket *bucket; in hydration_update_metadata() local
713 bucket = get_hash_table_bucket(clone, hd->region_nr); in hydration_update_metadata()
716 bucket_lock_irqsave(bucket, flags); in hydration_update_metadata()
718 bucket_unlock_irqrestore(bucket, flags); in hydration_update_metadata()
877 struct hash_table_bucket *bucket; in hydrate_bio_region() local
881 bucket = get_hash_table_bucket(clone, region_nr); in hydrate_bio_region()
883 bucket_lock_irq(bucket); in hydrate_bio_region()
885 hd = __hash_find(bucket, region_nr); in hydrate_bio_region()
889 bucket_unlock_irq(bucket); in hydrate_bio_region()
895 bucket_unlock_irq(bucket); in hydrate_bio_region()
904 bucket_unlock_irq(bucket); in hydrate_bio_region()
909 bucket_lock_irq(bucket); in hydrate_bio_region()
913 bucket_unlock_irq(bucket); in hydrate_bio_region()
919 hd2 = __find_or_insert_region_hydration(bucket, hd); in hydrate_bio_region()
923 bucket_unlock_irq(bucket); in hydrate_bio_region()
935 bucket_unlock_irq(bucket); in hydrate_bio_region()
949 bucket_unlock_irq(bucket); in hydrate_bio_region()
953 bucket_unlock_irq(bucket); in hydrate_bio_region()
1020 struct hash_table_bucket *bucket; in __start_next_hydration() local
1032 bucket = get_hash_table_bucket(clone, offset); in __start_next_hydration()
1033 bucket_lock_irq(bucket); in __start_next_hydration()
1036 !__hash_find(bucket, offset)) { in __start_next_hydration()
1038 __insert_region_hydration(bucket, hd); in __start_next_hydration()
1039 bucket_unlock_irq(bucket); in __start_next_hydration()
1047 bucket_unlock_irq(bucket); in __start_next_hydration()