Lines Matching refs:next
273 rl_t *next;
299 next = prev;
301 next = (rl_t *)avl_nearest(tree, where, AVL_AFTER);
303 if (next == NULL || off + len <= next->r_off) {
309 if (off < next->r_off) {
311 zfs_range_new_proxy(tree, off, next->r_off - off);
321 for (prev = NULL; next; prev = next, next = AVL_NEXT(tree, next)) {
322 if (off + len <= next->r_off)
324 if (prev && prev->r_off + prev->r_len < next->r_off) {
326 ASSERT3U(next->r_off, >, prev->r_off + prev->r_len);
328 next->r_off - (prev->r_off + prev->r_len));
330 if (off + len == next->r_off + next->r_len) {
332 next = zfs_range_proxify(tree, next);
333 next->r_cnt++;
336 if (off + len < next->r_off + next->r_len) {
338 next = zfs_range_split(tree, next, off + len);
339 next->r_cnt++;
342 ASSERT3U(off + len, >, next->r_off + next->r_len);
343 next = zfs_range_proxify(tree, next);
344 next->r_cnt++;
359 rl_t *prev, *next;
393 next = AVL_NEXT(tree, prev);
395 next = (rl_t *)avl_nearest(tree, where, AVL_AFTER);
396 for (; next; next = AVL_NEXT(tree, next)) {
397 if (off + len <= next->r_off)
399 if ((next->r_type == RL_WRITER) || (next->r_write_wanted)) {
400 if (!next->r_read_wanted) {
401 cv_init(&next->r_rd_cv, NULL, CV_DEFAULT, NULL);
402 next->r_read_wanted = B_TRUE;
404 cv_wait(&next->r_rd_cv, &zp->z_range_lock);
407 if (off + len <= next->r_off + next->r_len)
466 rl_t *rl, *next = NULL;
499 for (len = remove->r_len; len != 0; rl = next) {
502 next = AVL_NEXT(tree, rl);
503 ASSERT(next);
504 ASSERT(rl->r_off + rl->r_len == next->r_off);
505 ASSERT(next->r_cnt);
506 ASSERT(next->r_type == RL_READER);