• Home
  • Raw
  • Download

Lines Matching refs:table

52 	struct btrfs_stripe_hash table[];  member
92 struct btrfs_stripe_hash_table *table; in btrfs_alloc_stripe_hash_table() local
109 table = kvzalloc(struct_size(table, table, num_entries), GFP_KERNEL); in btrfs_alloc_stripe_hash_table()
110 if (!table) in btrfs_alloc_stripe_hash_table()
113 spin_lock_init(&table->cache_lock); in btrfs_alloc_stripe_hash_table()
114 INIT_LIST_HEAD(&table->stripe_cache); in btrfs_alloc_stripe_hash_table()
116 h = table->table; in btrfs_alloc_stripe_hash_table()
124 x = cmpxchg(&info->stripe_hash_table, NULL, table); in btrfs_alloc_stripe_hash_table()
288 struct btrfs_stripe_hash_table *table; in __remove_rbio_from_cache() local
298 table = rbio->bioc->fs_info->stripe_hash_table; in __remove_rbio_from_cache()
299 h = table->table + bucket; in __remove_rbio_from_cache()
314 table->cache_size -= 1; in __remove_rbio_from_cache()
347 struct btrfs_stripe_hash_table *table; in remove_rbio_from_cache() local
353 table = rbio->bioc->fs_info->stripe_hash_table; in remove_rbio_from_cache()
355 spin_lock_irqsave(&table->cache_lock, flags); in remove_rbio_from_cache()
357 spin_unlock_irqrestore(&table->cache_lock, flags); in remove_rbio_from_cache()
365 struct btrfs_stripe_hash_table *table; in btrfs_clear_rbio_cache() local
369 table = info->stripe_hash_table; in btrfs_clear_rbio_cache()
371 spin_lock_irqsave(&table->cache_lock, flags); in btrfs_clear_rbio_cache()
372 while (!list_empty(&table->stripe_cache)) { in btrfs_clear_rbio_cache()
373 rbio = list_entry(table->stripe_cache.next, in btrfs_clear_rbio_cache()
378 spin_unlock_irqrestore(&table->cache_lock, flags); in btrfs_clear_rbio_cache()
407 struct btrfs_stripe_hash_table *table; in cache_rbio() local
413 table = rbio->bioc->fs_info->stripe_hash_table; in cache_rbio()
415 spin_lock_irqsave(&table->cache_lock, flags); in cache_rbio()
423 list_move(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
425 list_add(&rbio->stripe_cache, &table->stripe_cache); in cache_rbio()
426 table->cache_size += 1; in cache_rbio()
431 if (table->cache_size > RBIO_CACHE_SIZE) { in cache_rbio()
434 found = list_entry(table->stripe_cache.prev, in cache_rbio()
442 spin_unlock_irqrestore(&table->cache_lock, flags); in cache_rbio()
621 h = rbio->bioc->fs_info->stripe_hash_table->table + rbio_bucket(rbio); in lock_stripe_add()
703 h = rbio->bioc->fs_info->stripe_hash_table->table + bucket; in unlock_stripe()