]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - cmd_migrate.c
Add a subcommand for resizing the journal
[bcachefs-tools-debian] / cmd_migrate.c
index 14532b6a2e6503dd8f2e408066b219a76735cf2e..42fbc2bc5feabb60b4907bff80941600c4dbee2b 100644 (file)
@@ -122,7 +122,7 @@ static void update_inode(struct bch_fs *c,
        struct bkey_inode_buf packed;
        int ret;
 
-       bch2_inode_pack(&packed, inode);
+       bch2_inode_pack(c, &packed, inode);
        ret = bch2_btree_insert(c, BTREE_ID_INODES, &packed.inode.k_i,
                                NULL, NULL, 0);
        if (ret)
@@ -137,7 +137,7 @@ static void create_link(struct bch_fs *c,
        struct bch_inode_unpacked parent_u;
        struct bch_inode_unpacked inode;
 
-       int ret = bch2_trans_do(c, NULL, BTREE_INSERT_ATOMIC,
+       int ret = bch2_trans_do(c, NULL, NULL, 0,
                bch2_link_trans(&trans, parent->bi_inum, inum,
                                &parent_u, &inode, &qstr));
        if (ret)
@@ -153,7 +153,7 @@ static struct bch_inode_unpacked create_file(struct bch_fs *c,
        struct qstr qstr = QSTR(name);
        struct bch_inode_unpacked new_inode;
 
-       int ret = bch2_trans_do(c, NULL, BTREE_INSERT_ATOMIC,
+       int ret = bch2_trans_do(c, NULL, NULL, 0,
                bch2_create_trans(&trans,
                                  parent->bi_inum, parent,
                                  &new_inode, &qstr,
@@ -224,7 +224,7 @@ static void copy_xattrs(struct bch_fs *c, struct bch_inode_unpacked *dst,
 
                const struct xattr_handler *h = xattr_resolve_name(&attr);
 
-               int ret = bch2_trans_do(c, NULL, BTREE_INSERT_ATOMIC,
+               int ret = bch2_trans_do(c, NULL, NULL, 0,
                                bch2_xattr_set(&trans, dst->bi_inum, &hash_info, attr,
                                               val, val_size, h->flags, 0));
                if (ret < 0)
@@ -596,8 +596,7 @@ static void copy_fs(struct bch_fs *c, int src_fd, const char *src_path,
        darray_free(s.extents);
        genradix_free(&s.hardlinks);
 
-       bool wrote;
-       bch2_alloc_write(c, false, &wrote);
+       bch2_alloc_write(c, false);
 }
 
 static void find_superblock_space(ranges extents, struct dev_opts *dev)