Btrfs: fix wrong device bytes_used in the super block
[linux-2.6-block.git] / fs / btrfs / volumes.h
index b30d018fa3594c28ba2ff4dbbf8ac47b4e050f77..f79d532fedb059801a8f96043bb96b1a300cd7e6 100644 (file)
@@ -95,6 +95,8 @@ struct btrfs_device {
         */
        u64 commit_total_bytes;
 
+       /* bytes used on the current transaction */
+       u64 commit_bytes_used;
        /*
         * used to manage the device which is resized
         *
@@ -420,4 +422,6 @@ static inline void btrfs_dev_stat_reset(struct btrfs_device *dev,
 }
 
 void btrfs_update_commit_device_size(struct btrfs_fs_info *fs_info);
+void btrfs_update_commit_device_bytes_used(struct btrfs_root *root,
+                                       struct btrfs_transaction *transaction);
 #endif