Re: [PATCH 1/2] btrfs: catch cow on deleting snapshots

2018-11-30 Thread Filipe Manana
ease use btrfs_warn(), it makes sure we use a consistent message style, identifies the fs, etc. Also, "thats" should be "that is" or "that's". With that fixed, Reviewed-by: Filipe Manana > + > if (trans->transaction != fs_info->running_transaction)

Re: [RFC PATCH] btrfs: drop file privileges in btrfs_clone_files

2018-11-28 Thread Filipe Manana
On Wed, Nov 28, 2018 at 9:26 AM Lu Fengqi wrote: > > On Wed, Nov 28, 2018 at 09:48:07AM +0200, Nikolay Borisov wrote: > > > > > >On 28.11.18 г. 9:46 ч., Christoph Hellwig wrote: > >> On Wed, Nov 28, 2018 at 09:44:59AM +0200, Nikolay Borisov wrote: > >>> > >>> > >>> On 28.11.18 г. 5:07 ч., Lu

Re: [PATCH][v2] btrfs: run delayed items before dropping the snapshot

2018-12-05 Thread Filipe Manana
y making the delayed > items > per-root, and then simply drop any delayed items for roots that we are going > to > delete. But for now just a quick and easy solution is the safest. > > Cc: sta...@vger.kernel.org > Signed-off-by: Josef Bacik Reviewed-by: Filipe Manana Looks good now. Tha

Re: [PATCH v2 1/3] btrfs: scrub: maintain the unlock order in scrub thread

2018-11-29 Thread Filipe Manana
On Thu, Nov 29, 2018 at 9:27 AM Anand Jain wrote: > > The device_list_mutex and scrub_lock creates a nested locks in > btrfs_scrub_dev(). > > During lock the order is device_list_mutex and then scrub_lock, and during > unlock, the order is device_list_mutex and then scrub_lock. > Fix this to the

Re: [PATCH] btrfs: skip file_extent generation check for free_space_inode in run_delalloc_nocow

2018-11-29 Thread Filipe Manana
write the inode to the disk. > > Fixes: 78d4295b1eee ("btrfs: lift some btrfs_cross_ref_exist checks in nocow > path") > Signed-off-by: Lu Fengqi The code changes look good to me. Reviewed-by: Filipe Manana Thanks. > --- > fs/btrfs/inode.c | 3 ++- > 1 file cha

Re: [PATCH] btrfs: only run delayed refs if we're committing

2018-11-23 Thread Filipe Manana
On Thu, Nov 22, 2018 at 12:35 AM Josef Bacik wrote: > > I noticed in a giant dbench run that we spent a lot of time on lock > contention while running transaction commit. This is because dbench > results in a lot of fsync()'s that do a btrfs_transaction_commit(), and > they all run the delayed

Re: [PATCH] btrfs: only run delayed refs if we're committing

2018-11-27 Thread Filipe Manana
On Tue, Nov 27, 2018 at 7:22 PM Josef Bacik wrote: > > On Fri, Nov 23, 2018 at 04:59:32PM +, Filipe Manana wrote: > > On Thu, Nov 22, 2018 at 12:35 AM Josef Bacik wrote: > > > > > > I noticed in a giant dbench run that we spent a lot of time on lock > > &g

Re: [PATCH] Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation

2018-11-19 Thread Filipe Manana
On Mon, Nov 19, 2018 at 11:09 AM Qu Wenruo wrote: > > > > On 2018/11/19 下午5:48, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > If the quota enable and snapshot creation ioctls are called concurrently > > we can get into a deadlock where th

Re: [PATCH] Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation

2018-11-19 Thread Filipe Manana
On Mon, Nov 19, 2018 at 11:35 AM Qu Wenruo wrote: > > > > On 2018/11/19 下午7:13, Filipe Manana wrote: > > On Mon, Nov 19, 2018 at 11:09 AM Qu Wenruo wrote: > >> > >> > >> > >> On 2018/11/19 下午5:48, fdman...@kernel.org wrote: > >>>

Re: [PATCH] Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation

2018-11-19 Thread Filipe Manana
On Mon, Nov 19, 2018 at 11:52 AM Filipe Manana wrote: > > On Mon, Nov 19, 2018 at 11:35 AM Qu Wenruo wrote: > > > > > > > > On 2018/11/19 下午7:13, Filipe Manana wrote: > > > On Mon, Nov 19, 2018 at 11:09 AM Qu Wenruo wrote: > > >> > > &

Re: [PATCH v2] Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation

2018-11-19 Thread Filipe Manana
On Mon, Nov 19, 2018 at 2:48 PM Qu Wenruo wrote: > > > > On 2018/11/19 下午10:15, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > If the quota enable and snapshot creation ioctls are called concurrently > > we can get into a deadlock where th

Re: [PATCH] Btrfs: bring back key search optimization to btrfs_search_old_slot()

2018-11-26 Thread Filipe Manana
On Fri, Nov 16, 2018 at 11:09 AM wrote: > > From: Filipe Manana > > Commit d7396f07358a ("Btrfs: optimize key searches in btrfs_search_slot"), > dated from August 2013, introduced an optimization to search for keys in a > node/leaf to both btrfs_search_slot

Re: [PATCH v4] Btrfs: fix deadlock with memory reclaim during scrub

2018-11-28 Thread Filipe Manana
On Wed, Nov 28, 2018 at 2:22 PM David Sterba wrote: > > On Mon, Nov 26, 2018 at 08:10:30PM +, Filipe Manana wrote: > > On Mon, Nov 26, 2018 at 6:17 PM David Sterba wrote: > > > > > > On Fri, Nov 23, 2018 at 06:25:40PM +, fdman...@kernel.org wrot

Re: [PATCH 2/3] btrfs: wakeup cleaner thread when adding delayed iput

2018-11-28 Thread Filipe Manana
On Wed, Nov 28, 2018 at 7:09 PM David Sterba wrote: > > On Tue, Nov 27, 2018 at 03:08:08PM -0500, Josef Bacik wrote: > > On Tue, Nov 27, 2018 at 07:59:42PM +, Chris Mason wrote: > > > On 27 Nov 2018, at 14:54, Josef Bacik wrote: > > > > > > > On Tue, Nov 27, 2018 at 10:26:15AM +0200, Nikolay

Re: [PATCH v4] Btrfs: fix deadlock with memory reclaim during scrub

2018-11-26 Thread Filipe Manana
On Mon, Nov 26, 2018 at 6:17 PM David Sterba wrote: > > On Fri, Nov 23, 2018 at 06:25:40PM +, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > When a transaction commit starts, it attempts to pause scrub and it blocks > > until the scrub is pa

Re: [PATCH 2/2] btrfs: run delayed items before dropping the snapshot

2018-11-30 Thread Filipe Manana
On Fri, Nov 30, 2018 at 5:12 PM Filipe Manana wrote: > > On Fri, Nov 30, 2018 at 4:53 PM Josef Bacik wrote: > > > > From: Josef Bacik > > > > With my delayed refs patches in place we started seeing a large amount > > of aborts in __btrfs_free_extent >

<    3   4   5   6   7   8