diff options
author | Yan <yanzheng@21cn.com> | 2007-12-05 10:41:38 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-12-05 10:41:38 -0500 |
commit | 07a4f1b81df6cd9b9e09773f680fc098faed310c (patch) | |
tree | 3543dcbdbe4fd1c153f468d2976bcebc34b72ae7 /transaction.h | |
parent | 1c2b38fe25fe6496d51d41aee7a5a1eb2e2694d8 (diff) | |
download | btrfs-progs-07a4f1b81df6cd9b9e09773f680fc098faed310c.tar.gz |
Update btrfs-progs to better match the kernel
Diffstat (limited to 'transaction.h')
-rw-r--r-- | transaction.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/transaction.h b/transaction.h index bffd5b2..ac026aa 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; |