Re: how to repair a damaged filesystem with btrfs raid5

2015-02-02 Thread Tobias Holst
Hi. There is a known bug when you re-plug in a missing hdd of a btrfs raid without wiping the device before. In worst case this results in a totally corrupted filesystem as it did sometimes during my tests of the raid6 implementation. With raid1 it may just go back in time to the point when you

[PATCH] Btrfs: btrfs_release_extent_buffer_page() didn't free pages of dummy extent

2015-02-02 Thread Forrest Liu
btrfs_release_extent_buffer_page() can't handle dummy extent that allocated by btrfs_clone_extent_buffer() properly. Reference count of pages that allocated by btrfs_clone_extent_buffer() was 2, 1 by alloc_page(), and another by attach_extent_buffer_page(). Signed-off-by: Chien-Kuan Yeh

btrfs-progs bash completion

2015-02-02 Thread John C F
Hi I've extended the bash-completion file proposed by Joseph Wang, which was extended from that by Alfredo Esteban. I don't know about any licensing info that I should mention in the file, but I don't claim any rights on it, and anyone is free to modify/distribute with/without acknowledging me.

Re: [PATCH v2 1/5] btrfs-progs: Record orphan data extent ref to corresponding root.

2015-02-02 Thread David Sterba
On Fri, Jan 02, 2015 at 03:12:29PM +0800, Qu Wenruo wrote: v2: Do not record file extent if the file extent pointed by the data backref exists but only bytenr mismatch. This fix a regression bug causing fsck-test 001 fail. Patches 1-5 applied to 3.19, thanks. -- To unsubscribe from

Re: [PATCH] Btrfs: fix find_free_dev_extent() malfunction in case device tree has hole

2015-02-02 Thread Ed Tomlinson
Hi, Found a problem compile testing this. hole_size = key_offset - search_start; Should not that be key.offset ? TIA Ed Tomlinson On Monday, February 2, 2015 2:31:39 AM EST, Forrest Liu wrote: If device tree has hole, find_free_dev_extent() cannot find available address properly. The

Re: btrfs-progs bash completion

2015-02-02 Thread David Sterba
On Mon, Feb 02, 2015 at 07:36:03PM +0530, John C F wrote: I've extended the bash-completion file proposed by Joseph Wang, which was extended from that by Alfredo Esteban. Thanks! Worked for me and I think we can keep it up to date with new commands. I don't know about any licensing info that

Re: [PATCH v3 1/2] btrfs-progs: read_tree_block() and read_node_slot() cleanup.

2015-02-02 Thread David Sterba
On Wed, Jan 28, 2015 at 10:12:55AM +0800, Qu Wenruo wrote: Allow read_tree_block() and read_node_slot() to return error pointer. This should help caller to get more specified error number. For existing callers, change (!eb) judgmentt to (!extent_buffer_uptodate(eb)) to keep the

[PATCH] Btrfs: fix BUG_ON in btrfs_orphan_add() when delete unused block group

2015-02-02 Thread Forrest Liu
btrfs_orphan_reserve_metadata() will grab metadata reservation from transaction handle, and the transaction handle was passed from btrfs_delete_unused_bgs() when delete unused block group. Repace btrfs_join_transaction() with btrfs_start_transaction() in btrfs_delete_unused_bgs() to prevent