search for: chunk_root

Displaying 20 results from an estimated 23 matches for "chunk_root".

2011 Nov 09
6
[PATCH 0/5] Btrfs: mount error handling fixes
A bunch of fixes (memory leaks, NULL pointer dereferences and devices hanging in busy state) to sanitize error handling during mount sequence. This is on top of for-linus + slyfox''s double-free fix. Thanks, Ilya Ilya Dryomov (5): Btrfs: fix memory leak in btrfs_parse_early_options() Btrfs: fix subvol_name leak on error in btrfs_mount() Btrfs: avoid null dereference and leaks
2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
...t_generation(&info->extent_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block(trans, info->extent_root, info->extent_root->node, NULL, 0, &tmp, 0, 0); - BUG_ON(ret); - free_extent_buffer(tmp); - - ret = __btrfs_cow_block(trans, info->chunk_root, info->chunk_root->node, - NULL, 0, &tmp, 0, 0); - BUG_ON(ret); - free_extent_buffer(tmp); + BUG_ON(ret); + free_extent_buffer(tmp); + } + generation = btrfs_root_generation(&info->chunk_root->root_item); + if (generation != trans->transid) { + ret = __btrfs_cow_block...
2013 Jun 08
0
[PATCH] Btrfs-progs: elaborate error handling of mkfs
...(stderr, "failed to setup the root directory\n"); + fprintf(stderr, "failed to setup the root directory %d\n", ret); exit(1); } diff --git a/volumes.c b/volumes.c index d6f81f8..8285240 100644 --- a/volumes.c +++ b/volumes.c @@ -842,11 +842,13 @@ again: info->chunk_root->root_key.objectid, BTRFS_FIRST_CHUNK_TREE_OBJECTID, key.offset, calc_size, &dev_offset); - BUG_ON(ret); + if (ret) + goto out; device->bytes_used += calc_size; ret = btrfs_update_device(trans, device); - BUG_ON(ret); + if (ret) + goto out; map->s...
2011 Aug 14
1
btrfs: failed to read chunk root
...s: failed to read chunk root on sda5 [  752.132190] btrfs: open_ctree failed [ 1132.984600] device label deux devid 1 transid 86 /dev/sdb3 [ 1171.796682] device fsid 9d42de57e2bebde7-4824b05acb3c538d devid 1 transid 346 /dev/sda5 Trying btrfsck: btrfsck: disk-io.c:721: open_ctree_fd: Assertion `!(!chunk_root->node)'' failed. It had worked alright during the last couple of reboots. Before rebooting I created a new btrfs volume which I am able to mount without problems in rescue mode. Thanks for any help, Espen -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs&quo...
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello, This patch series adds an initial implementation of restriper (it''s a clever name for relocation framework that allows to do selective profile changing and selective balancing with some goodies like pausing/resuming and reporting progress to the user. Profile changing is global (per-FS) so far, per-subvolume profiles require some discussion and can be implemented in future.
2015 Dec 27
1
[PATCH v2] btrfs: Fix logical to physical block address mapping
...> > diff --git a/core/fs/btrfs/btrfs.c b/core/fs/btrfs/btrfs.c > index 53e1105..ca611db 100644 > --- a/core/fs/btrfs/btrfs.c > +++ b/core/fs/btrfs/btrfs.c > @@ -371,16 +386,21 @@ static void btrfs_read_chunk_tree(struct fs_info *fs) > search_tree(fs, bfs->sb.chunk_root, &search_key, &path); > do { > do { > + /* skip information about underlying block > + * devices. > + */ > + if...
2015 Dec 24
4
[PATCH] btrfs: Fix logical to physical block address mapping
...y ignore_key; struct btrfs_chunk *chunk; - struct btrfs_chunk_map_item item; struct btrfs_path path; if (!(bfs->sb.flags & BTRFS_SUPER_FLAG_METADUMP)) { @@ -370,17 +381,24 @@ static void btrfs_read_chunk_tree(struct fs_info *fs) clear_path(&path); search_tree(fs, bfs->sb.chunk_root, &search_key, &path); do { + ignore_key.objectid = BTRFS_DEV_ITEMS_OBJECTID; + ignore_key.type = BTRFS_DEV_ITEM_KEY; do { + /* skip information about underlying block + * devices. + */ + if (!btrfs_comp_keys_type(&ignore_key, + &path.item.key)) +...
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...ONLY, check_mount); BUG_ON(ret); fs_info->super_bytenr = sb_bytenr; @@ -725,7 +725,7 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, BTRFS_UUID_SIZE); if (!(btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_METADUMP)) { - ret = btrfs_read_chunk_tree(chunk_root); + ret = btrfs_read_chunk_tree(chunk_root, check_mount); BUG_ON(ret); } diff --git a/disk-io.h b/disk-io.h index 49e5692..1d6519e 100644 --- a/disk-io.h +++ b/disk-io.h @@ -43,9 +43,9 @@ struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, u64 bytenr, u32 b...
2009 Jul 22
0
grub-0.97/btrfs: [PATCH] against fedora 10
...cal threads (e.g. name resolution, updating fs_root, looking for translation map) won''t step on each other. Every such pool is represented by structure btrfs_path, which has one "sliding" 4K-buffer. btrfs_mount() looks through super versions and pick up the most recent one. Then chunk_root and tree_root are installed to the global structure btrfs_fs_info. At the end we pick up and install the latest version of fs_tree. btrfs_dir() updates the fs_tree during path walk every time when we jump to another subvolume. This stuff can be easily adjusted for other grub versions. Attached i...
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
...eft < thresh && btrfs_test_opt(root, ENOSPC_DEBUG)) { + printk(KERN_INFO "left=%llu, need=%llu, flags=%llu\n", + left, thresh, type); + dump_space_info(info, 0, 0); + } + + if (left < thresh) { + u64 flags; + + flags = btrfs_get_alloc_profile(root->fs_info->chunk_root, 0); + btrfs_alloc_chunk(trans, root, flags); + } +} + static int do_chunk_alloc(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 alloc_bytes, u64 flags, int force) @@ -3468,6 +3512,12 @@ again: force_metadata_allocation(fs_info); } + /* + * Check if we h...
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk free space cache. Others are small fixes and cleanups. The last three have been sent weeks ago. The patchset is also available in this repo: git://repo.or.cz/linux-btrfs-devel.git for-chris Note there''s a small confict with Al Viro''s vfs changes. Li Zefan (11): Btrfs: add pinned extents to
2011 May 02
5
[PATCH v3 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
2010 Apr 03
1
[PATCH] btrfs support
...__u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */ + __le64 bytenr; /* this block number */ + __le64 flags; + + /* allowed to be different from the btrfs_header from here own down */ + __le64 magic; + __le64 generation; + __le64 root; + __le64 chunk_root; + __le64 log_root; + + /* this will help find the new super based on the log root */ + __le64 log_root_transid; + __le64 total_bytes; + __le64 bytes_used; + __le64 root_dir_objectid; + __le64 num_devices; + __le32 sectorsize; + __le32...
2009 Jan 21
0
[PATCH] Progs: update convert for uninitialized block groups
...;& pass++ < 4) + if (num_refs > 0 && pass++ < 16) goto again; ret = (num_refs > 0) ? -1 : 0; @@ -2537,6 +2559,7 @@ int do_rollback(const char *devname, int { int fd; int ret; + int i; struct btrfs_root *root; struct btrfs_root *ext2_root; struct btrfs_root *chunk_root; @@ -2654,6 +2677,10 @@ int do_rollback(const char *devname, int struct btrfs_file_extent_item); if (btrfs_file_extent_type(leaf, fi) != BTRFS_FILE_EXTENT_REG) break; + if (btrfs_file_extent_compression(leaf, fi) || + btrfs_file_extent_encryption(leaf, fi) || + btrfs_file...
2015 Dec 24
0
[PATCH v2] btrfs: Fix logical to physical block address mapping
...EMS_OBJECTID; + ignore_key.type = BTRFS_DEV_ITEM_KEY; + /* read chunk from chunk_tree */ search_key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; search_key.type = BTRFS_CHUNK_ITEM_KEY; @@ -371,16 +386,21 @@ static void btrfs_read_chunk_tree(struct fs_info *fs) search_tree(fs, bfs->sb.chunk_root, &search_key, &path); do { do { + /* skip information about underlying block + * devices. + */ + if (!btrfs_comp_keys_type(&ignore_key, + &path.item.key)) + goto skip_dev_item; if (btrfs_comp_keys_type(&search_key, - &path.item.key...
2015 Dec 27
0
[PATCH v3] btrfs: Fix logical to physical block address mapping
...EMS_OBJECTID; + ignore_key.type = BTRFS_DEV_ITEM_KEY; + /* read chunk from chunk_tree */ search_key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; search_key.type = BTRFS_CHUNK_ITEM_KEY; @@ -371,16 +386,18 @@ static void btrfs_read_chunk_tree(struct fs_info *fs) search_tree(fs, bfs->sb.chunk_root, &search_key, &path); do { do { + /* skip information about underlying block + * devices. + */ + if (!btrfs_comp_keys_type(&ignore_key, + &path.item.key)) + continue; if (btrfs_comp_keys_type(&search_key, - &path.item.key)) +...
2011 Apr 12
3
[PATCH v2 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ree_extent_map(em); ret = btrfs_make_block_group(trans, extent_root, 0, type, BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, *num_bytes); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); index = 0; while (index < map->num_stripes) { @@ -2368,7 +2368,7 @@ again: info->chunk_root->root_key.objectid, BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, dev_offset, calc_size); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); index++; } @@ -2399,7 +2399,7 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans, device = map->stripes[index].dev; device-...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
...xtent-tree.c b/fs/btrfs/extent-tree.c index 3d3e2c1..561dad5 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3346,7 +3346,8 @@ u64 btrfs_get_alloc_profile(struct btrfs_root *root, int data) if (data) flags = BTRFS_BLOCK_GROUP_DATA; - else if (root == root->fs_info->chunk_root) + else if (root == root->fs_info->chunk_root || + root == root->fs_info->dev_root) flags = BTRFS_BLOCK_GROUP_SYSTEM; else flags = BTRFS_BLOCK_GROUP_METADATA; @@ -3534,7 +3535,8 @@ static u64 get_system_chunk_thresh(struct btrfs_root *root, u64 type) else num_dev = 1; /*...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...xtent_root->block_rsv = &fs_info->global_block_rsv; + fs_info->csum_root->block_rsv = &fs_info->global_block_rsv; + fs_info->dev_root->block_rsv = &fs_info->global_block_rsv; + fs_info->tree_root->block_rsv = &fs_info->global_block_rsv; fs_info->chunk_root->block_rsv = &fs_info->chunk_block_rsv; + + btrfs_add_durable_block_rsv(fs_info, &fs_info->global_block_rsv); + + btrfs_add_durable_block_rsv(fs_info, &fs_info->delalloc_block_rsv); + + update_global_block_rsv(fs_info); +} + +static void release_global_block_rsv(struct btrfs...