Lines Matching defs:rs
1015 metaslab_rt_add(range_tree_t *rt, range_seg_t *rs, void *arg)
1022 avl_add(&msp->ms_size_tree, rs);
1026 metaslab_rt_remove(range_tree_t *rt, range_seg_t *rs, void *arg)
1033 avl_remove(&msp->ms_size_tree, rs);
1075 range_seg_t *rs;
1077 if (t == NULL || (rs = avl_last(t)) == NULL)
1080 return (rs->rs_end - rs->rs_start);
1086 range_seg_t *rs, rsearch;
1092 rs = avl_find(t, &rsearch, &where);
1093 if (rs == NULL) {
1094 rs = avl_nearest(t, where, AVL_AFTER);
1097 return (rs);
1109 range_seg_t *rs = metaslab_block_find(t, *cursor, size);
1111 while (rs != NULL) {
1112 uint64_t offset = P2ROUNDUP(rs->rs_start, align);
1114 if (offset + size <= rs->rs_end) {
1118 rs = AVL_NEXT(t, rs);
1230 range_seg_t *rs;
1232 rs = avl_last(&msp->ms_size_tree);
1233 if (rs == NULL || (rs->rs_end - rs->rs_start) < size)
1236 *cursor = rs->rs_start;
1237 *cursor_end = rs->rs_end;
1270 range_seg_t *rs, rsearch;
1284 rs = avl_find(t, &rsearch, &where);
1285 if (rs == NULL || (rs->rs_end - rs->rs_start) < size) {
1291 rs = avl_find(t, &rsearch, &where);
1292 if (rs == NULL)
1293 rs = avl_nearest(t, where, AVL_AFTER);
1294 ASSERT(rs != NULL);
1297 if ((rs->rs_end - rs->rs_start) >= size) {
1298 *cursor = rs->rs_start + size;
1299 return (rs->rs_start);
2037 range_seg_t *rs;
2051 rs = avl_last(&msp->ms_size_tree);
2052 if (rs == NULL || msp->ms_condense_wanted)
2061 size = (rs->rs_end - rs->rs_start) >> sm->sm_shift;