Lines Matching refs:table
52 struct btrfs_stripe_hash table[]; member
204 struct btrfs_stripe_hash_table *table; in btrfs_alloc_stripe_hash_table() local
221 table = kvzalloc(struct_size(table, table, num_entries), GFP_KERNEL); in btrfs_alloc_stripe_hash_table()
222 if (!table) in btrfs_alloc_stripe_hash_table()
225 spin_lock_init(&table->cache_lock); in btrfs_alloc_stripe_hash_table()
226 INIT_LIST_HEAD(&table->stripe_cache); in btrfs_alloc_stripe_hash_table()
228 h = table->table; in btrfs_alloc_stripe_hash_table()
236 x = cmpxchg(&info->stripe_hash_table, NULL, table); in btrfs_alloc_stripe_hash_table()
341 struct btrfs_stripe_hash_table *table; in __remove_rbio_from_cache() local
351 table = rbio->fs_info->stripe_hash_table; in __remove_rbio_from_cache()
352 h = table->table + bucket; in __remove_rbio_from_cache()
367 table->cache_size -= 1; in __remove_rbio_from_cache()
400 struct btrfs_stripe_hash_table *table; in remove_rbio_from_cache() local
406 table = rbio->fs_info->stripe_hash_table; in remove_rbio_from_cache()
408 spin_lock_irqsave(&table->cache_lock, flags); in remove_rbio_from_cache()
410 spin_unlock_irqrestore(&table->cache_lock, flags); in remove_rbio_from_cache()
418 struct btrfs_stripe_hash_table *table; in btrfs_clear_rbio_cache() local
422 table = info->stripe_hash_table; in btrfs_clear_rbio_cache()
424 spin_lock_irqsave(&table->cache_lock, flags); in btrfs_clear_rbio_cache()
425 while (!list_empty(&table->stripe_cache)) { in btrfs_clear_rbio_cache()
426 rbio = list_entry(table->stripe_cache.next, in btrfs_clear_rbio_cache()
431 spin_unlock_irqrestore(&table->cache_lock, flags); in btrfs_clear_rbio_cache()
460 struct btrfs_stripe_hash_table *table; in cache_rbio() local
466 table = rbio->fs_info->stripe_hash_table; in cache_rbio()
468 spin_lock_irqsave(&table->cache_lock, flags); in cache_rbio()
476 list_move(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
478 list_add(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
479 table->cache_size += 1; in cache_rbio()
484 if (table->cache_size > RBIO_CACHE_SIZE) { in cache_rbio()
487 found = list_entry(table->stripe_cache.prev, in cache_rbio()
495 spin_unlock_irqrestore(&table->cache_lock, flags); in cache_rbio()
674 h = rbio->fs_info->stripe_hash_table->table + rbio_bucket(rbio); in lock_stripe_add()
756 h = rbio->fs_info->stripe_hash_table->table + bucket; in unlock_stripe()