• Home
  • Raw
  • Download

Lines Matching refs:table

51 	struct btrfs_stripe_hash table[];  member
203 struct btrfs_stripe_hash_table *table; in btrfs_alloc_stripe_hash_table() local
221 table_size = sizeof(*table) + sizeof(*h) * num_entries; in btrfs_alloc_stripe_hash_table()
222 table = kvzalloc(table_size, GFP_KERNEL); in btrfs_alloc_stripe_hash_table()
223 if (!table) in btrfs_alloc_stripe_hash_table()
226 spin_lock_init(&table->cache_lock); in btrfs_alloc_stripe_hash_table()
227 INIT_LIST_HEAD(&table->stripe_cache); in btrfs_alloc_stripe_hash_table()
229 h = table->table; in btrfs_alloc_stripe_hash_table()
237 x = cmpxchg(&info->stripe_hash_table, NULL, table); in btrfs_alloc_stripe_hash_table()
348 struct btrfs_stripe_hash_table *table; in __remove_rbio_from_cache() local
358 table = rbio->fs_info->stripe_hash_table; in __remove_rbio_from_cache()
359 h = table->table + bucket; in __remove_rbio_from_cache()
374 table->cache_size -= 1; in __remove_rbio_from_cache()
407 struct btrfs_stripe_hash_table *table; in remove_rbio_from_cache() local
413 table = rbio->fs_info->stripe_hash_table; in remove_rbio_from_cache()
415 spin_lock_irqsave(&table->cache_lock, flags); in remove_rbio_from_cache()
417 spin_unlock_irqrestore(&table->cache_lock, flags); in remove_rbio_from_cache()
425 struct btrfs_stripe_hash_table *table; in btrfs_clear_rbio_cache() local
429 table = info->stripe_hash_table; in btrfs_clear_rbio_cache()
431 spin_lock_irqsave(&table->cache_lock, flags); in btrfs_clear_rbio_cache()
432 while (!list_empty(&table->stripe_cache)) { in btrfs_clear_rbio_cache()
433 rbio = list_entry(table->stripe_cache.next, in btrfs_clear_rbio_cache()
438 spin_unlock_irqrestore(&table->cache_lock, flags); in btrfs_clear_rbio_cache()
467 struct btrfs_stripe_hash_table *table; in cache_rbio() local
473 table = rbio->fs_info->stripe_hash_table; in cache_rbio()
475 spin_lock_irqsave(&table->cache_lock, flags); in cache_rbio()
483 list_move(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
485 list_add(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
486 table->cache_size += 1; in cache_rbio()
491 if (table->cache_size > RBIO_CACHE_SIZE) { in cache_rbio()
494 found = list_entry(table->stripe_cache.prev, in cache_rbio()
502 spin_unlock_irqrestore(&table->cache_lock, flags); in cache_rbio()
675 struct btrfs_stripe_hash *h = rbio->fs_info->stripe_hash_table->table + bucket; in lock_stripe_add()
766 h = rbio->fs_info->stripe_hash_table->table + bucket; in unlock_stripe()