[PATCH v2] btrfs: Improve btrfs_search_slot description

2017-12-12 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov --- fs/btrfs/ctree.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 880f4f693263..7e6511dfe73a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@

Re: [PATCH] btrfs: Remove pair of bio_get/put in btrfs_schedule_bio

2017-12-12 Thread Nikolay Borisov
On 13.12.2017 00:09, Liu Bo wrote: > On Tue, Dec 12, 2017 at 07:52:38PM +0100, David Sterba wrote: >> On Mon, Dec 11, 2017 at 02:57:56PM -0800, Liu Bo wrote: >>> On Mon, Dec 11, 2017 at 04:38:48PM +0200, Nikolay Borisov wrote: This code was added in 492bb6deee34 ("Btrfs: Hold a reference on

Re: [PATCH] fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at

2017-12-12 Thread Darrick J. Wong
On Wed, Dec 13, 2017 at 06:38:25AM +0100, Adam Borowski wrote: > This link is replicated in most filesystems' config stanzas. Referring > to an archived version of that site is pointless as it mostly deals with > patches; user documentation is available elsewhere. > > Signed-off-by: Adam

[PATCH] fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at

2017-12-12 Thread Adam Borowski
This link is replicated in most filesystems' config stanzas. Referring to an archived version of that site is pointless as it mostly deals with patches; user documentation is available elsewhere. Signed-off-by: Adam Borowski --- Sending this as one piece; if you guys would

Re: [PATCH v3 0/5] define BTRFS_DEV_STATE

2017-12-12 Thread David Sterba
On Wed, Dec 13, 2017 at 06:38:12AM +0800, Anand Jain wrote: > > > On 12/13/2017 01:42 AM, David Sterba wrote: > > On Sun, Dec 10, 2017 at 05:15:17PM +0800, Anand Jain wrote: > >> As of now device properties and states are being represented as int > >> variable, patches here makes them bit flags

Re: [PATCH 2/2] btrfs-progs: doc: remove explanation of 'X' attribute

2017-12-12 Thread Misono, Tomohiro
1st patch requires btrfs/048's output to be modified. If the patch is Ok, I will update the xfstest. Thanks, Tomohiro On 2017/12/13 3:37, David Sterba wrote: > On Tue, Dec 12, 2017 at 04:08:17PM +0900, Misono, Tomohiro wrote: >> e2fsprogs has removed compression support since v1.43 and there is

Re: [PATCH 00/14] Qgroup metadata reservation rework

2017-12-12 Thread Qu Wenruo
On 2017年12月13日 02:01, David Sterba wrote: > On Tue, Dec 12, 2017 at 04:16:08PM +0200, Nikolay Borisov wrote: >> >> >> On 12.12.2017 09:34, Qu Wenruo wrote: >>> [Overall] >>> The previous rework on qgroup reservation system put a lot of effort on >>> data, which works quite fine. >>> >>> But it

Re: [PATCH 00/14] Qgroup metadata reservation rework

2017-12-12 Thread Qu Wenruo
On 2017年12月13日 05:12, David Sterba wrote: > On Tue, Dec 12, 2017 at 03:34:22PM +0800, Qu Wenruo wrote: >> The patch is consist of 2 main parts: >> 1) Type based qgroup reservation >>The original patchset is sent several months ago. >>Nothing is modified at all, just rebased. And not

[PATCH v2] Btrfs: btrfs_dedupe_file_range() ioctl, remove 16MiB restriction

2017-12-12 Thread Timofey Titovets
At now btrfs_dedupe_file_range() restricted to 16MiB range for limit locking time and memory requirement for dedup ioctl() For too big input range code silently set range to 16MiB Let's remove that restriction by do iterating over dedup range. That's backward compatible and will not change

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2017-12-12 Thread Josef Bacik
On Wed, Dec 13, 2017 at 09:20:04AM +1100, Dave Chinner wrote: > On Tue, Dec 12, 2017 at 01:05:35PM -0500, Josef Bacik wrote: > > On Tue, Dec 12, 2017 at 10:36:19AM +1100, Dave Chinner wrote: > > > On Mon, Dec 11, 2017 at 04:55:31PM -0500, Josef Bacik wrote: > > > > From: Josef Bacik

Re: [PATCH v9 0/5] Add the ability to do BPF directed error injection

2017-12-12 Thread Darrick J. Wong
On Mon, Dec 11, 2017 at 11:36:45AM -0500, Josef Bacik wrote: > This is the same as v8, just rebased onto the bpf tree. > > v8->v9: > - rebased onto the bpf tree. > > v7->v8: > - removed the _ASM_KPROBE_ERROR_INJECT since it was not needed. > > v6->v7: > - moved the opt-in macro to bpf.h out of

Re: [PATCH v3 0/5] define BTRFS_DEV_STATE

2017-12-12 Thread Anand Jain
On 12/13/2017 01:42 AM, David Sterba wrote: On Sun, Dec 10, 2017 at 05:15:17PM +0800, Anand Jain wrote: As of now device properties and states are being represented as int variable, patches here makes them bit flags instead. Further, wip patches such as device failed state needs this cleanup.

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2017-12-12 Thread Dave Chinner
On Tue, Dec 12, 2017 at 01:05:35PM -0500, Josef Bacik wrote: > On Tue, Dec 12, 2017 at 10:36:19AM +1100, Dave Chinner wrote: > > On Mon, Dec 11, 2017 at 04:55:31PM -0500, Josef Bacik wrote: > > > From: Josef Bacik > > > > > > Now that we have metadata counters in the VM, we need

Re: [PATCH] btrfs: Remove pair of bio_get/put in btrfs_schedule_bio

2017-12-12 Thread Liu Bo
On Tue, Dec 12, 2017 at 07:52:38PM +0100, David Sterba wrote: > On Mon, Dec 11, 2017 at 02:57:56PM -0800, Liu Bo wrote: > > On Mon, Dec 11, 2017 at 04:38:48PM +0200, Nikolay Borisov wrote: > > > This code was added in 492bb6deee34 ("Btrfs: Hold a reference on bios > > > during submit_bio, add some

Re: [PATCH 0/3] Minor compression heuristic cleanups

2017-12-12 Thread Timofey Titovets
2017-12-12 23:55 GMT+03:00 David Sterba : > The callback pointers for radix_sort are not needed, we don't plan to > export the function now. The compiler is smart enough to replace the > indirect calls with direct ones, so there's no change in the resulting > asm code. > > David

Re: [Question] Two variants of SB reads can we move into bio read instead ?

2017-12-12 Thread David Sterba
On Fri, Dec 08, 2017 at 06:27:10PM +0800, Anand Jain wrote: > > David, > > There are two variants of SB read, one using the device cache [1] > and the other buffer head [2]. > > [1] btrfs_read_disk_super() > [2] btrfs_read_dev_super() > > Patch,

Re: [PATCH 00/14] Qgroup metadata reservation rework

2017-12-12 Thread David Sterba
On Tue, Dec 12, 2017 at 03:34:22PM +0800, Qu Wenruo wrote: > The patch is consist of 2 main parts: > 1) Type based qgroup reservation >The original patchset is sent several months ago. >Nothing is modified at all, just rebased. And not conflict at all. > >It's from patch 1 to patch 6.

[PATCH 0/2] More unnecessary argument cleanups

2017-12-12 Thread David Sterba
Another step peeling off the unnecessary arguments, this time the unlock_extent*. David Sterba (2): btrfs: add separate helper for unlock_extent_cached with GFP_ATOMIC btrfs: sink unlock_extent parameter gfp_flags fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c| 12

[PATCH 2/2] btrfs: sink unlock_extent parameter gfp_flags

2017-12-12 Thread David Sterba
All callers pass either GFP_NOFS or GFP_KERNEL now, so we can sink the parameter to the function, though we lose some of the slightly better semantics of GFP_KERNEL in some places, it's worth cleaning up the callchains. Signed-off-by: David Sterba --- fs/btrfs/disk-io.c

[PATCH 1/2] btrfs: add separate helper for unlock_extent_cached with GFP_ATOMIC

2017-12-12 Thread David Sterba
There's only one instance where we pass different gfp mask to unlock_extent_cached. Add a separate helper for that and then we can drop the gfp parameter from unlock_extent_cached. Signed-off-by: David Sterba --- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 7 +++ 2

[PATCH 2/3] btrfs: heuristic: open code copy_call callback of radix sort

2017-12-12 Thread David Sterba
The callback is trivial and we don't need the abstraction for our purposes. Let's open code it. Signed-off-by: David Sterba --- fs/btrfs/compression.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/compression.c

[PATCH 3/3] btrfs: heuristic: call get4bits directly

2017-12-12 Thread David Sterba
As it's a single instance and local to the file, we don't need to pass it as an argument. Signed-off-by: David Sterba --- fs/btrfs/compression.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index

[PATCH 1/3] btrfs: heuristic: open code get_num callback of radix sort

2017-12-12 Thread David Sterba
The callback is trivial and we don't need the abstraction for our purposes. Let's open code it and also make the array types explicit. Signed-off-by: David Sterba --- fs/btrfs/compression.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff

[PATCH 0/3] Minor compression heuristic cleanups

2017-12-12 Thread David Sterba
The callback pointers for radix_sort are not needed, we don't plan to export the function now. The compiler is smart enough to replace the indirect calls with direct ones, so there's no change in the resulting asm code. David Sterba (3): btrfs: heuristic: open code get_num callback of radix

Re: [PATCH v3 0/4] btrfs: cleanup mount path

2017-12-12 Thread David Sterba
On Mon, Oct 16, 2017 at 05:15:38PM +0200, David Sterba wrote: > On Mon, Sep 25, 2017 at 04:26:30PM +0900, Misono, Tomohiro wrote: > > Summary: > > Cleanup mount path by avoiding calling btrfs_mount() twice. > > No functional change. See below for longer explanation. > > > > Changelog: > > v3: > >

Re: [PATCH 3/4] btrfs: split parse_early_options() in two

2017-12-12 Thread David Sterba
On Mon, Sep 25, 2017 at 04:28:36PM +0900, Misono, Tomohiro wrote: > Now parse_early_options() is used by both btrfs_mount() and mount_root(). > However, the former only needs subvol related part and the latter needs > the others. > > Therefore extract the subvol related parts from

Re: [PATCH 1/4] btrfs: add mount_root() and new file_system_type

2017-12-12 Thread David Sterba
On Mon, Sep 25, 2017 at 04:27:07PM +0900, Misono, Tomohiro wrote: > Add mount_root() and new file_system_type for preparation of cleanup of > btrfs_mount(). Code path is not changed yet. > > mount_root() is almost the same as current btrfs_mount(), but doesn't > have subvolume related part. > >

Re: [PATCH v3] Btrfs: heuristic replace heap sort with radix sort

2017-12-12 Thread David Sterba
On Tue, Dec 05, 2017 at 11:02:08AM +0300, Timofey Titovets wrote: > Slowest part of heuristic for now is kernel heap sort() > It's can take up to 55% of runtime on sorting bucket items. > > As sorting will always call on most data sets to get correctly > byte_core_set_size, the only way to speed

Re: [PATCH] Btrfs: raid56: fix race between merge_bio and rbio_orig_end_io

2017-12-12 Thread David Sterba
On Fri, Dec 08, 2017 at 04:02:35PM -0700, Liu Bo wrote: > We're not allowed to take any new bios to rbio->bio_list in > rbio_orig_end_io(), otherwise we may get merged with more bios and > rbio->bio_list is not empty. > > This should only happens in error-out cases, the normal path of > recover

Re: [PATCH] btrfs: Improve btrfs_search_slot description

2017-12-12 Thread David Sterba
On Fri, Dec 08, 2017 at 05:06:25PM +0200, Nikolay Borisov wrote: > Signed-off-by: Nikolay Borisov > --- > fs/btrfs/ctree.c | 32 ++-- > 1 file changed, 22 insertions(+), 10 deletions(-) > > diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c > index

Re: [PATCH] btrfs: Rename bin_search -> btrfs_bin_search

2017-12-12 Thread David Sterba
On Fri, Dec 08, 2017 at 04:27:43PM +0200, Nikolay Borisov wrote: > Currently there are 2 function doing binary search on btrfs nodes: > bin_search and btrfs_bin_search. The latter being a simple wrapper for > the former. So eliminate the wrapper and just rename bin_search to > btrfs_bin_search. No

Re: [PATCH 2/2] btrfs: sink extent_write_full_page tree argument

2017-12-12 Thread David Sterba
On Fri, Dec 08, 2017 at 03:55:59PM +0200, Nikolay Borisov wrote: > The tree argument passed to extent_write_full_page is referenced from > the page being passed to the same function. Since we already have > enough information to get the reference, remove the function parameter. > > Signed-off-by:

Re: [PATCH 1/2] btrfs: sink extent_write_locked_range tree parameter

2017-12-12 Thread David Sterba
On Fri, Dec 08, 2017 at 03:55:58PM +0200, Nikolay Borisov wrote: > This function is called only from submit_compressed_extents and the > io tree being passed is always that of the inode. But we are also > passing the inode, so just move getting the io tree pointer in > extent_write_locked_range to

Re: [PATCH] btrfs: Remove pair of bio_get/put in btrfs_schedule_bio

2017-12-12 Thread David Sterba
On Mon, Dec 11, 2017 at 02:57:56PM -0800, Liu Bo wrote: > On Mon, Dec 11, 2017 at 04:38:48PM +0200, Nikolay Borisov wrote: > > This code was added in 492bb6deee34 ("Btrfs: Hold a reference on bios > > during submit_bio, add some extra bio checks"). However, holding a > > reference on a bio is

Re: [PATCH 2/2] btrfs-progs: doc: remove explanation of 'X' attribute

2017-12-12 Thread David Sterba
On Tue, Dec 12, 2017 at 04:08:17PM +0900, Misono, Tomohiro wrote: > e2fsprogs has removed compression support since v1.43 and there is no field > 'X' (no compress) for lxattr now. So, just remove the explanation. Hm right, I hoped that we could export the NOCOMP flag through lsattr/chattr, but

Re: [PATCH] btrfs: Fix out of bounds access in btrfs_search_slot

2017-12-12 Thread David Sterba
On Tue, Dec 12, 2017 at 11:14:49AM +0200, Nikolay Borisov wrote: > When modifying a tree where the root is at BTRFS_MAX_LEVEL - 1 then > the level variable is going to be 7 (this is the max height of the > tree). On the other hand btrfs_cow_block is always called with > "level + 1" as an index

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2017-12-12 Thread Josef Bacik
On Tue, Dec 12, 2017 at 10:36:19AM +1100, Dave Chinner wrote: > On Mon, Dec 11, 2017 at 04:55:31PM -0500, Josef Bacik wrote: > > From: Josef Bacik > > > > Now that we have metadata counters in the VM, we need to provide a way to > > kick > > writeback on dirty metadata.

Re: [PATCH 00/14] Qgroup metadata reservation rework

2017-12-12 Thread David Sterba
On Tue, Dec 12, 2017 at 04:16:08PM +0200, Nikolay Borisov wrote: > > > On 12.12.2017 09:34, Qu Wenruo wrote: > > [Overall] > > The previous rework on qgroup reservation system put a lot of effort on > > data, which works quite fine. > > > > But it takes less focus on metadata reservation,

Re: [PATCH v3 0/5] define BTRFS_DEV_STATE

2017-12-12 Thread David Sterba
On Sun, Dec 10, 2017 at 05:15:17PM +0800, Anand Jain wrote: > As of now device properties and states are being represented as int > variable, patches here makes them bit flags instead. Further, wip > patches such as device failed state needs this cleanup. > > v2: > Adds

Re: [PATCH v9 0/5] Add the ability to do BPF directed error injection

2017-12-12 Thread Alexei Starovoitov
On 12/11/17 8:36 AM, Josef Bacik wrote: This is the same as v8, just rebased onto the bpf tree. v8->v9: - rebased onto the bpf tree. v7->v8: - removed the _ASM_KPROBE_ERROR_INJECT since it was not needed. v6->v7: - moved the opt-in macro to bpf.h out of kprobes.h. v5->v6: - add

Re: [PATCH v2] Btrfs: do not merge rbios if their fail stripe index are not identical

2017-12-12 Thread David Sterba
On Mon, Dec 11, 2017 at 02:56:31PM -0700, Liu Bo wrote: > Since fail stripe index in rbio would be used to decide which > algorithm reconstruction would be run, we cannot merge rbios if > their's fail striped index are different, otherwise, one of the two > reconstructions would fail. > >

Re: [PATCH 23/45] fs: btrfs: remove duplicate includes

2017-12-12 Thread David Sterba
On Wed, Dec 06, 2017 at 10:14:31PM +0530, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge Added to queue,

Re: xfstests/btrfs/100 and 151 failure

2017-12-12 Thread Lakshmipathi.G
> Actually 151 has been failing for me as well but not 100 > Okay, can you share the kernel .config file? I'll give it a try with those config and check 100, sometime tomorrow. Cheers, Lakshmipathi.G http://www.giis.co.in http://www.webminal.org -- To unsubscribe from this list: send the

Re: broken btrfs filesystem

2017-12-12 Thread Austin S. Hemmelgarn
On 2017-12-12 11:24, Hugo Mills wrote: On Tue, Dec 12, 2017 at 04:18:09PM +, Neal Becker wrote: Is it possible to check while it is mounted? Certainly not while mounted read-write. While mounted read-only -- I'm not certain. Possibly. In theory, it is possible, but I think that the

Re: broken btrfs filesystem

2017-12-12 Thread Hugo Mills
On Tue, Dec 12, 2017 at 04:18:09PM +, Neal Becker wrote: > Is it possible to check while it is mounted? Certainly not while mounted read-write. While mounted read-only -- I'm not certain. Possibly. Hugo. > On Tue, Dec 12, 2017 at 9:52 AM Hugo Mills wrote: > > >

Re: xfstests/btrfs/100 and 151 failure

2017-12-12 Thread Nikolay Borisov
On 12.12.2017 18:06, Nikolay Borisov wrote: > > > On 12.12.2017 17:55, Lakshmipathi.G wrote: >> Hi. >> >> While checking with latest misc-next branch from btrfs-devel. >> btrfs/100 and 151 failed. >> Details available on below bugzilla links. thanks >> >>

Re: Chunk-Recovery fails with alignment error

2017-12-12 Thread Benjamin Beichler
Hi, the patch unfortunately did not work, because I didn't know for which version/tree was made, since it does not apply for 4.14. or 4.15. But since I got your hint with the possibility of the old age of my btrfs volume, I simply tried an old ubuntu live disk, and it mounted the volume :-) Then

Re: xfstests/btrfs/100 and 151 failure

2017-12-12 Thread Nikolay Borisov
On 12.12.2017 17:55, Lakshmipathi.G wrote: > Hi. > > While checking with latest misc-next branch from btrfs-devel. > btrfs/100 and 151 failed. > Details available on below bugzilla links. thanks > > https://bugzilla.kernel.org/show_bug.cgi?id=198085 >

xfstests/btrfs/100 and 151 failure

2017-12-12 Thread Lakshmipathi.G
Hi. While checking with latest misc-next branch from btrfs-devel. btrfs/100 and 151 failed. Details available on below bugzilla links. thanks https://bugzilla.kernel.org/show_bug.cgi?id=198085 https://bugzilla.kernel.org/show_bug.cgi?id=198087 Cheers, Lakshmipathi.G http://www.giis.co.in

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-12 Thread Alan Stern
On Mon, 11 Dec 2017, Joe Perches wrote: > > - I don't understand the error for xa_head here: > > > > struct xarray { > > spinlock_t xa_lock; > > gfp_t xa_flags; > > void __rcu *xa_head; > > }; > > > >Do people really think that: > > > > struct

Re: broken btrfs filesystem

2017-12-12 Thread Hugo Mills
On Tue, Dec 12, 2017 at 09:02:56AM -0500, Neal Becker wrote: > sudo ls -la ~/ > [sudo] password for nbecker: > ls: cannot access '/home/nbecker/.bash_history': No such file or directory > ls: cannot access '/home/nbecker/.bash_history': No such file or directory > ls: cannot access

Re: [PATCH 00/14] Qgroup metadata reservation rework

2017-12-12 Thread Nikolay Borisov
On 12.12.2017 09:34, Qu Wenruo wrote: > [Overall] > The previous rework on qgroup reservation system put a lot of effort on > data, which works quite fine. > > But it takes less focus on metadata reservation, causing some problem > like metadata reservation underflow and noisy kernel warning. >

broken btrfs filesystem

2017-12-12 Thread Neal Becker
sudo ls -la ~/ [sudo] password for nbecker: ls: cannot access '/home/nbecker/.bash_history': No such file or directory ls: cannot access '/home/nbecker/.bash_history': No such file or directory ls: cannot access '/home/nbecker/.bash_history': No such file or directory ls: cannot access

OFF-By-One Trouble? [BTRFS in Debian Stretch Kernel 4.9.0-4-amd64]

2017-12-12 Thread Juergen Sauer
Hi collegues, this morning we've got a problm with btrfs in Debian Stable. Yesterday we had our fs filled below 30% space usage. No further usage came in the usage is nearly the same, but ... # df -h . DateisystemGröße Benutzt Verf. Verw% Eingehängt auf /dev/vdb1 483G483G 148K

[PATCH] btrfs: Fix out of bounds access in btrfs_search_slot

2017-12-12 Thread Nikolay Borisov
When modifying a tree where the root is at BTRFS_MAX_LEVEL - 1 then the level variable is going to be 7 (this is the max height of the tree). On the other hand btrfs_cow_block is always called with "level + 1" as an index into the nodes and slots arrays. This leads to an out of bounds access.