Switch open_exec() and sys_uselib() to do_open_filp()
[safe/jmp/linux-2.6] / fs / btrfs / transaction.h
index eef2cb7..94f5bde 100644 (file)
 #ifndef __BTRFS_TRANSACTION__
 #define __BTRFS_TRANSACTION__
 #include "btrfs_inode.h"
+#include "delayed-ref.h"
 
 struct btrfs_transaction {
        u64 transid;
+       /*
+        * total writers in this transaction, it must be zero before the
+        * transaction can end
+        */
        unsigned long num_writers;
+
        unsigned long num_joined;
        int in_commit;
        int use_count;
@@ -34,6 +40,7 @@ struct btrfs_transaction {
        wait_queue_head_t writer_wait;
        wait_queue_head_t commit_wait;
        struct list_head pending_snapshots;
+       struct btrfs_delayed_ref_root delayed_refs;
 };
 
 struct btrfs_trans_handle {
@@ -41,14 +48,17 @@ struct btrfs_trans_handle {
        unsigned long blocks_reserved;
        unsigned long blocks_used;
        struct btrfs_transaction *transaction;
-       struct btrfs_block_group_cache *block_group;
+       u64 block_group;
        u64 alloc_exclude_start;
        u64 alloc_exclude_nr;
+       unsigned long delayed_ref_updates;
 };
 
 struct btrfs_pending_snapshot {
+       struct dentry *dentry;
        struct btrfs_root *root;
        char *name;
+       struct btrfs_key root_key;
        struct list_head list;
 };
 
@@ -64,9 +74,9 @@ static inline void btrfs_set_trans_block_group(struct btrfs_trans_handle *trans,
        trans->block_group = BTRFS_I(inode)->block_group;
 }
 
-static inline void btrfs_update_inode_block_group(struct
-                                                 btrfs_trans_handle *trans,
-                                                 struct inode *inode)
+static inline void btrfs_update_inode_block_group(
+                                         struct btrfs_trans_handle *trans,
+                                         struct inode *inode)
 {
        BTRFS_I(inode)->block_group = trans->block_group;
 }