Lines Matching refs:table
133 struct btrfs_stripe_hash table[]; member
202 struct btrfs_stripe_hash_table *table; in btrfs_alloc_stripe_hash_table() local
218 table = kvzalloc(struct_size(table, table, num_entries), GFP_KERNEL); in btrfs_alloc_stripe_hash_table()
219 if (!table) in btrfs_alloc_stripe_hash_table()
222 spin_lock_init(&table->cache_lock); in btrfs_alloc_stripe_hash_table()
223 INIT_LIST_HEAD(&table->stripe_cache); in btrfs_alloc_stripe_hash_table()
225 h = table->table; in btrfs_alloc_stripe_hash_table()
233 x = cmpxchg(&info->stripe_hash_table, NULL, table); in btrfs_alloc_stripe_hash_table()
438 struct btrfs_stripe_hash_table *table; in __remove_rbio_from_cache() local
448 table = rbio->bioc->fs_info->stripe_hash_table; in __remove_rbio_from_cache()
449 h = table->table + bucket; in __remove_rbio_from_cache()
464 table->cache_size -= 1; in __remove_rbio_from_cache()
497 struct btrfs_stripe_hash_table *table; in remove_rbio_from_cache() local
502 table = rbio->bioc->fs_info->stripe_hash_table; in remove_rbio_from_cache()
504 spin_lock(&table->cache_lock); in remove_rbio_from_cache()
506 spin_unlock(&table->cache_lock); in remove_rbio_from_cache()
514 struct btrfs_stripe_hash_table *table; in btrfs_clear_rbio_cache() local
517 table = info->stripe_hash_table; in btrfs_clear_rbio_cache()
519 spin_lock(&table->cache_lock); in btrfs_clear_rbio_cache()
520 while (!list_empty(&table->stripe_cache)) { in btrfs_clear_rbio_cache()
521 rbio = list_first_entry(&table->stripe_cache, in btrfs_clear_rbio_cache()
525 spin_unlock(&table->cache_lock); in btrfs_clear_rbio_cache()
554 struct btrfs_stripe_hash_table *table; in cache_rbio() local
559 table = rbio->bioc->fs_info->stripe_hash_table; in cache_rbio()
561 spin_lock(&table->cache_lock); in cache_rbio()
569 list_move(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
571 list_add(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
572 table->cache_size += 1; in cache_rbio()
577 if (table->cache_size > RBIO_CACHE_SIZE) { in cache_rbio()
580 found = list_last_entry(&table->stripe_cache, in cache_rbio()
588 spin_unlock(&table->cache_lock); in cache_rbio()
746 h = rbio->bioc->fs_info->stripe_hash_table->table + rbio_bucket(rbio); in lock_stripe_add()
829 h = rbio->bioc->fs_info->stripe_hash_table->table + bucket; in unlock_stripe()