ASSERTF(s == start[2] && e == end[2],
"s: %"PRIu64", e: %"PRIu64"", s, e);
- rc = llapi_layout_comp_move(layout, LLAPI_LAYOUT_COMP_POS_FIRST);
+ rc = llapi_layout_comp_use(layout, LLAPI_LAYOUT_COMP_USE_FIRST);
ASSERTF(rc == 0, "rc %d, errno %d", rc, errno);
/* delete non-tail component will fail */
ASSERTF(s == start[0] && e == end[0],
"s: %"PRIu64", e: %"PRIu64"", s, e);
- rc = llapi_layout_comp_move(layout, LLAPI_LAYOUT_COMP_POS_NEXT);
+ rc = llapi_layout_comp_use(layout, LLAPI_LAYOUT_COMP_USE_NEXT);
ASSERTF(rc == 0, "rc %d, errno %d", rc, errno);
rc = llapi_layout_comp_extent_get(layout, &s, &e);
ASSERTF(s == start[1] && e == end[1],
"s: %"PRIu64", e: %"PRIu64"", s, e);
- rc = llapi_layout_comp_move(layout, LLAPI_LAYOUT_COMP_POS_NEXT);
+ rc = llapi_layout_comp_use(layout, LLAPI_LAYOUT_COMP_USE_NEXT);
ASSERTF(rc == 0, "rc %d, errno %d", rc, errno);
rc = llapi_layout_comp_del(layout);
layout = llapi_layout_get_by_path(path, 0);
ASSERTF(layout != NULL, "errno = %d", errno);
- rc = llapi_layout_comp_move(layout, LLAPI_LAYOUT_COMP_POS_FIRST);
+ rc = llapi_layout_comp_use(layout, LLAPI_LAYOUT_COMP_USE_FIRST);
ASSERTF(rc == 0, "rc %d, errno %d", rc, errno);
i = 0;
do {
ASSERTF(rc == 0 && id[i] != 0, "i %d, errno %d, id %d",
i, errno, id[i]);
- rc = llapi_layout_comp_move(layout, LLAPI_LAYOUT_COMP_POS_NEXT);
- ASSERTF(rc >= 0, "i %d, rc %d, errno %d", i, rc, errno);
-
+ rc = llapi_layout_comp_use(layout, LLAPI_LAYOUT_COMP_USE_NEXT);
+ ASSERTF(rc == 0 || i == 1, "i=%d rc=%d errno=%d", i, rc, errno);
i++;
} while (rc == 0);
layout = llapi_layout_get_by_path(path, 0);
ASSERTF(layout != NULL, "errno = %d", errno);
- rc = llapi_layout_comp_move(layout, LLAPI_LAYOUT_COMP_POS_FIRST);
+ rc = llapi_layout_comp_use(layout, LLAPI_LAYOUT_COMP_USE_FIRST);
ASSERTF(rc == 0, "rc %d, errno %d", rc, errno);
rc = llapi_layout_comp_extent_get(layout, &s, &e);