Lines Matching refs:enr

206 static struct bm_extent *find_active_resync_extent(struct drbd_device *device, unsigned int enr)  in find_active_resync_extent()  argument
209 tmp = lc_find(device->resync, enr/AL_EXT_PER_BM_SECT); in find_active_resync_extent()
218 static struct lc_element *_al_get(struct drbd_device *device, unsigned int enr, bool nonblock) in _al_get() argument
225 bm_ext = find_active_resync_extent(device, enr); in _al_get()
234 al_ext = lc_try_get(device->act_log, enr); in _al_get()
236 al_ext = lc_get(device->act_log, enr); in _al_get()
264 unsigned enr; in drbd_al_begin_io_prepare() local
270 for (enr = first; enr <= last; enr++) { in drbd_al_begin_io_prepare()
273 (al_ext = _al_get(device, enr, false)) != NULL); in drbd_al_begin_io_prepare()
274 if (al_ext->lc_number != enr) in drbd_al_begin_io_prepare()
493 unsigned enr; in drbd_al_begin_io_nonblock() local
519 for (enr = first; enr <= last; enr++) { in drbd_al_begin_io_nonblock()
521 tmp = lc_find(device->resync, enr/AL_EXT_PER_BM_SECT); in drbd_al_begin_io_nonblock()
535 for (enr = first; enr <= last; enr++) { in drbd_al_begin_io_nonblock()
537 al_ext = lc_get_cumulative(device->act_log, enr); in drbd_al_begin_io_nonblock()
539 drbd_info(device, "LOGIC BUG for enr=%u\n", enr); in drbd_al_begin_io_nonblock()
550 unsigned enr; in drbd_al_complete_io() local
557 for (enr = first; enr <= last; enr++) { in drbd_al_complete_io()
558 extent = lc_find(device->act_log, enr); in drbd_al_complete_io()
560 drbd_err(device, "al_complete_io() called on inactive extent %u\n", enr); in drbd_al_complete_io()
652 unsigned int enr, int count, in update_rs_extent() argument
667 e = lc_find(device->resync, enr); in update_rs_extent()
669 e = lc_get(device->resync, enr); in update_rs_extent()
672 if (ext->lce.lc_number == enr) { in update_rs_extent()
692 ext->rs_left = drbd_bm_e_weight(device, enr); in update_rs_extent()
701 int rs_left = drbd_bm_e_weight(device, enr); in update_rs_extent()
706 ext->flags, enr, rs_left); in update_rs_extent()
902 struct bm_extent *_bme_get(struct drbd_device *device, unsigned int enr) in _bme_get() argument
914 e = lc_get(device->resync, enr); in _bme_get()
917 if (bm_ext->lce.lc_number != enr) { in _bme_get()
918 bm_ext->rs_left = drbd_bm_e_weight(device, enr); in _bme_get()
942 static int _is_in_al(struct drbd_device *device, unsigned int enr) in _is_in_al() argument
947 rv = lc_is_used(device->act_log, enr); in _is_in_al()
962 unsigned int enr = BM_SECT_TO_EXT(sector); in drbd_rs_begin_io() local
969 (bm_ext = _bme_get(device, enr))); in drbd_rs_begin_io()
981 !_is_in_al(device, enr * AL_EXT_PER_BM_SECT + i) || in drbd_rs_begin_io()
1014 unsigned int enr = BM_SECT_TO_EXT(sector); in drbd_try_rs_begin_io() local
1015 const unsigned int al_enr = enr*AL_EXT_PER_BM_SECT; in drbd_try_rs_begin_io()
1026 if (throttle && device->resync_wenr != enr) in drbd_try_rs_begin_io()
1030 if (device->resync_wenr != LC_FREE && device->resync_wenr != enr) { in drbd_try_rs_begin_io()
1061 e = lc_try_get(device->resync, enr); in drbd_try_rs_begin_io()
1082 e = lc_get(device->resync, enr); in drbd_try_rs_begin_io()
1092 if (bm_ext->lce.lc_number != enr) { in drbd_try_rs_begin_io()
1093 bm_ext->rs_left = drbd_bm_e_weight(device, enr); in drbd_try_rs_begin_io()
1128 device->resync_wenr = enr; in drbd_try_rs_begin_io()
1136 unsigned int enr = BM_SECT_TO_EXT(sector); in drbd_rs_complete_io() local
1142 e = lc_find(device->resync, enr); in drbd_rs_complete_io()
1155 (unsigned long long)sector, enr); in drbd_rs_complete_io()