Displaying 10 results from an estimated 10 matches for "cache_tree".
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...t;fd);
posix_fadvise(device->fd, 0, 0, POSIX_FADV_DONTNEED);
}
close(device->fd);
+ kfree(device->name);
+ kfree(device->label);
+ kfree(device);
}
+ kfree(fs_info->fs_devices);
return 0;
}
+static void free_mapping_cache(struct btrfs_fs_info *fs_info)
+{
+ struct cache_tree *cache_tree = &fs_info->mapping_tree.cache_tree;
+ struct cache_extent *ce;
+ struct map_lookup *map;
+
+ while ((ce = find_first_cache_extent(cache_tree, 0))) {
+ map = container_of(ce, struct map_lookup, ce);
+ remove_cache_extent(cache_tree, ce);
+ kfree(map);
+ }
+}
+
int close_ctree...
2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
...*level - 1);
- ret = btrfs_lookup_extent_info(NULL, root, bytenr, blocksize,
- &refs, NULL);
+ ret = btrfs_lookup_extent_info(NULL, root, bytenr, *level - 1,
+ 1, &refs, NULL);
if (ret < 0)
refs = 0;
@@ -2224,7 +2226,7 @@ static int add_extent_rec(struct cache_tree *extent_cache,
struct btrfs_key *parent_key,
u64 start, u64 nr, u64 extent_item_refs,
int is_root, int inc_ref, int set_checked,
- u64 max_size)
+ int metadata, u64 max_size)
{
struct extent_record *rec;
struct cache_extent *cache;
@@ -2277,6 +2279,7 @@ static int add...
2013 Jun 04
0
[PATCH] Btrfs-progs: fix incorrect root backref errors in fsck
...ff-by: Josef Bacik <jbacik@fusionio.com>
---
cmds-check.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmds-check.c b/cmds-check.c
index bbef89a..4083298 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -1507,14 +1507,16 @@ static int add_root_backref(struct cache_tree *root_cache,
}
if (item_type == BTRFS_DIR_ITEM_KEY) {
+ if (backref->found_forward_ref)
+ rec->found_ref++;
backref->found_dir_item = 1;
- backref->reachable = 1;
- rec->found_ref++;
} else if (item_type == BTRFS_DIR_INDEX_KEY) {
backref->found_dir_index = 1;...
2012 Apr 09
0
[PATCH] Btrfs-progs: make btrfsck aware of free space inodes
...Signed-off-by: Josef Bacik <josef@redhat.com>
---
btrfsck.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/btrfsck.c b/btrfsck.c
index 7aac736..572dde0 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -274,6 +274,9 @@ static struct inode_record *get_inode_rec(struct cache_tree *inode_cache,
node->cache.size = 1;
node->data = rec;
+ if (ino == BTRFS_FREE_INO_OBJECTID)
+ rec->found_link = 1;
+
ret = insert_existing_cache_extent(inode_cache, &node->cache);
BUG_ON(ret);
}
@@ -1015,6 +1018,10 @@ static int process_one_leaf(struct btrfs_root...
2013 Oct 22
0
[PATCH] Btrfs-progs: add support for the no holes incompat flag
...-check.c
@@ -50,6 +50,7 @@ static u64 data_bytes_referenced = 0;
static int found_old_backref = 0;
static LIST_HEAD(duplicate_extents);
static int repair = 0;
+static int no_holes = 0;
struct extent_backref {
struct list_head list;
@@ -443,8 +444,9 @@ static void maybe_free_inode_rec(struct cache_tree *inode_cache,
rec->errors |= I_ERR_FILE_NBYTES_WRONG;
if (rec->extent_start == (u64)-1 || rec->extent_start > 0)
rec->first_extent_gap = 0;
- if (rec->nlink > 0 && (rec->extent_end < rec->isize ||
- rec->first_extent_gap < rec->isize))...
2013 Jun 08
0
[PATCH] Btrfs-progs: elaborate error handling of mkfs
...ret = btrfs_insert_item(trans, chunk_root, &key, chunk,
btrfs_chunk_item_size(num_stripes));
- BUG_ON(ret);
*start = key.offset;;
map->ce.start = key.offset;
@@ -887,14 +888,19 @@ again:
ret = insert_existing_cache_extent(
&extent_root->fs_info->mapping_tree.cache_tree,
&map->ce);
- BUG_ON(ret);
+ if (ret)
+ goto out;
if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
ret = btrfs_add_system_chunk(trans, chunk_root, &key,
chunk, btrfs_chunk_item_size(num_stripes));
- BUG_ON(ret);
+ if (ret)
+ goto out;
}
+out:
+ if (ret)
+ kfree...
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...drop_key->type) {
+ if (key->offset < drop_key->offset)
+ return 1;
+ }
+ }
+ return 0;
+}
+
static int run_next_block(struct btrfs_root *root,
struct block_info *bits,
int bits_nr,
@@ -3612,7 +3633,8 @@ static int run_next_block(struct btrfs_root *root,
struct cache_tree *chunk_cache,
struct rb_root *dev_cache,
struct block_group_tree *block_group_cache,
- struct device_extent_tree *dev_extent_cache)
+ struct device_extent_tree *dev_extent_cache,
+ struct btrfs_root_item *ri)
{
struct extent_buffer *buf;
u64 bytenr;
@@ -3817,6 +3839,15...
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...s |= EXTENT_UPTODATE;
diff --git a/extent_io.h b/extent_io.h
index 63e9004..1c7999a 100644
--- a/extent_io.h
+++ b/extent_io.h
@@ -34,6 +34,8 @@
#define EXTENT_CSUM (1 << 9)
#define EXTENT_IOBITS (EXTENT_LOCKED | EXTENT_WRITEBACK)
+struct btrfs_fs_info;
+
struct extent_io_tree {
struct cache_tree state;
struct cache_tree cache;
@@ -115,4 +117,6 @@ void memset_extent_buffer(struct extent_buffer *eb, char c,
unsigned long start, unsigned long len);
int set_extent_buffer_dirty(struct extent_buffer *eb);
int clear_extent_buffer_dirty(struct extent_buffer *eb);
+int read_data_from_disk...
2013 Jan 29
8
[RFC] Move btrfsck in to the btrfs command
NOTE: in order to apply this patch you should:
git mv btrfsck.c cmd-fsck.c
This patch moves btrfsck in to "btrfs fsck".
It also adds support for symlinks to the btrfs binary to
retain compablity, =)
I think something should be done to the help description but i''m not
sure what... Anyway, feedback is welcome.
--
To unsubscribe from this list: send the line "unsubscribe
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing.
Based on Daivd''s branch ''integration-20130903''.
Gui Hecheng (5):
btrfs-progs:free local variable buf upon unsuccessful returns
btrfs-progs:local variable memory freed
btrfs-progs: missing tree-freeing statements added
btrfs-progs:free the local list pending_list in btrfs_scan_one_dir