[PATCH AUTOSEL 4.19 015/100] Btrfs: fix deadlock on tree root leaf when finding free extent

2019-10-18 Thread Sasha Levin
/0x3a0 [btrfs] btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] btrfs_commit_transaction+0xcb/0x8b0 [btrfs] At cache_save_setup() we need to update the inode item of a block group's cache which is located in the tree root (fs_info->tree_root), which means that it may result in COWing a l

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-11-13 Thread David Sterba
On Mon, Nov 05, 2018 at 04:36:34PM +, Filipe Manana wrote: > On Mon, Nov 5, 2018 at 4:34 PM David Sterba wrote: > > On Mon, Nov 05, 2018 at 04:30:35PM +, Filipe Manana wrote: > > > On Mon, Nov 5, 2018 at 4:29 PM David Sterba wrote: > > > > On Wed, Oct 24, 2018 at 01:48:40PM +0100, Filipe

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-11-05 Thread Filipe Manana
On Mon, Nov 5, 2018 at 4:34 PM David Sterba wrote: > > On Mon, Nov 05, 2018 at 04:30:35PM +, Filipe Manana wrote: > > On Mon, Nov 5, 2018 at 4:29 PM David Sterba wrote: > > > > > > On Wed, Oct 24, 2018 at 01:48:40PM +0100, Filipe Manana wrote: > > > > > Ah ok makes sense. Well in that case l

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-11-05 Thread David Sterba
On Mon, Nov 05, 2018 at 04:30:35PM +, Filipe Manana wrote: > On Mon, Nov 5, 2018 at 4:29 PM David Sterba wrote: > > > > On Wed, Oct 24, 2018 at 01:48:40PM +0100, Filipe Manana wrote: > > > > Ah ok makes sense. Well in that case lets just make > > > > btrfs_read_locked_inode() > > > > take a

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-11-05 Thread Filipe Manana
On Mon, Nov 5, 2018 at 4:29 PM David Sterba wrote: > > On Wed, Oct 24, 2018 at 01:48:40PM +0100, Filipe Manana wrote: > > > Ah ok makes sense. Well in that case lets just make > > > btrfs_read_locked_inode() > > > take a path, and allocate it in btrfs_iget, that'll remove the ugly > > > > > > if

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-11-05 Thread David Sterba
On Wed, Oct 24, 2018 at 01:48:40PM +0100, Filipe Manana wrote: > > Ah ok makes sense. Well in that case lets just make > > btrfs_read_locked_inode() > > take a path, and allocate it in btrfs_iget, that'll remove the ugly > > > > if (path != in_path) > > You mean the following on top of v4: > >

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread Josef Bacik
ree_extent+0x799/0x1010 [btrfs] > > > > > btrfs_reserve_extent+0x9b/0x180 [btrfs] > > > > > btrfs_alloc_tree_block+0x1b3/0x4f0 [btrfs] > > > > > __btrfs_cow_block+0x11d/0x500 [btrfs] > > > > > btrfs_cow_block+0xdc/0x180 [btrfs] > > > > > bt

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread Filipe Manana
btrfs_cow_block+0xdc/0x180 [btrfs] > > > > btrfs_search_slot+0x3bd/0x9f0 [btrfs] > > > > btrfs_lookup_inode+0x3a/0xc0 [btrfs] > > > > ? kmem_cache_alloc+0x166/0x1d0 > > > > btrfs_update_inode_item+0x46/0x100 [btrfs] > > > > cache_save_setup

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread Josef Bacik
s_cow_block+0x11d/0x500 [btrfs] > > > btrfs_cow_block+0xdc/0x180 [btrfs] > > > btrfs_search_slot+0x3bd/0x9f0 [btrfs] > > > btrfs_lookup_inode+0x3a/0xc0 [btrfs] > > > ? kmem_cache_alloc+0x166/0x1d0 > > > btrfs_update_inode_item+0x46/0x100 [btrfs] > >

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread Filipe Manana
> > btrfs_update_inode_item+0x46/0x100 [btrfs] > > cache_save_setup+0xe4/0x3a0 [btrfs] > > btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] > > btrfs_commit_transaction+0xcb/0x8b0 [btrfs] > > > > At cache_save_setup() we need to update the inode item

Re: [PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread Josef Bacik
t; At cache_save_setup() we need to update the inode item of a block group's > cache which is located in the tree root (fs_info->tree_root), which means > that it may result in COWing a leaf from that tree. If that happens we > need to find a free metadata extent and while loo

[PATCH v4] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread fdmanana
[btrfs] btrfs_commit_transaction+0xcb/0x8b0 [btrfs] At cache_save_setup() we need to update the inode item of a block group's cache which is located in the tree root (fs_info->tree_root), which means that it may result in COWing a leaf from that tree. If that happens we need to find a free

Re: [PATCH v3] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-24 Thread Filipe Manana
btrfs_cow_block+0xdc/0x180 [btrfs] > > > > btrfs_search_slot+0x3bd/0x9f0 [btrfs] > > > > btrfs_lookup_inode+0x3a/0xc0 [btrfs] > > > > ? kmem_cache_alloc+0x166/0x1d0 > > > > btrfs_update_inode_item+0x46/0x100 [btrfs] > > > > cache_save_setup

Re: [PATCH v3] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-23 Thread Josef Bacik
s_cow_block+0x11d/0x500 [btrfs] > > > btrfs_cow_block+0xdc/0x180 [btrfs] > > > btrfs_search_slot+0x3bd/0x9f0 [btrfs] > > > btrfs_lookup_inode+0x3a/0xc0 [btrfs] > > > ? kmem_cache_alloc+0x166/0x1d0 > > > btrfs_update_inode_item+0x46/0x100 [btrfs] > >

Re: [PATCH v3] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Filipe Manana
> > btrfs_update_inode_item+0x46/0x100 [btrfs] > > cache_save_setup+0xe4/0x3a0 [btrfs] > > btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] > > btrfs_commit_transaction+0xcb/0x8b0 [btrfs] > > > > At cache_save_setup() we need to update the inode item of a bl

Re: [PATCH v3] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Josef Bacik
t; At cache_save_setup() we need to update the inode item of a block group's > cache which is located in the tree root (fs_info->tree_root), which means > that it may result in COWing a leaf from that tree. If that happens we > need to find a free metadata extent and while loo

[PATCH v3] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread fdmanana
[btrfs] btrfs_commit_transaction+0xcb/0x8b0 [btrfs] At cache_save_setup() we need to update the inode item of a block group's cache which is located in the tree root (fs_info->tree_root), which means that it may result in COWing a leaf from that tree. If that happens we need to find a free

Re: [PATCH v2] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Filipe Manana
> > btrfs_update_inode_item+0x46/0x100 [btrfs] > > cache_save_setup+0xe4/0x3a0 [btrfs] > > btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] > > btrfs_commit_transaction+0xcb/0x8b0 [btrfs] > > > > At cache_save_setup() we need to update the inode item of a bl

Re: [PATCH v2] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Josef Bacik
t; At cache_save_setup() we need to update the inode item of a block group's > cache which is located in the tree root (fs_info->tree_root), which means > that it may result in COWing a leaf from that tree. If that happens we > need to find a free metadata extent and while loo

Re: [PATCH] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Filipe Manana
> > btrfs_update_inode_item+0x46/0x100 [btrfs] > > cache_save_setup+0xe4/0x3a0 [btrfs] > > btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] > > btrfs_commit_transaction+0xcb/0x8b0 [btrfs] > > > > At cache_save_setup() we need to update the inode item of a bl

[PATCH v2] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread fdmanana
[btrfs] btrfs_commit_transaction+0xcb/0x8b0 [btrfs] At cache_save_setup() we need to update the inode item of a block group's cache which is located in the tree root (fs_info->tree_root), which means that it may result in COWing a leaf from that tree. If that happens we need to find a free

Re: [PATCH] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Josef Bacik
t; At cache_save_setup() we need to update the inode item of a block group's > cache which is located in the tree root (fs_info->tree_root), which means > that it may result in COWing a leaf from that tree. If that happens we > need to find a free metadata extent and while loo

Re: [PATCH] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Filipe Manana
ookup_inode+0x3a/0xc0 [btrfs] > ? kmem_cache_alloc+0x166/0x1d0 > btrfs_update_inode_item+0x46/0x100 [btrfs] > cache_save_setup+0xe4/0x3a0 [btrfs] > btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] > btrfs_commit_transaction+0xcb/0x8b0 [btrfs] > > At cache_save_setup() we

Re: [PATCH] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread Filipe Manana
ookup_inode+0x3a/0xc0 [btrfs] > ? kmem_cache_alloc+0x166/0x1d0 > btrfs_update_inode_item+0x46/0x100 [btrfs] > cache_save_setup+0xe4/0x3a0 [btrfs] > btrfs_start_dirty_block_groups+0x1be/0x480 [btrfs] > btrfs_commit_transaction+0xcb/0x8b0 [btrfs] > > At cache_save_setup() we

[PATCH] Btrfs: fix deadlock on tree root leaf when finding free extent

2018-10-22 Thread fdmanana
[btrfs] btrfs_commit_transaction+0xcb/0x8b0 [btrfs] At cache_save_setup() we need to update the inode item of a block group's cache which is located in the tree root (fs_info->tree_root), which means that it may result in COWing a leaf from that tree. If that happens we need to find a free

Re: Couldn't read tree root BTRFS - SEED

2018-04-09 Thread Senén Vidal Blanco
ption) happened. > > > Ignoring transid failure > > So this is btrfs-progs (btrfs check). Kernel doesn't ignore any transid > failure AFAIK. > > > Couldn't map the block 2287467560960 > > No mapping for 2287467560960-2287467577344 > > Couldn't m

Re: Couldn't read tree root BTRFS - SEED

2018-04-05 Thread Qu Wenruo
noring transid failure So this is btrfs-progs (btrfs check). Kernel doesn't ignore any transid failure AFAIK. > Couldn't map the block 2287467560960 > No mapping for 2287467560960-2287467577344 > Couldn't map the block 2287467560960 > bytenr mismatch, want=2287

Couldn't read tree root BTRFS - SEED

2018-04-05 Thread Senén Vidal Blanco
block 2287467560960 No mapping for 2287467560960-2287467577344 Couldn't map the block 2287467560960 bytenr mismatch, want=2287467560960, have=0 Couldn't read tree root Label: 'SEED_MD2' uuid: 851e4474-d375-4a25-b202-949e51f05877 Total devices 1 FS bytes used 1.94TiB

Re: [PATCH] btrfs-progs: Use more restrict check to read out tree root

2017-05-02 Thread David Sterba
On Tue, Apr 25, 2017 at 04:40:16PM +0800, Qu Wenruo wrote: > For fuzzed image bko-156811-bad-parent-ref-qgroup-verify.raw, it cause > qgroup to report -ENOMEM. > > But the fact is, such image is heavy damaged so there is not valid root > item for extent tree. > > Normal extent tree key in root tr

[PATCH] btrfs-progs: Use more restrict check to read out tree root

2017-04-25 Thread Qu Wenruo
For fuzzed image bko-156811-bad-parent-ref-qgroup-verify.raw, it cause qgroup to report -ENOMEM. But the fact is, such image is heavy damaged so there is not valid root item for extent tree. Normal extent tree key in root tree should be (EXTENT_TREE ROOT_ITEM 0), while in that fuzzed image, we go

Re: Rescue a single-device btrfs instance with zeroed tree root

2016-06-27 Thread Ivan Shapovalov
Together with a zeroed out > tree root, this asks for a bug in partclone...) > > So: the tree root is zeroes, backup roots are zeroes too, > btrfs-find-root only reports blocks of level 0 (needed is 1). > Is there something that can be done? Maybe it is possible to > reconstruct th

Rescue a single-device btrfs instance with zeroed tree root

2016-06-21 Thread Ivan Shapovalov
Hello, So this is another case of "I lost my partition and do not have backups". More precisely, _this_ is the backup and it turned out to be damaged. (The backup was made by partclone.btrfs. Together with a zeroed out tree root, this asks for a bug in partclone...) So: the tree root

[PATCH V2] Btrfs: Initialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2016-01-07 Thread Chandan Rajendra
bvolume root's highest_objectid when loading the roots from disk. Signed-off-by: Chandan Rajendra --- Changelog: v1->v2: A newly created subvolume cannot have an ID beyond BTRFS_LAST_FREE_OBJECTID. Hence when loading tree root tree or any of the subvolume trees, We now use an assert state

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2016-01-06 Thread Chandan Rajendra
On Tuesday 05 Jan 2016 13:12:34 David Sterba wrote: > Sorry for not answering that. As you're going to resend it, please > use EOVERFLOW in the btrfs_init_fs_root. We should not hit the overflow > error in the mount path. Right. Now I understand that. David, Replacing the following code snippet in

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2016-01-05 Thread David Sterba
On Wed, Oct 07, 2015 at 07:40:46PM +0530, Chandan Rajendra wrote: > On Wednesday 07 Oct 2015 11:25:03 David Sterba wrote: > > On Mon, Oct 05, 2015 at 10:14:24PM +0530, Chandan Rajendra wrote: > > > + if (unlikely(root->highest_objectid >= BTRFS_LAST_FREE_OBJECTID)) { > > > + mutex_unlock(&r

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2016-01-04 Thread Chandan Rajendra
On Sunday 03 Jan 2016 00:02:18 james harvey wrote: > Bump. > > Pretty sure I just ran into this, outside of a testing scenario. See > http://permalink.gmane.org/gmane.comp.file-systems.btrfs/51796 > > Looks like the patch was never committed. > Thanks for pointing this out. I will rebase & test

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2016-01-02 Thread james harvey
Bump. Pretty sure I just ran into this, outside of a testing scenario. See http://permalink.gmane.org/gmane.comp.file-systems.btrfs/51796 Looks like the patch was never committed. On Wed, Oct 7, 2015 at 10:10 AM, Chandan Rajendra wrote: > On Wednesday 07 Oct 2015 11:25:03 David Sterba wrote: >

[PATCH v2 09/25] btrfs-progs: Introduce function to setup temporary tree root

2015-11-30 Thread Qu Wenruo
Introduce new function, setup_temp_tree_root(), to initialize temporary tree root for make_btrfs_v2(). The new function will setup tree root at metadata chunk and ensure data won't be written into metadata chunk. Also, new make_btrfs_v2() will have a much better code structure tha

[PATCH 09/25] btrfs-progs: Introduce function to setup temporary tree root

2015-11-19 Thread Qu Wenruo
Introduce new function, setup_temp_tree_root(), to initialize temporary tree root for make_btrfs_v2(). The new function will setup tree root at metadata chunk and ensure data won't be written into metadata chunk. Also, new make_btrfs_v2() will have a much better code structure tha

[RFC PATCH 09/22] btrfs-progs: Introduce function to setup temporary tree root

2015-11-17 Thread Qu Wenruo
Introduce new function, setup_temp_tree_root(), to initialize temporary tree root for make_btrfs_v2(). The new function will setup tree root at metadata chunk and ensure data won't be written into metadata chunk. Also, new make_btrfs_v2() will have a much better code structure tha

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2015-10-07 Thread Chandan Rajendra
On Wednesday 07 Oct 2015 11:25:03 David Sterba wrote: > On Mon, Oct 05, 2015 at 10:14:24PM +0530, Chandan Rajendra wrote: > > + if (unlikely(root->highest_objectid >= BTRFS_LAST_FREE_OBJECTID)) { > > + mutex_unlock(&root->objectid_mutex); > > + ret = -ENOSPC; > > ENOSPC ... I

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2015-10-07 Thread David Sterba
On Mon, Oct 05, 2015 at 10:14:24PM +0530, Chandan Rajendra wrote: > + if (unlikely(root->highest_objectid >= BTRFS_LAST_FREE_OBJECTID)) { > + mutex_unlock(&root->objectid_mutex); > + ret = -ENOSPC; ENOSPC ... I don't think it's right as this could be with a normal enosp

[PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2015-10-05 Thread Chandan Rajendra
The following call trace is seen when btrfs/031 test is executed in a loop, [ 120.577208] WARNING: CPU: 3 PID: 6202 at /home/chandan/repos/linux/fs/btrfs/ioctl.c:558 create_subvol+0x3e6/0x729() [ 120.581521] BTRFS: Transaction aborted (error -2) [ 120.585410] Modules linked in: [ 120.587460]

Re: [PATCH v2 10/10] btrfs-progs: Allow open_ctree use backup tree root or search it automatically if primary tree root is corrupted.

2015-07-28 Thread David Sterba
On Tue, Jul 28, 2015 at 08:34:50AM +0800, Qu Wenruo wrote: > Yes, you were against the automatic use of backup root or especially > iteration all metadata space to find the latest tree root. > > I'll try to add a new option like "--full-scan" to enable the automati

Re: [PATCH v2 10/10] btrfs-progs: Allow open_ctree use backup tree root or search it automatically if primary tree root is corrupted.

2015-07-27 Thread Qu Wenruo
David Sterba wrote on 2015/07/27 17:04 +0200: On Mon, Jan 19, 2015 at 02:45:12PM +0800, Qu Wenruo wrote: Allow open_ctree to try its best to open tree root on damaged file system. With this patch, open_ctree will follow the below priority to read tree root, providing better chance to open

Re: [PATCH v2 10/10] btrfs-progs: Allow open_ctree use backup tree root or search it automatically if primary tree root is corrupted.

2015-07-27 Thread David Sterba
On Mon, Jan 19, 2015 at 02:45:12PM +0800, Qu Wenruo wrote: > Allow open_ctree to try its best to open tree root on damaged file system. > > With this patch, open_ctree will follow the below priority to read tree > root, providing better chance to open damaged btrfs fs. > 1) Using

[PATCH 6/7] btrfs-progs: Introduce new function reset_(one_root/roots)_csum() to reset one/all tree's csum in tree root.

2015-02-03 Thread Qu Wenruo
New function reset_one_root_csum() will reset all csum in one root. And reset_roots_csum() will reset all csum of all trees in tree root. which provides the basis for later dangerous options. Signed-off-by: Qu Wenruo --- cmds-check.c | 176

[PATCH 5/5] btrfs-progs: Introduce new function reset_(one_root/roots)_csum() to reset one/all tree's csum in tree root.

2015-02-03 Thread Qu Wenruo
New function reset_one_root_csum() will reset all csum in one root. And reset_roots_csum() will reset all csum of all trees in tree root. which provides the basis for later dangerous options. Signed-off-by: Qu Wenruo --- cmds-check.c | 157

[PATCH v2 10/10] btrfs-progs: Allow open_ctree use backup tree root or search it automatically if primary tree root is corrupted.

2015-01-18 Thread Qu Wenruo
Allow open_ctree to try its best to open tree root on damaged file system. With this patch, open_ctree will follow the below priority to read tree root, providing better chance to open damaged btrfs fs. 1) Using root bytenr in SB to read tree root Normal routine if not specified to use backup

[PATCH 4/4] btrfs-progs: Automatic using backup tree root or searching tree root if fail to read it.

2014-11-11 Thread Qu Wenruo
Allow open_ctree to try its best to open tree root on damaged file system. With this patch, open_ctree will follow the below procedure to read tree root to provide a better chance to open damaged btrfs fs. 1) Using root bytenr in SB to read tree root Normal routine if not specified to use backup

[SOLVED] btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-11-04 Thread Ansgar Hockmann-Stolle
Tumbleweed (kernel 3.17.??). Now I'm on openSUSE 13.2-RC1 rescue (kernel 3.16.3). I dumped (dd) the whole 250 GB SSD to some USB file and tried some btrfs tools on another copy per loopback device. But everything failed with: kernel: BTRFS: failed to read tree root on dm-2 See http://pastebi

Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-28 Thread Ansgar Hockmann-Stolle
Duncan <1i5t5.duncan cox.net> writes: [..] > > Hope that helps! =:^) > Thanks a lot for that many hints! Unfortunately, btrfs restore does not find the tree root and so it does not find anything. I will wait for Qu Wenruo to enhance chunk-recovering. And in the meantime I wil

Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-28 Thread Ansgar Hockmann-Stolle
Am 28.10.14 um 02:40 schrieb Qu Wenruo: Original Message Subject: Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root From: Qu Wenruo To: Ansgar Hockmann-Stolle , Date: 2014年10月28日 09:05 Original Message Subject: Re:

Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-27 Thread Qu Wenruo
Original Message Subject: Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root From: Qu Wenruo To: Ansgar Hockmann-Stolle , Date: 2014年10月28日 09:05 Original Message Subject: Re: btrfs unmountable: read block f

Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-27 Thread Qu Wenruo
Original Message Subject: Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root From: Ansgar Hockmann-Stolle To: Date: 2014年10月28日 07:03 Am 27.10.14 um 14:23 schrieb Ansgar Hockmann-Stolle: Hi! My btrfs system partition went readonly.

Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-27 Thread Duncan
). I dumped (dd) the whole 250 > GB SSD to some USB file and tried some btrfs tools on another copy per > loopback device. But everything failed with: > > kernel: BTRFS: failed to read tree root on dm-2 > > See http://pastebin.com/raw.php?i=dPnU6nzg. > > Any hints wher

Re: btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-27 Thread Ansgar Hockmann-Stolle
file and tried some btrfs tools on another copy per loopback device. But everything failed with: kernel: BTRFS: failed to read tree root on dm-2 See http://pastebin.com/raw.php?i=dPnU6nzg. Any hints where to go from here? After an offlist hint (thanks Tom!) I compiled the latest btrfs-progs

btrfs unmountable: read block failed check_tree_block; Couldn't read tree root

2014-10-27 Thread Ansgar Hockmann-Stolle
y per loopback device. But everything failed with: kernel: BTRFS: failed to read tree root on dm-2 See http://pastebin.com/raw.php?i=dPnU6nzg. Any hints where to go from here? Ciao Ansgar -- Ansgar Hockmann-Stolle, Universität Osnabrück, Rechenzentrum Albrechtstraße 28, 49076 Osna

[PATCH 07/12] Btrfs-progs: re-search tree root if it changes

2014-10-10 Thread Josef Bacik
If we change something while scanning fs-roots we need to redo our search so that we get valid root items and have valid root cache. Thanks, Signed-off-by: Josef Bacik --- cmds-check.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c ind

Re: [PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-04 Thread Eric Sandeen
On 8/4/14, 1:51 PM, Zach Brown wrote: > On Mon, Aug 04, 2014 at 01:42:23PM -0500, Eric Sandeen wrote: >> On 8/4/14, 1:35 PM, Zach Brown wrote: >>> On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote: >>>> Reading the quota tree root may fail with ENOENT >&

Re: [PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-04 Thread Zach Brown
On Mon, Aug 04, 2014 at 01:42:23PM -0500, Eric Sandeen wrote: > On 8/4/14, 1:35 PM, Zach Brown wrote: > > On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote: > >> Reading the quota tree root may fail with ENOENT > >> if there is no quota, which is fine, but

Re: [PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-04 Thread Eric Sandeen
On 8/4/14, 1:35 PM, Zach Brown wrote: > On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote: >> Reading the quota tree root may fail with ENOENT >> if there is no quota, which is fine, but the code was >> ignoring every other error as well, which is not fine. > &

Re: [PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-04 Thread Zach Brown
On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote: > Reading the quota tree root may fail with ENOENT > if there is no quota, which is fine, but the code was > ignoring every other error as well, which is not fine. Kinda makes you want to write a test that would have ca

[PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-01 Thread Eric Sandeen
Reading the quota tree root may fail with ENOENT if there is no quota, which is fine, but the code was ignoring every other error as well, which is not fine. Signed-off-by: Eric Sandeen --- fs/btrfs/disk-io.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs

[PATCH 4/5] Btrfs-progs: fsck: force to udate tree root for some cases

2014-03-05 Thread Wang Shilong
commit roots won't update root item in tree root if it finds updated root's bytenr is same as before. However, this is not right for fsck, we need update tree root in the following case: 1.overwrite previous root node. 2.reinit reloc data tree, this is because we skip pin relo data t

[PATCH] Btrfs: fix wrong search path initialization before searching tree root

2014-01-14 Thread Wang Shilong
From: Wang Shilong To search tree root without transaction protection, we should neither search commit root nor skip locking here, fix it. Signed-off-by: Wang Shilong --- fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c

[PATCH] btrfs-progs: look up the containing tree root id

2013-09-18 Thread David Sterba
ubvolume ID. .TP +\fBinspect-internal rootid\fP \fI\fP +For a given file or directory, return the containing tree root id. For a +subvolume return it's own tree id. + +The result is undefined for the so-called empty subvolumes (identified by inode number 2). +.TP + \fBsend\fP [-v] [-p \fI\f

[PATCH 01/17] Btrfs: fix accessing a freed tree root

2013-05-15 Thread Miao Xie
inode_tree_del() will move the tree root into the dead root list, and then the tree will be destroyed by the cleaner. So if we remove the delayed node which is cached in the inode after inode_tree_del(), we may access a freed tree root. Fix it. Signed-off-by: Miao Xie --- fs/btrfs/inode.c | 2

Re: tree root

2012-10-04 Thread David Sterba
y, but restore seems to work when I specify the previous > tree-root. My problem is however that the btrfs is so large I have nowhere > to temporarily put all the files. I am currently running kernel 3.5. Does > mount have an option to manually tell it to use the tree root at block > 14102

Re: tree root

2012-10-03 Thread Mitch Harder
e? If I understand correctly a feature along the lines of "mount -o > tree_root=14102764707840 /dev/ /path/" would solve my problem. > > The fs is unmountable because of a temporary loss of connection with an > underlying disk controller, and I don't think the device has a

Re: tree root

2012-10-03 Thread Øystein Sættem Middelthun
lem. The fs is unmountable because of a temporary loss of connection with an underlying disk controller, and I don't think the device has a lot of errors besides not being able to find the latest tree root. -- Best regards Øystein Middelthun -- To unsubscribe from this list: send the li

Re: tree root

2012-10-03 Thread Mitch Harder
On Wed, Oct 3, 2012 at 11:35 AM, Øystein Sættem Middelthun wrote: > Hi! > > I have a broken btrfs unable to mount because it is unable to find the tree > root. Using find-root I find the following: > > Well block 14102764707840 seems great, but generation doesn't match, >

tree root

2012-10-03 Thread Øystein Sættem Middelthun
Hi! I have a broken btrfs unable to mount because it is unable to find the tree root. Using find-root I find the following: Well block 14102764707840 seems great, but generation doesn't match, have=109268, want=109269 Because the filesystem was last in use with a pre 3.2-kernel I am u

Failed tree root

2012-07-07 Thread Øystein Sættem Middelthun
Hi! After a short loss of contact with an underlying disk controller my btrfs partition is unmountable. dmesg provides the following information: [356850.853787] btrfs bad tree block start 0 14102771924992 [356850.853808] btrfs: failed to read tree root on dm-0 [356850.859218] btrfs

[PATCH] Seg fault when csum-tree root is corrupted.

2012-07-02 Thread Anand jain
From: Anand Jain Segmentation fault with the following trace when csum-tree is deliberately corrupted using btrfs-corrupt-block read block failed check_tree_block Couldn't setup csum tree checking extents Check tree block failed, want=29376512, have=0 :: read block failed check_tree_block <

failed to read tree root

2009-09-01 Thread Atila
I'm having a 'failed to read tree root' message when trying to mount a disk which was mounting fine earlier. Is there any hope to get the data back? Atila Sep 1 14:15:33 gentoo-atila [940695.233191] Btrfs loaded Sep 1 14:15:33 gentoo-atila [940695.244360] device fsid 5