search for: btrfs_root_last_snapshot

Displaying 4 results from an estimated 4 matches for "btrfs_root_last_snapshot".

2013 Jun 04
3
[PATCH] Btrfs: fix broken nocow after balance
...d24c26c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2856,10 +2856,6 @@ static noinline int check_committed_ref(struct btrfs_trans_handle *trans, btrfs_extent_inline_ref_size(BTRFS_EXTENT_DATA_REF_KEY)) goto out; - if (btrfs_extent_generation(leaf, ei) <= - btrfs_root_last_snapshot(&root->root_item)) - goto out; - iref = (struct btrfs_extent_inline_ref *)(ei + 1); if (btrfs_extent_inline_ref_type(leaf, iref) != BTRFS_EXTENT_DATA_REF_KEY) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 23c596c..0dc5c7d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); if (found_key.objectid != bytenr || - found_key.type != BTRFS_EXTENT_ITEM_KEY) { - ret = 1; + found_key.type != BTRFS_EXTENT_ITEM_KEY) goto out; - } - - *ref_count = 0; - *min_generation = (u64)-1; + last_snapshot = btrfs_root_last_snapshot(&root->root_item); while (1) { leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); @@ -910,114 +907,22 @@ static int get_reference_status(struct b ref_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref); - ref_generation = btrfs_ref_gener...
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
We''re going to use this flag EXTENT_DEFRAG to indicate which range belongs to defragment so that we can implement snapshow-aware defrag: We set the EXTENT_DEFRAG flag when dirtying the extents that need defragmented, so later on writeback thread can differentiate between normal writeback and writeback started by defragmentation. This patch is used for the latter one. Originally patch
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...- different_trans = 1; - ret = btrfs_inc_ref(trans, root, buf, cow, NULL); - if (ret) - return ret; - } else { - ret = btrfs_update_ref(trans, root, buf, cow, 0, nritems); - if (ret) - return ret; + + if (root->ref_cows && buf != root->node && + (generation <= btrfs_root_last_snapshot(&root->root_item) || + btrfs_header_flag(buf, BTRFS_HEADER_FLAG_RELOC))) + __btrfs_update_ref(trans, root, buf, cow); + else clean_tree_block(trans, root, buf); - } if (buf == root->node) { root->node = cow; extent_buffer_get(cow); - if (buf != root->commit_root)...