Lines Matching refs:counter

45  * The locks are implemented as a single object instead of as a lock counter per lock both to
77 * get_counter() - Get the zone counter for a given lock on a given zone.
83 * Return: The counter for the given lock and zone.
89 struct lock_counter *counter = &journal->lock_counter;
90 block_count_t zone_counter = (counter->locks * zone_id) + lock_number;
93 return &counter->journal_counters[zone_counter];
96 return &counter->logical_counters[zone_counter];
98 return &counter->physical_counters[zone_counter];
123 "journal zone lock counter must not underflow");
154 "decrement of lock counter must not underflow");
296 * suspend_lock_counter() - Prevent the lock counter from notifying.
297 * @counter: The counter.
299 * Return: true if the lock counter was not notifying and hence the suspend was efficacious.
301 static bool suspend_lock_counter(struct lock_counter *counter)
310 prior_state = atomic_cmpxchg(&counter->state, LOCK_COUNTER_STATE_NOT_NOTIFYING,
551 * @completion: The lock counter completion.
554 * This is the callback registered with the lock counter.
580 * initialize_lock_counter() - Initialize a lock counter.
592 struct lock_counter *counter = &journal->lock_counter;
594 result = vdo_allocate(journal->size, u16, __func__, &counter->journal_counters);
599 &counter->journal_decrement_counts);
604 &counter->logical_counters);
609 &counter->logical_zone_counts);
614 &counter->physical_counters);
619 &counter->physical_zone_counts);
623 vdo_initialize_completion(&counter->completion, vdo,
625 vdo_prepare_completion(&counter->completion, reap_recovery_journal_callback,
628 counter->logical_zones = config->logical_zone_count;
629 counter->physical_zones = config->physical_zone_count;
630 counter->locks = journal->size;
980 * initialize_lock_count() - Initialize the value of the journal zone's counter for a given lock.
1573 "increment of lock counter must not overflow");
1641 * resume_lock_counter() - Re-allow notifications from a suspended lock counter.
1642 * @counter: The counter.
1644 * Return: true if the lock counter was suspended.
1646 static bool resume_lock_counter(struct lock_counter *counter)
1655 prior_state = atomic_cmpxchg(&counter->state, LOCK_COUNTER_STATE_SUSPENDED,