search for: btrfs_key

Displaying 20 results from an estimated 77 matches for "btrfs_key".

2011 Sep 23
0
[PATCH] btrfs/delayed-inode.c: quiet sparse noise
...yed_item *item; item = kmalloc(sizeof(*item) + data_len, GFP_NOFS); @@ -380,9 +380,9 @@ static struct btrfs_delayed_item *__btrfs_lookup_delayed_item( return NULL; } -struct btrfs_delayed_item *__btrfs_lookup_delayed_insertion_item( - struct btrfs_delayed_node *delayed_node, - struct btrfs_key *key) +static struct btrfs_delayed_item * +__btrfs_lookup_delayed_insertion_item(struct btrfs_delayed_node *delayed_node, + struct btrfs_key *key) { struct btrfs_delayed_item *item; @@ -391,9 +391,9 @@ struct btrfs_delayed_item *__btrfs_lookup_delayed_insertion_item( return item; }...
2013 Aug 29
23
[PATCH] Btrfs: optimize key searches in btrfs_search_slot
...++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 5fa521b..5b20eec 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2426,6 +2426,59 @@ done: return ret; } +static int key_search(struct extent_buffer *b, struct btrfs_key *key, + int level, int *prev_cmp, int *slot) +{ + unsigned long eb_offset = 0; + unsigned long len_left = b->len; + char *kaddr = NULL; + unsigned long map_start = 0; + unsigned long map_len = 0; + unsigned long offset; + struct btrfs_disk_key *k = NULL; + struct btrfs_disk_key unaligned;...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...KEY 9 /* reserve 2-15 close to the inode for later flexibility */ /* @@ -1485,7 +1491,7 @@ int btrfs_find_dead_roots(struct btrfs_r /* dir-item.c */ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 dir, - struct btrfs_key *location, u8 type); + struct btrfs_key *location, u8 type, int index); struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, @@ -1513,6 +1519,15 @@ struct btrfs_dir_item *btrfs_lookup_xat...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...need restart the search + * from the root at some cases. At those cases, we will return -ERESTART. + * If there are other errors during the search the other negative error number + * is returned. */ -int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root - *root, struct btrfs_key *key, struct btrfs_path *p, int - ins_len, int cow) +static int __search_slot(struct btrfs_trans_handle *trans, + struct btrfs_root *root, struct extent_buffer *b, + struct btrfs_key *key, struct btrfs_path *p, + int ins_len, int cow, int lowest_unlock, + int *write_lock_level, i...
2013 Nov 12
0
[PATCH] Btrfs: incompatible format change to remove hole extents V4
...andle *trans, struct btrfs_root *root, * This may release the path, and so you may lose any locks held at the * time you call it. */ -static int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path) +int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path) { struct btrfs_key key; struct btrfs_disk_key found_key; diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 9f5e1cf..0484a31 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -521,6 +521,7 @@ struct btrfs_super_block { #define BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF (1ULL << 6) #define BTRFS_FEATURE_...
2011 Jun 29
14
[PATCH v4 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the csums takes most of the time. Also the initial build-ups of free-space-caches and
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...ions(+), 10 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index 668af15..268cc64 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -119,6 +119,12 @@ struct inode_backref { char name[0]; }; +struct dropping_root_item_record { + struct list_head list; + struct btrfs_root_item ri; + struct btrfs_key found_key; +}; + #define REF_ERR_NO_DIR_ITEM (1 << 0) #define REF_ERR_NO_DIR_INDEX (1 << 1) #define REF_ERR_NO_INODE_REF (1 << 2) @@ -3600,6 +3606,21 @@ static int check_csums(struct btrfs_root *root) return errors; } +static int is_dropped_key(struct btrfs_key *key, +...
2011 Jun 10
6
[PATCH v2 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the csums takes most of the time. Also the initial build-ups of free-space-caches and
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply
2011 Jan 28
0
[PATCH] ctree code cleanups
...ex 9ac1715..69f71e8 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -928,7 +928,7 @@ static noinline int generic_bin_search(struct extent_buffer *eb, * simple bin_search frontend that does the right thing for * leaves vs nodes */ -static int bin_search(struct extent_buffer *eb, struct btrfs_key *key, +int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key, int level, int *slot) { if (level == 0) { @@ -947,12 +947,6 @@ static int bin_search(struct extent_buffer *eb, struct btrfs_key *key, return -1; } -int btrfs_bin_search(struct extent_buffer *eb, struct btrf...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...>slots[0] < push_items) { path->slots[0] += old_left_nritems; @@ -1931,34 +1962,96 @@ static int push_leaf_left(struct btrfs_t * * returns 0 if all went well and < 0 on failure. */ -static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root - *root, struct btrfs_key *ins_key, - struct btrfs_path *path, int data_size, int extend) +static noinline int copy_for_split(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + struct btrfs_path *path, + struct extent_buffer *l, + struct extent_buffer *right, +...
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...e.c --- a/fs/btrfs/extent-tree.c 2012-05-21 18:42:51.000000000 +0000 +++ b/fs/btrfs/extent-tree.c 2012-05-27 19:12:16.865575580 +0000 @@ -86,11 +86,21 @@ static int alloc_reserved_file_extent(st u64 parent, u64 root_objectid, u64 flags, u64 owner, u64 offset, struct btrfs_key *ins, int ref_mod); +static int alloc_reserved_file_extent_cater(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + u64 parent, u64 root_objectid, + u64 flags, u64 owner, u64 offset, + struct btrfs_key *ins, int ref_mod, u8 cater); static int alloc_r...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...t btrfs_update_pinned_extents(struct b u64 bytenr, u64 num, int pin); int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *leaf); -int btrfs_cross_ref_exists(struct btrfs_trans_handle *trans, - struct btrfs_root *root, - struct btrfs_key *key, u64 bytenr); +int btrfs_cross_ref_exist(struct btrfs_trans_handle *trans, + struct btrfs_root *root, u64 bytenr); int btrfs_extent_post_op(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_copy_pinned(struct btrfs_root *root, struct extent_io_tree *copy); diff -...
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found the very last bug in my current scrub patch series: Changelog v4->v5: - fixed a deadlock when fixup is taking longer while scrub is about to end Original message follows: ------------------------ This patch set introduces two new features for scrub. They share the backref iteration code which is the
2011 Oct 04
3
[PATCH] Btrfs: break out of orphan cleanup if we can't make progress V2
...rly fs/btrfs/inode.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 446531a..595a807 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2230,6 +2230,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) struct btrfs_key key, found_key; struct btrfs_trans_handle *trans; struct inode *inode; + u64 last_objectid = 0; int ret = 0, nr_unlink = 0, nr_truncate = 0; if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN_CLEANUP_STARTED)) @@ -2281,6 +2282,16 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)...
2008 Aug 28
0
[PATCH] btrfs: cleanup d_obtain_alias useage
...==================== --- btrfs-unstable.orig/export.c 2008-08-28 19:56:13.000000000 -0300 +++ btrfs-unstable/export.c 2008-08-28 19:57:04.000000000 -0300 @@ -68,7 +68,6 @@ static struct dentry *btrfs_get_dentry(s { struct btrfs_root *root; struct inode *inode; - struct dentry *result; struct btrfs_key key; key.objectid = root_objectid; @@ -92,11 +91,7 @@ static struct dentry *btrfs_get_dentry(s return ERR_PTR(-ESTALE); } - result = d_obtain_alias(inode); - if (!result) - return ERR_PTR(-ENOMEM); - - return result; + return d_obtain_alias(inode); } static struct dentry *btrfs_fh_t...
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...= 0; - u64 orig_locked_end = locked_end; - u8 compression; - u8 encryption; - u16 other_encoding = 0; + struct btrfs_root *root = BTRFS_I(inode)->root; struct extent_buffer *leaf; - struct btrfs_file_extent_item *extent; + struct btrfs_file_extent_item *fi; struct btrfs_path *path; struct btrfs_key key; - struct btrfs_file_extent_item old; - int keep; - int slot; - int bookend; - int found_type = 0; - int found_extent; - int found_inline; + struct btrfs_key new_key; + u64 search_start = start; + u64 disk_bytenr = 0; + u64 num_bytes = 0; + u64 extent_offset = 0; + u64 extent_end = 0; + int del...
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
2010 Jul 29
1
[Bug] check return of kmalloc()
...b, di); - name = kmalloc(name_len, GFP_NOFS); log_type = btrfs_dir_type(eb, di); read_extent_buffer(eb, name, (unsigned long)(di + 1), name_len); @@ -2605,8 +2599,6 @@ static noinline int copy_items(struct bt INIT_LIST_HEAD(&ordered_sums); - ins_data = kmalloc(nr * sizeof(struct btrfs_key) + - nr * sizeof(u32), GFP_NOFS); ins_sizes = (u32 *)ins_data; ins_keys = (struct btrfs_key *)(ins_data + nr * sizeof(u32)); --- ./fs/btrfs/file.c 2010-07-09 15:55:34.000000000 +0400 +++ /tmp/cocci-output-7826-b84666-file.c 2010-07-28 18:43:13.000000000 +0400 @@ -925,7 +925,6 @@ static s...
2013 Jan 07
3
[PATCH] btrfs: add "no file data" flag to btrfs send ioctl
..._PUT_U64(sctx, BTRFS_SEND_A_FILE_OFFSET, offset); + TLV_PUT_U64(sctx, BTRFS_SEND_A_SIZE, len); + + ret = send_cmd(sctx); + +tlv_put_failure: +out: + fs_path_free(sctx, p); + return ret; +} + static int send_write_or_clone(struct send_ctx *sctx, struct btrfs_path *path, struct btrfs_key *key, @@ -3742,7 +3776,11 @@ static int send_write_or_clone(struct send_ctx *sctx, goto out; } - if (!clone_root) { + if (clone_root) { + ret = send_clone(sctx, offset, len, clone_root); + } else if (sctx->flags & BTRFS_SEND_FLAG_NO_FILE_DATA) { + ret = send_update_extent(sctx, offs...