key.objectid = (unsigned long)-1;
while(nr-- >= 0) {
btrfs_init_path(&path);
ret = btrfs_search_slot(trans, root, &key, &path, -1, 1);
if (ret < 0) {
key.objectid = (unsigned long)-1;
while(nr-- >= 0) {
btrfs_init_path(&path);
ret = btrfs_search_slot(trans, root, &key, &path, -1, 1);
if (ret < 0) {