Displaying 7 results from an estimated 7 matches for "split_node".
2013 Jun 17
0
[PATCH] Btrfs: optimize reada_for_balance
This patch does two things. First we no longer explicitly read in the blocks
we''re trying to readahead. For things like balance_level we may never actually
use the blocks so this just adds uneeded latency, and balance_level and
split_node will both read in the blocks they care about explicitly so if the
blocks need to be waited on it will be done there. Secondly we no longer drop
the path if we do readahead, we just set the path blocking before we call
reada_for_balance() and then we''re good to go. Hopefully this will cut...
2011 Jan 28
0
[PATCH] ctree code cleanups
...or_split || ins_len > 0) && btrfs_header_nritems(b) >=
BTRFS_NODEPTRS_PER_BLOCK(root) - 3) {
- int sret;
-
- sret = reada_for_balance(root, p, level);
- if (sret)
+ ret = reada_for_balance(root, p, level);
+ if (ret)
goto again;
btrfs_set_path_blocking(p);
- sret = split_node(trans, root, p, level);
+ ret = split_node(trans, root, p, level);
btrfs_clear_path_blocking(p, NULL);
- BUG_ON(sret > 0);
- if (sret) {
- ret = sret;
+ BUG_ON(ret > 0);
+ if (ret)
goto done;
- }
b = p->nodes[level];
} else if (ins_len < 0 && btrfs_header_nr...
2010 Aug 13
1
[PATCH] btrfs: avoid duplications by moving the static int array from header to c file
...quot;print-tree.h"
#include "locking.h"
+int btrfs_super_csum_size(struct btrfs_super_block *s)
+{
+ static const int btrfs_csum_sizes[] = { 4, 0 };
+
+ int t = btrfs_super_csum_type(s);
+ BUG_ON(t >= ARRAY_SIZE(btrfs_csum_sizes));
+ return btrfs_csum_sizes[t];
+}
+
static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
*root, struct btrfs_path *path, int level);
static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e9bf864..99220ee 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ct...
2013 May 22
0
[PATCH 1/2] Btrfs: dont do log_removal in insert_new_root
...trans,
btrfs_mark_buffer_dirty(c);
old = root->node;
- tree_mod_log_set_root_pointer(root, c, log_removal);
+ tree_mod_log_set_root_pointer(root, c, 0);
rcu_assign_pointer(root->node, c);
/* the super has an extra ref to root->node */
@@ -3278,14 +3278,14 @@ static noinline int split_node(struct btrfs_trans_handle *trans,
/*
* trying to split the root, lets make a new one
*
- * tree mod log: We pass 0 as log_removal parameter to
+ * tree mod log: We don''t log_removal old root in
* insert_new_root, because that root buffer will be kept as a
* normal no...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...ate_extent_ref(trans, root, lower->start,
- lower->start, c->start,
- root->root_key.objectid,
- trans->transid, level - 1);
- BUG_ON(ret);
-
/* the super has an extra ref to root->node */
free_extent_buffer(old);
@@ -1509,12 +1552,12 @@ static int split_node(struct btrfs_trans
}
c_nritems = btrfs_header_nritems(c);
+ mid = (c_nritems + 1) / 2;
+ btrfs_node_key(c, &disk_key, mid);
- btrfs_node_key(c, &disk_key, 0);
split = btrfs_alloc_free_block(trans, root, root->nodesize,
- path->nodes[level + 1]->start,
- root->...
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance,
and I found that the bottleneck addresses in the checksum items,
especially when we want to make a random write on a large file, e.g a 4G file.
Then a idea for this suggested by Chris is to use sub transaction ids and just
to log the part of inode that had changed since either the last log commit or
the last
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all -
Here''s my current error handling patchset, against 3.1-rc8. Almost all of
this patchset is preparing for actual error handling. Before we start in
on that work, I''m trying to reduce the surface we need to worry about. It
turns out that there is a ton of code that returns an error code but never
actually reports an error.
The patchset has grown to 65 patches. 46 of them