if (ret != 0) {
btrfs_print_leaf(root, path->nodes[0]);
- printk("unable to update root key %Lu %u %Lu\n",
- key->objectid, key->type, key->offset);
+ printk(KERN_CRIT "unable to update root key %llu %u %llu\n",
+ (unsigned long long)key->objectid, key->type,
+ (unsigned long long)key->offset);
BUG_ON(1);
}
/*
* at mount time we want to find all the old transaction snapshots that were in
- * the process of being deleted if we crashed. This is any root item with an offset
- * lower than the latest root. They need to be queued for deletion to finish
- * what was happening when we crashed.
+ * the process of being deleted if we crashed. This is any root item with an
+ * offset lower than the latest root. They need to be queued for deletion to
+ * finish what was happening when we crashed.
*/
int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid,
struct btrfs_root *latest)
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
if (ret < 0)
goto err;
- while(1) {
+ while (1) {
leaf = path->nodes[0];
nritems = btrfs_header_nritems(leaf);
slot = path->slots[0];
ret = btrfs_search_slot(trans, root, key, path, -1, 1);
if (ret < 0)
goto out;
- if (ret) {
-btrfs_print_leaf(root, path->nodes[0]);
-printk("failed to del %Lu %u %Lu\n", key->objectid, key->type, key->offset);
- }
BUG_ON(ret != 0);
leaf = path->nodes[0];
ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item);
return ret;
}
+#if 0 /* this will get used when snapshot deletion is implemented */
int btrfs_del_root_ref(struct btrfs_trans_handle *trans,
struct btrfs_root *tree_root,
u64 root_id, u8 type, u64 ref_id)
btrfs_free_path(path);
return ret;
}
+#endif
int btrfs_find_root_ref(struct btrfs_root *tree_root,
struct btrfs_path *path,