• Home
  • Raw
  • Download

Lines Matching full:sync

56 	rb->mem = rb->subm = rb->sync = rb->l2p_update = 0;  in pblk_rb_init()
166 unsigned int sync = READ_ONCE(rb->sync); in pblk_rb_space() local
168 return pblk_rb_ring_space(rb, mem, sync, rb->nr_entries); in pblk_rb_space()
186 unsigned int sync = READ_ONCE(rb->sync); in pblk_rb_sync_count() local
188 return pblk_rb_ring_count(mem, sync, rb->nr_entries); in pblk_rb_sync_count()
245 unsigned int mem, unsigned int sync) in pblk_rb_update_l2p() argument
272 unsigned int sync; in pblk_rb_sync_l2p() local
278 sync = smp_load_acquire(&rb->sync); in pblk_rb_sync_l2p()
280 to_update = pblk_rb_ring_count(sync, rb->l2p_update, rb->nr_entries); in pblk_rb_sync_l2p()
355 unsigned int sync, flush_point; in pblk_rb_flush_point_set() local
358 sync = READ_ONCE(rb->sync); in pblk_rb_flush_point_set()
360 if (pos == sync) { in pblk_rb_flush_point_set()
387 unsigned int sync; in __pblk_rb_may_write() local
389 sync = READ_ONCE(rb->sync); in __pblk_rb_may_write()
392 if (pblk_rb_ring_space(rb, mem, sync, rb->nr_entries) < nr_entries) in __pblk_rb_may_write()
395 if (pblk_rb_update_l2p(rb, nr_entries, mem, sync)) in __pblk_rb_may_write()
667 return rb->sync; in pblk_rb_sync_init()
683 unsigned int sync, flush_point; in pblk_rb_sync_advance() local
686 sync = READ_ONCE(rb->sync); in pblk_rb_sync_advance()
692 secs_to_flush = pblk_rb_ring_count(flush_point, sync, in pblk_rb_sync_advance()
700 sync = (sync + nr_entries) & (rb->nr_entries - 1); in pblk_rb_sync_advance()
703 smp_store_release(&rb->sync, sync); in pblk_rb_sync_advance()
705 return sync; in pblk_rb_sync_advance()
711 unsigned int subm, sync, flush_point; in pblk_rb_flush_point_count() local
720 sync = smp_load_acquire(&rb->sync); in pblk_rb_flush_point_count()
723 submitted = pblk_rb_ring_count(subm, sync, rb->nr_entries); in pblk_rb_flush_point_count()
725 /* The sync point itself counts as a sector to sync */ in pblk_rb_flush_point_count()
726 to_flush = pblk_rb_ring_count(flush_point, sync, rb->nr_entries) + 1; in pblk_rb_flush_point_count()
732 * Scan from the current position of the sync pointer to find the entry that
734 * completed out of order. The assumption is that the ppa is close to the sync
737 * The caller of this function must guarantee that the sync pointer will no
739 * assumption in mind, there is no need to take the sync lock.
744 unsigned int sync, subm, count; in pblk_rb_sync_scan_entry() local
747 sync = READ_ONCE(rb->sync); in pblk_rb_sync_scan_entry()
749 count = pblk_rb_ring_count(subm, sync, rb->nr_entries); in pblk_rb_sync_scan_entry()
752 sync = (sync + 1) & (rb->nr_entries - 1); in pblk_rb_sync_scan_entry()
766 if ((rb->mem == rb->subm) && (rb->subm == rb->sync) && in pblk_rb_tear_down_check()
767 (rb->sync == rb->l2p_update) && in pblk_rb_tear_down_check()
821 rb->sync, in pblk_rb_sysfs()
839 rb->sync, in pblk_rb_sysfs()