Home
last modified time | relevance | path

Searched refs:num_locks (Results 1 – 15 of 15) sorted by relevance

/Linux-v6.6/drivers/md/
Ddm-bio-prison-v1.c28 unsigned int num_locks; member
43 unsigned int i, num_locks; in dm_bio_prison_create() local
46 num_locks = dm_num_hash_locks(); in dm_bio_prison_create()
47 prison = kzalloc(struct_size(prison, regions, num_locks), GFP_KERNEL); in dm_bio_prison_create()
50 prison->num_locks = num_locks; in dm_bio_prison_create()
52 for (i = 0; i < prison->num_locks; i++) { in dm_bio_prison_create()
120 static inline unsigned int lock_nr(struct dm_cell_key *key, unsigned int num_locks) in lock_nr() argument
123 num_locks); in lock_nr()
182 unsigned l = lock_nr(key, prison->num_locks); in bio_detain()
230 unsigned l = lock_nr(&cell->key, prison->num_locks); in dm_cell_release()
[all …]
Ddm.h233 unsigned int num_locks = roundup_pow_of_two(num_online_cpus()) << 1; in dm_num_hash_locks() local
235 return min_t(unsigned int, num_locks, DM_HASH_LOCKS_MAX); in dm_num_hash_locks()
242 unsigned int num_locks) in dm_hash_locks_index() argument
247 return (h1 ^ h2) & (num_locks - 1); in dm_hash_locks_index()
Ddm-bufio.c395 unsigned int num_locks; member
399 static inline unsigned int cache_index(sector_t block, unsigned int num_locks) in cache_index() argument
401 return dm_hash_locks_index(block, num_locks); in cache_index()
406 down_read(&bc->trees[cache_index(block, bc->num_locks)].lock); in cache_read_lock()
411 up_read(&bc->trees[cache_index(block, bc->num_locks)].lock); in cache_read_unlock()
416 down_write(&bc->trees[cache_index(block, bc->num_locks)].lock); in cache_write_lock()
421 up_write(&bc->trees[cache_index(block, bc->num_locks)].lock); in cache_write_unlock()
439 lh->no_previous = cache->num_locks; in lh_init()
505 static void cache_init(struct dm_buffer_cache *bc, unsigned int num_locks) in cache_init() argument
509 bc->num_locks = num_locks; in cache_init()
[all …]
/Linux-v6.6/drivers/hwspinlock/
Domap_hwspinlock.c81 int num_locks, i, ret; in omap_hwspinlock_probe() local
119 num_locks = i * 32; /* actual number of locks in this device */ in omap_hwspinlock_probe()
121 bank = devm_kzalloc(&pdev->dev, struct_size(bank, lock, num_locks), in omap_hwspinlock_probe()
130 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in omap_hwspinlock_probe()
134 base_id, num_locks); in omap_hwspinlock_probe()
139 num_locks); in omap_hwspinlock_probe()
Du8500_hsem.c91 int i, num_locks = U8500_MAX_SEMAPHORE; in u8500_hsem_probe() local
108 bank = devm_kzalloc(&pdev->dev, struct_size(bank, lock, num_locks), in u8500_hsem_probe()
115 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in u8500_hsem_probe()
120 pdata->base_id, num_locks); in u8500_hsem_probe()
Dhwspinlock_core.c380 if (id < 0 || id >= hwlock->bank->num_locks) { in of_hwspin_lock_get_id()
487 const struct hwspinlock_ops *ops, int base_id, int num_locks) in hwspin_lock_register() argument
492 if (!bank || !ops || !dev || !num_locks || !ops->trylock || in hwspin_lock_register()
501 bank->num_locks = num_locks; in hwspin_lock_register()
503 for (i = 0; i < num_locks; i++) { in hwspin_lock_register()
539 for (i = 0; i < bank->num_locks; i++) { in hwspin_lock_unregister()
615 int base_id, int num_locks) in devm_hwspin_lock_register() argument
624 ret = hwspin_lock_register(bank, dev, ops, base_id, num_locks); in devm_hwspin_lock_register()
Dhwspinlock_internal.h58 int num_locks; member
/Linux-v6.6/include/linux/
Dhwspinlock.h59 const struct hwspinlock_ops *ops, int base_id, int num_locks);
80 int base_id, int num_locks);
/Linux-v6.6/fs/ocfs2/dlm/
Ddlmrecovery.c1107 BUG_ON(mres->num_locks > DLM_MAX_MIGRATABLE_LOCKS); in dlm_send_mig_lockres_msg()
1108 if (!mres->num_locks) in dlm_send_mig_lockres_msg()
1124 struct_size(mres, ml, mres->num_locks), in dlm_send_mig_lockres_msg()
1164 mres->num_locks = 0; in dlm_init_migratable_lockres()
1211 int lock_num = mres->num_locks; in dlm_add_lock_to_array()
1224 mres->num_locks++; in dlm_add_lock_to_array()
1226 if (mres->num_locks == DLM_MAX_MIGRATABLE_LOCKS) in dlm_add_lock_to_array()
1802 mlog(0, "running %d locks for this lockres\n", mres->num_locks); in dlm_process_recovery_data()
1803 for (i=0; i<mres->num_locks; i++) { in dlm_process_recovery_data()
1808 BUG_ON(mres->num_locks != 1); in dlm_process_recovery_data()
Ddlmcommon.h552 u8 num_locks; // locks sent in this structure member
/Linux-v6.6/Documentation/locking/
Dhwspinlock.rst398 const struct hwspinlock_ops *ops, int base_id, int num_locks);
434 * @num_locks: number of locks in this device
441 int num_locks;
/Linux-v6.6/fs/smb/client/
Dsmb1ops.c662 atomic_set(&tcon->stats.cifs_stats.num_locks, 0); in cifs_clear_stats()
681 atomic_read(&tcon->stats.cifs_stats.num_locks), in cifs_print_stats()
Dcifsglob.h1166 atomic_t num_locks; member
Dcifssmb.c1883 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in cifs_lockv()
1953 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in CIFSSMBLock()
Dsmb2pdu.c5602 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in smb2_lockv()