search for: ins_len

Displaying 9 results from an estimated 9 matches for "ins_len".

Did you mean: insn_len
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...1, pslot, 1); root_sub_used(root, mid->len); @@ -2270,6 +2278,22 @@ read_block_for_search(struct btrfs_trans_handle *trans, return ret; } +static int check_nodes_need_balance(struct btrfs_root *root, + struct btrfs_path *p, + struct extent_buffer *b, + int level, int ins_len) +{ + if ((p->search_for_split || ins_len > 0) && btrfs_header_nritems(b) >= + BTRFS_NODEPTRS_PER_BLOCK(root) - 3) + return 1; + + if (ins_len < 0 && + btrfs_header_nritems(b) < BTRFS_NODEPTRS_PER_BLOCK(root) / 2) + return 1; + + return 0; +} + /* * helpe...
2011 Jan 28
0
[PATCH] ctree code cleanups
...el, int *slot) -{ - return bin_search(eb, key, level, slot); -} - static void root_add_used(struct btrfs_root *root, u32 size) { spin_lock(&root->accounting_lock); @@ -1648,38 +1642,29 @@ setup_nodes_for_search(struct btrfs_trans_handle *trans, int ret; if ((p->search_for_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, r...
2013 Aug 29
23
[PATCH] Btrfs: optimize key searches in btrfs_search_slot
...d you can find the item in the leaf @@ -2454,6 +2507,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root int write_lock_level = 0; u8 lowest_level = 0; int min_write_lock_level; + int prev_cmp; lowest_level = p->lowest_level; WARN_ON(lowest_level && ins_len > 0); @@ -2484,6 +2538,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root min_write_lock_level = write_lock_level; again: + prev_cmp = -1; /* * we try very hard to do read locks on the root */ @@ -2584,7 +2639,7 @@ cow_done: if (!cow) btrfs_unlock_...
2011 Apr 27
2
btrfs-convert crashes
...50) at inode-item.c:135 old_size = 3945 path = 0x1639aa0 key = {objectid = 37361107, type = 12 ''\f'', offset = 37359706} ref =<value optimized out> ptr =<value optimized out> ret =<value optimized out> ins_len = 27 __PRETTY_FUNCTION__ = "btrfs_insert_inode_ref" #4 0x0000000000413fff in dir_iterate_proc (dir=<value optimized out>, entry=<value optimized out>, old=0xcfa30c, offset=<value optimized out>, blocksize=<value optimized out>, buf=<value optimize...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...->nodes[0]); +out: + btrfs_free_path(path); + return ret; +} + +struct btrfs_dir_item *btrfs_lookup_orphan_dir_item(struct btrfs_trans_handle + *trans, + struct btrfs_root *root, + struct btrfs_path *path, + int mod) +{ + int ret; + struct btrfs_key key; + int ins_len = mod < 0 ? -1 : 0; + int cow = mod != 0; + struct btrfs_key found_key; + struct extent_buffer *leaf; + + key.objectid = root->inode->i_ino; + btrfs_set_key_type(&key, BTRFS_ORPHAN_DIR_ITEM_KEY); + key.offset = 0; + ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); +...
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
...of ioctl structure Changes v4-v5: - The statistic members in the ioctl are now organized as an array of 64 bit values. Symbolic names for the array indexes are defined in an enum, which also defines the max value. This change makes it easier to add new statistic members in the future - Give ins_len = -1 to btrfs_search_slot() when an item might get deleted - Introduce a helper function for the repeated sequence stat_int() + dirty = 1 + stat_print() - Introduce a helper function for the code that shares the bio bi_private member for two pieces of information The goal is to detect when d...
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead targets. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/ctree.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into
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