Lines Matching full:resync

209 	tmp = lc_find(device->resync, enr/AL_EXT_PER_BM_SECT);  in find_active_resync_extent()
500 /* Is resync active in this area? */ in drbd_al_begin_io_nonblock()
503 tmp = lc_find(device->resync, enr/AL_EXT_PER_BM_SECT); in drbd_al_begin_io_nonblock()
632 * resync LRU-cache are 16MB each.
637 * this resync extent into the resync extent lru cache.
639 * Returns whether all bits have been cleared for this resync extent,
656 * Otherwise, that extent should be in the resync extent lru cache in update_rs_extent()
660 e = lc_find(device->resync, enr); in update_rs_extent()
662 e = lc_get(device->resync, enr); in update_rs_extent()
682 * Whatever the reason (disconnect during resync, in update_rs_extent()
692 * something outside the resync lru_cache in sync. in update_rs_extent()
696 drbd_warn(device, "changing resync lce: %d[%u;%02lx]" in update_rs_extent()
709 /* we don't keep a persistent log of the resync lru, in update_rs_extent()
711 lc_committed(device->resync); in update_rs_extent()
714 lc_put(device->resync, &ext->lce); in update_rs_extent()
725 device->resync->nr_elements, in update_rs_extent()
726 device->resync->flags); in update_rs_extent()
764 * to avoid uuids-rotated-too-fast causing full resync in maybe_schedule_on_disk_bitmap_update()
778 * We keep a count of set bits per resync-extent in the ->rs_left in update_sync_bits()
779 * caching member, so we need to loop and work within the resync extent in update_sync_bits()
787 * the resync extent of the current start bit number, in update_sync_bits()
884 /* We set it out of sync, or record resync failure. in __drbd_change_sync()
905 if (device->resync_locked > device->resync->nr_elements/2) { in _bme_get()
909 e = lc_get(device->resync, enr); in _bme_get()
915 lc_committed(device->resync); in _bme_get()
922 rs_flags = device->resync->flags; in _bme_get()
930 " (resync LRU too small?)\n"); in _bme_get()
949 * drbd_rs_begin_io() - Gets an extent in the resync LRU cache and sets it to BME_LOCKED
983 if (lc_put(device->resync, &bm_ext->lce) == 0) { in drbd_rs_begin_io()
1001 * drbd_try_rs_begin_io() - Gets an extent in the resync LRU cache, does not sleep
1005 * Gets an extent in the resync LRU cache, sets it to BME_NO_WRITES, then
1044 e = lc_find(device->resync, device->resync_wenr); in drbd_try_rs_begin_io()
1051 if (lc_put(device->resync, &bm_ext->lce) == 0) { in drbd_try_rs_begin_io()
1061 e = lc_try_get(device->resync, enr); in drbd_try_rs_begin_io()
1079 if (device->resync_locked > device->resync->nr_elements-3) in drbd_try_rs_begin_io()
1082 e = lc_get(device->resync, enr); in drbd_try_rs_begin_io()
1085 const unsigned long rs_flags = device->resync->flags; in drbd_try_rs_begin_io()
1088 " (resync LRU too small?)\n"); in drbd_try_rs_begin_io()
1095 lc_committed(device->resync); in drbd_try_rs_begin_io()
1122 if (lc_put(device->resync, &bm_ext->lce) == 0) { in drbd_try_rs_begin_io()
1142 e = lc_find(device->resync, enr); in drbd_rs_complete_io()
1159 if (lc_put(device->resync, &bm_ext->lce) == 0) { in drbd_rs_complete_io()
1169 * drbd_rs_cancel_all() - Removes all extents from the resync LRU (even BME_LOCKED)
1176 if (get_ldev_if_state(device, D_FAILED)) { /* Makes sure ->resync is there. */ in drbd_rs_cancel_all()
1177 lc_reset(device->resync); in drbd_rs_cancel_all()
1187 * drbd_rs_del_all() - Gracefully remove all extents from the resync LRU
1202 /* ok, ->resync is there. */ in drbd_rs_del_all()
1203 for (i = 0; i < device->resync->nr_elements; i++) { in drbd_rs_del_all()
1204 e = lc_element_by_index(device->resync, i); in drbd_rs_del_all()
1216 lc_put(device->resync, &bm_ext->lce); in drbd_rs_del_all()
1227 lc_del(device->resync, &bm_ext->lce); in drbd_rs_del_all()
1229 D_ASSERT(device, device->resync->used == 0); in drbd_rs_del_all()