[PATCH 2/2 RFC] btrfs: btrfs_defrag_root() doesn't defrag extent root tree

2016-12-20 Thread Anand Jain
Since btrfs_defrag_leaves() does not support extent_root, remove its corresponding call. The user can use the file based defrag to defrag extents as of now. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c in

[PATCH 1/2] btrfs: btrfs_defrag_root() doesn't support any option

2016-12-20 Thread Anand Jain
Both BTRFS_IOC_DEFRAG and BTRFS_IOC_DEFRAG_RANGE call the same function- btrfs_ioctl_defrag(), however BTRFS_IOC_DEFRAG does not support any argument, so check that and return not supported if provided. This has valid impact at the user end, in the cli below btrfs filesystem defrag -clzo /btrfs t

Re: OOM: Better, but still there on

2016-12-20 Thread Michal Hocko
TL;DR there is another version of the debugging patch. Just revert the previous one and apply this one instead. It's still not clear what is going on but I suspect either some misaccounting or unexpeted pages on the LRU lists. I have added one more tracepoint, so please enable also mm_vmscan_inacti

Re: [PATCH] fstests: btrfs: Remove btrfs/047 since upstream don't accept stream-version

2016-12-20 Thread Eryu Guan
On Tue, Dec 20, 2016 at 09:24:56AM +0800, Qu Wenruo wrote: > Btrfs upstream doesn't accept stream-version, so the test is never ran > on upstream kernel nor btrfs-progs. > > Just remove it. > > Signed-off-by: Qu Wenruo Looks fine to me, but I'd like to see an ack or review from btrfs developers

Re: [PATCH] btrfs-progs: Get the highest inode for lost+found

2016-12-20 Thread Qu Wenruo
At 12/20/2016 08:08 PM, Goldwyn Rodrigues wrote: From: Goldwyn Rodrigues root->highest_inode is not accurate at the time of creating a lost+found and it fails because the highest_inode+1 is already present. This could be because of fixes after highest_inode is set. Instead, search for the hig

Re: [PATCH 1/2] btrfs: drop trace_btrfs_all_work_done() from normal_work_helper()

2016-12-20 Thread Qu Wenruo
At 12/21/2016 01:26 AM, David Sterba wrote: Adding Qu to CC, On Wed, Dec 14, 2016 at 03:05:29PM +0100, Sebastian Andrzej Siewior wrote: For btrfs_scrubparity_helper() the ->func() is set to scrub_parity_bio_endio_worker(). This functions invokes scrub_free_parity() which kfrees() the `work' o

Re: btrfs_log2phys: cannot lookup extent mapping

2016-12-20 Thread Duncan
David Hanke posted on Tue, 20 Dec 2016 09:52:25 -0600 as excerpted: > I've been using a btrfs-based volume for backups, but lately the > system's been filling the syslog with errors like "btrfs_log2phys: > cannot lookup extent mapping for 7129125486592" at the rate of hundreds > per second. (Pleas

Re: [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-20 Thread Dave Chinner
On Mon, Dec 19, 2016 at 02:06:19PM -0800, Darrick J. Wong wrote: > On Tue, Dec 20, 2016 at 08:24:13AM +1100, Dave Chinner wrote: > > On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduc

[josef-btrfs:inet-rework 1/5] net/dccp/ipv6.c:961:2: error: unknown field 'bind_conflict' specified in initializer

2016-12-20 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git inet-rework head: 376f3c82a1e4e93e5eebb08b0470c53f9edc15e9 commit: bad57dc99139c6d3bfe7a1f640f17239880009ec [1/5] inet: replace ->bind_conflict with ->rcv_saddr_equal config: x86_64-randconfig-x014-201651 (attached as

[PATCH 2/2] btrfs: fix locking when we put back a delayed ref that's too new

2016-12-20 Thread jeffm
From: Jeff Mahoney In __btrfs_run_delayed_refs, when we put back a delayed ref that's too new, we have already dropped the lock on locked_ref when we set ->processing = 0. This patch keeps the lock to cover that assignment. Fixes: d7df2c796d7 (Btrfs: attach delayed ref updates to delayed ref he

[PATCH 1/2 v2] btrfs: fix error handling when run_delayed_extent_op fails

2016-12-20 Thread jeffm
From: Jeff Mahoney In __btrfs_run_delayed_refs, the error path when run_delayed_extent_op fails sets locked_ref->processing = 0 but doesn't re-increment delayed_refs->num_heads_ready. As a result, we end up triggering the WARN_ON in btrfs_select_ref_head. Fixes: d7df2c796d7 (Btrfs: attach delay

Re: [PATCH] btrfs: fix error handling when run_delayed_extent_op fails

2016-12-20 Thread Jeff Mahoney
On 12/20/16 1:00 PM, David Sterba wrote: > On Tue, Dec 13, 2016 at 02:33:33PM -0500, Jeff Mahoney wrote: >> In __btrfs_run_delayed_refs, the error path when run_delayed_extent_op >> fails sets locked_ref->processing = 0 but doesn't re-increment >> delayed_refs->num_heads_ready. As a result, we can

Re: [PATCH] btrfs: fix error handling when run_delayed_extent_op fails

2016-12-20 Thread David Sterba
On Tue, Dec 13, 2016 at 02:33:33PM -0500, Jeff Mahoney wrote: > In __btrfs_run_delayed_refs, the error path when run_delayed_extent_op > fails sets locked_ref->processing = 0 but doesn't re-increment > delayed_refs->num_heads_ready. As a result, we can end up triggering > the WARN_ON in btrfs_sele

Re: [CORRUPTION FILESYSTEM] Corrupted and unrecoverable file system during the snapshot receive

2016-12-20 Thread Xin Zhou
Hi, The system seems running some customized scripts continuously backup data from a NVME drive to HDDs. If the 3 HDDs backup storage are same in btrfs config, and the there is a bug in btrfs code, they all suppose to fail after the same operation sequence. Otherwise, probably one of the HDDs m

Re: [PATCH 1/2] btrfs: drop trace_btrfs_all_work_done() from normal_work_helper()

2016-12-20 Thread David Sterba
Adding Qu to CC, On Wed, Dec 14, 2016 at 03:05:29PM +0100, Sebastian Andrzej Siewior wrote: > For btrfs_scrubparity_helper() the ->func() is set to > scrub_parity_bio_endio_worker(). This functions invokes > scrub_free_parity() which kfrees() the `work' object. All is good as > long as trace event

btrfs_log2phys: cannot lookup extent mapping

2016-12-20 Thread David Hanke
Greetings! I've been using a btrfs-based volume for backups, but lately the system's been filling the syslog with errors like "btrfs_log2phys: cannot lookup extent mapping for 7129125486592" at the rate of hundreds per second. (Please see output below for more details.) Despite the errors, th

Re: [PATCH v2] btrfs-progs: Fix NULL pointer when receive clone operation

2016-12-20 Thread David Sterba
On Fri, Dec 16, 2016 at 09:37:54AM +0900, Tsutomu Itoh wrote: > On 2016/12/15 17:37, Qu Wenruo wrote: > > Regression introduced by: > > commit a2f7af94abe4a3491ca1280a2ae1d63edc0d62ab > > Author: Prasanth K S R > > Date: Sat Dec 10 19:17:43 2016 +0530 > > > > btrfs-progs: subvol_uuid_search

Re: [PATCH][V2] btrfs: remove redundant inode null check

2016-12-20 Thread David Sterba
On Tue, Dec 20, 2016 at 04:18:37PM +, Colin King wrote: > From: Colin Ian King > > The check for a null inode is redundant since the function > is a callback for exportfs, which will itself crash if > dentry->d_inode or parent->d_inode is NULL. Removing the > null check makes this consistent

Re: [PATCH 2/4] Btrfs: coding style fixes

2016-12-20 Thread David Sterba
On Thu, Dec 15, 2016 at 02:38:05PM +0100, Seraphime Kirkovski wrote: > This eliminates the rare uses of `unsigned` instead of `unsigned int`. As far as I'm concerned, I don't like this change. It's fine to encourage 'unsigned int' in new code, but changing the existing ones does not sound very use

Re: [GIT PULL] btrfs fixes and cleanups

2016-12-20 Thread David Sterba
On Wed, Dec 14, 2016 at 11:13:32PM -0800, Liu Bo wrote: > This is the collection of my patches targetting 4.10, I've > dropped patch "Btrfs: adjust len of writes if following a > preallocated extent" because of the deadlock caused by this > commit. > > Patches are based on v4.9-rc8, and test again

Re: [PATCH 3/4] Btrfs: ACCESS_ONCE cleanup

2016-12-20 Thread David Sterba
On Thu, Dec 15, 2016 at 02:38:16PM +0100, Seraphime Kirkovski wrote: > This replaces ACCESS_ONCE macro with the corresponding > READ|WRITE macros > > Signed-off-by: Seraphime Kirkovski Reviewed-by: David Sterba Added to cleanups branch, thanks. -- To unsubscribe from this list: send the line "u

[PATCH][V2] btrfs: remove redundant inode null check

2016-12-20 Thread Colin King
From: Colin Ian King The check for a null inode is redundant since the function is a callback for exportfs, which will itself crash if dentry->d_inode or parent->d_inode is NULL. Removing the null check makes this consistent with other file systems. Also remove the redundant null dir check too.

Re: [PATCH 4/4] Btrfs: code cleanup min/max -> min_t/max_t

2016-12-20 Thread David Sterba
On Thu, Dec 15, 2016 at 02:38:28PM +0100, Seraphime Kirkovski wrote: > This cleans up the cases where the min/max macros were used with a cast > rather than using directly min_t/max_t. > > Signed-off-by: Seraphime Kirkovski Reviewed-by: David Sterba Added to cleanups branch, thanks. -- To unsu

Re: [PATCH] btrfs: remove redundant inode null check

2016-12-20 Thread David Sterba
On Fri, Dec 16, 2016 at 03:24:46PM +, Colin King wrote: > From: Colin Ian King > > The check for a null inode is redundant since the function > is a callback for exportfs, which will itself crash if > dentry->d_inode or parent->d_inode is NULL. Removing the > null check makes this consistent

Re: [PATCH] btrfs: use rb_entry()

2016-12-20 Thread David Sterba
On Mon, Dec 19, 2016 at 11:46:23AM -0500, Josef Bacik wrote: > On Mon, Dec 19, 2016 at 9:53 AM, Geliang Tang > wrote: > > To make the code clearer, use rb_entry() instead of container_of() to > > deal with rbtree. > > > > Signed-off-by: Geliang Tang > > Reviewed-by: Josef Bacik Added to clea

Re: Newbie question about linux-btrfs patch

2016-12-20 Thread David Sterba
On Mon, Dec 19, 2016 at 05:23:33PM +, Xiang, Yang wrote: > We are interested in testing out and possibly contribute to the btrfs > dedup effort. I¹ve been looking around the github at: > git://repo.or.cz/btrfs-progs-unstable/devel.git > And I couldn¹t locate any of the patch set some of you men

[PATCH] btrfs-progs: Get the highest inode for lost+found

2016-12-20 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues root->highest_inode is not accurate at the time of creating a lost+found and it fails because the highest_inode+1 is already present. This could be because of fixes after highest_inode is set. Instead, search for the highest inode in the tree and use it for lost+found. Th

Re: [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-20 Thread Michal Hocko
On Tue 20-12-16 08:24:13, Dave Chinner wrote: > On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduce > > KM_NOLOCKDEP alias for the xfs allocation APIs. While we are at it > > also change KM