Btrfs resize seems to deadlock

2018-10-19 Thread Andrew Nelson
I am having an issue with btrfs resize in Fedora 28. I am attempting to enlarge my Btrfs partition. Every time I run "btrfs filesystem resize max $MOUNT", the command runs for a few minutes and then hangs forcing the system to be reset. I am not sure what the state of the filesystem really is at

Re: Is it possible to construct snapshots manually?

2018-10-19 Thread Andrei Borzenkov
19.10.2018 12:41, Cerem Cem ASLAN пишет: > By saying "manually", I mean copying files into a subvolume on a > different mountpoint manually, then mark the target as if it is > created by "btrfs send | btrfs receive". > > Rationale: > > When we delete all common snapshots from source, we have to

I messed up disk replace of RAID5

2018-10-19 Thread Marco L. Crociani
Hi, I have a copy of this data online and a backup offline but I would like to find out if we can recover this. A drive broke and I made a mess while replacing it. each of sda,sdb,sdc,sdd is a 2 disk hardware RAID0. one disk of sda died and. I replaced it. Made a new raid0 array: sde This was my

Re: [PATCH 0/6] FSID change kernel support

2018-10-19 Thread David Sterba
On Fri, Oct 19, 2018 at 05:31:09PM +0300, Nikolay Borisov wrote: > > > On 19.10.2018 17:18, David Sterba wrote: > > On Thu, Oct 11, 2018 at 06:03:20PM +0300, Nikolay Borisov wrote: > >> Here is the second posting of the fsid change support for the kernel. For > >> background information you can

Re: [PATCH v9 0/6] Btrfs: implement swap file support

2018-10-19 Thread David Sterba
On Thu, Sep 27, 2018 at 11:17:32AM -0700, Omar Sandoval wrote: > From: Omar Sandoval > This series implements swap file support for Btrfs. > > Changes from v8 [1]: > > - Fixed a bug in btrfs_swap_activate() which would cause us to miss some > file extents if they were merged into one extent

Re: [PATCH 0/6] btrfs: qgroup: Delay subtree scan to reduce overhead

2018-10-19 Thread David Sterba
On Fri, Oct 19, 2018 at 10:51:47PM +0800, Qu Wenruo wrote: > > > On 2018/10/19 下午9:42, David Sterba wrote: > > On Thu, Oct 18, 2018 at 07:17:23PM +0800, Qu Wenruo wrote: > >> This patchset can be fetched from github: > >> https://github.com/adam900710/linux/tree/qgroup_balance_skip_trees > >> >

Re: [PATCH 0/6] btrfs: qgroup: Delay subtree scan to reduce overhead

2018-10-19 Thread Qu Wenruo
On 2018/10/19 下午9:42, David Sterba wrote: > On Thu, Oct 18, 2018 at 07:17:23PM +0800, Qu Wenruo wrote: >> This patchset can be fetched from github: >> https://github.com/adam900710/linux/tree/qgroup_balance_skip_trees >> >> Which is still based on v4.19-rc1, but with previous submitted patches

Re: [PATCH 0/6] FSID change kernel support

2018-10-19 Thread Nikolay Borisov
On 19.10.2018 17:18, David Sterba wrote: > On Thu, Oct 11, 2018 at 06:03:20PM +0300, Nikolay Borisov wrote: >> Here is the second posting of the fsid change support for the kernel. For >> background information you can refer to v1 [0]. The main changes in this >> version >> are around the

Re: [PATCH 0/6] FSID change kernel support

2018-10-19 Thread David Sterba
On Thu, Oct 11, 2018 at 06:03:20PM +0300, Nikolay Borisov wrote: > Here is the second posting of the fsid change support for the kernel. For > background information you can refer to v1 [0]. The main changes in this > version > are around the handling of possible split-brain scenarios. I've

Re: [PATCH 0/6] btrfs: qgroup: Delay subtree scan to reduce overhead

2018-10-19 Thread Qu Wenruo
On 2018/10/19 下午9:42, David Sterba wrote: > On Thu, Oct 18, 2018 at 07:17:23PM +0800, Qu Wenruo wrote: >> This patchset can be fetched from github: >> https://github.com/adam900710/linux/tree/qgroup_balance_skip_trees >> >> Which is still based on v4.19-rc1, but with previous submitted patches

Re: [PATCH 0/6] btrfs: qgroup: Delay subtree scan to reduce overhead

2018-10-19 Thread David Sterba
On Thu, Oct 18, 2018 at 07:17:23PM +0800, Qu Wenruo wrote: > This patchset can be fetched from github: > https://github.com/adam900710/linux/tree/qgroup_balance_skip_trees > > Which is still based on v4.19-rc1, but with previous submitted patches > as dependency. Please rebase this patchset on

Re: [PATCH 5/6] btrfs: qgroup: Use delayed subtree rescan for balance

2018-10-19 Thread David Sterba
On Fri, Oct 19, 2018 at 03:12:34PM +0200, David Sterba wrote: > On Thu, Oct 18, 2018 at 07:17:28PM +0800, Qu Wenruo wrote: > > +free_out: > > + kfree(block); > > + free_extent_buffer(reloc_eb); > > +out: > > + if (ret < 0) { > > + btrfs_err_rl(fs_info, > > +

Re: [PATCH 5/6] btrfs: qgroup: Use delayed subtree rescan for balance

2018-10-19 Thread David Sterba
On Thu, Oct 18, 2018 at 07:17:28PM +0800, Qu Wenruo wrote: > +free_out: > + kfree(block); > + free_extent_buffer(reloc_eb); > +out: > + if (ret < 0) { > + btrfs_err_rl(fs_info, > + "failed to account subtree at bytenr %llu: %d", > +

Re: [PATCH 4/6] btrfs: qgroup: Introduce per-root swapped blocks infrastructure

2018-10-19 Thread Qu Wenruo
On 2018/10/19 下午6:04, David Sterba wrote: > On Fri, Oct 19, 2018 at 05:46:28PM +0800, Qu Wenruo wrote: >> Did you mean some like this is possible? >> >> rbtree_postorder_for_each_entry_safe() { >> kfree(entry); >> } >> >> If so, I still don't really believe it's OK. >> >> For the following

Re: [PATCH] Btrfs: fix use-after-free during inode eviction

2018-10-19 Thread David Sterba
On Fri, Oct 12, 2018 at 01:02:48PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > At inode.c:evict_inode_truncate_pages(), when we iterate over the inode's > extent states, we access an extent state record's "state" field after we > unlocked the inode's io tree lock. This can lead

Re: [PATCH 4/6] btrfs: qgroup: Introduce per-root swapped blocks infrastructure

2018-10-19 Thread David Sterba
On Fri, Oct 19, 2018 at 05:46:28PM +0800, Qu Wenruo wrote: > Did you mean some like this is possible? > > rbtree_postorder_for_each_entry_safe() { > kfree(entry); > } > > If so, I still don't really believe it's OK. > > For the following tree: > 4 >

Re: [PATCH 4/6] btrfs: qgroup: Introduce per-root swapped blocks infrastructure

2018-10-19 Thread Qu Wenruo
On 2018/10/19 下午5:15, David Sterba wrote: > On Fri, Oct 19, 2018 at 07:29:26AM +0800, Qu Wenruo wrote: >> >> >> On 2018/10/19 上午12:20, David Sterba wrote: >>> On Thu, Oct 18, 2018 at 07:17:27PM +0800, Qu Wenruo wrote: +void btrfs_qgroup_clean_swapped_blocks(struct btrfs_root *root) +{

Is it possible to construct snapshots manually?

2018-10-19 Thread Cerem Cem ASLAN
By saying "manually", I mean copying files into a subvolume on a different mountpoint manually, then mark the target as if it is created by "btrfs send | btrfs receive". Rationale: When we delete all common snapshots from source, we have to send whole snapshot for next time. This ability will

Re: [PATCH 4/6] btrfs: qgroup: Introduce per-root swapped blocks infrastructure

2018-10-19 Thread David Sterba
On Fri, Oct 19, 2018 at 07:29:26AM +0800, Qu Wenruo wrote: > > > On 2018/10/19 上午12:20, David Sterba wrote: > > On Thu, Oct 18, 2018 at 07:17:27PM +0800, Qu Wenruo wrote: > >> +void btrfs_qgroup_clean_swapped_blocks(struct btrfs_root *root) > >> +{ > >> + struct btrfs_qgroup_swapped_blocks