From 07a4f1b81df6cd9b9e09773f680fc098faed310c Mon Sep 17 00:00:00 2001 From: Yan Date: Wed, 5 Dec 2007 10:41:38 -0500 Subject: Update btrfs-progs to better match the kernel --- transaction.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'transaction.h') diff --git a/transaction.h b/transaction.h index bffd5b2b..ac026aad 100644 --- a/transaction.h +++ b/transaction.h @@ -28,8 +28,11 @@ struct btrfs_trans_handle { static inline struct btrfs_trans_handle * btrfs_start_transaction(struct btrfs_root *root, int num_blocks) { + struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_trans_handle *h = malloc(sizeof(*h)); - h->transid = root->root_key.offset; + fs_info->running_transaction = h; + fs_info->generation++; + h->transid = fs_info->generation; h->blocks_reserved = num_blocks; h->blocks_used = 0; return h; -- cgit v1.2.3