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)
const char *name, u64 inum, mode_t mode)
{
struct qstr qstr = QSTR(name);
+ struct bch_inode_unpacked parent_u;
struct bch_inode_unpacked inode;
- int ret = bch2_trans_do(c, NULL, BTREE_INSERT_ATOMIC,
- bch2_link_trans(&trans, parent->bi_inum,
- inum, &inode, &qstr));
+ int ret = bch2_trans_do(c, NULL, NULL, 0,
+ bch2_link_trans(&trans, parent->bi_inum, inum,
+ &parent_u, &inode, &qstr));
if (ret)
die("error creating hardlink: %s", strerror(-ret));
}
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,
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)
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)