aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-08-07 15:52:19 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-08-07 15:52:19 -0400
commit9f3a742736cecda5a8778be70faa2f779458839f (patch)
tree500ef3701521e63254dbe82e5c71e7ccff746275 /fs/btrfs/ctree.h
parent8578f0f1fda41f8429a1037022b720275102ca65 (diff)
Btrfs: Do snapshot deletion in smaller chunks.
Before, snapshot deletion was a single atomic unit. This caused considerable lock contention and required an unbounded amount of space. Now, the drop_progress field in the root item is used to indicate how far along snapshot deletion is, and to resume where it left off. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 0287bd51d87c..73c2e75a136d 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -333,10 +333,10 @@ struct btrfs_root {
333 u64 objectid; 333 u64 objectid;
334 u64 last_trans; 334 u64 last_trans;
335 u32 blocksize; 335 u32 blocksize;
336 int ref_cows;
337 u32 type; 336 u32 type;
338 u64 highest_inode; 337 u64 highest_inode;
339 u64 last_inode_alloc; 338 u64 last_inode_alloc;
339 int ref_cows;
340}; 340};
341 341
342/* the lower bits in the key flags defines the item type */ 342/* the lower bits in the key flags defines the item type */
@@ -1073,7 +1073,7 @@ int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, struct btrfs_root
1073int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); 1073int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
1074int btrfs_leaf_free_space(struct btrfs_root *root, struct btrfs_leaf *leaf); 1074int btrfs_leaf_free_space(struct btrfs_root *root, struct btrfs_leaf *leaf);
1075int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root 1075int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root
1076 *root, struct buffer_head *snap); 1076 *root);
1077/* root-item.c */ 1077/* root-item.c */
1078int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, 1078int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
1079 struct btrfs_key *key); 1079 struct btrfs_key *key);