Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Christoph Anton Mitterer
Hi Nikolay. Thanks. On Wed, 2018-02-21 at 08:34 +0200, Nikolay Borisov wrote: > This looks like the one fixed by > e8f1bc1493855e32b7a2a019decc3c353d94daf6 . It's tagged for stable so > you > should get it eventually. Another consequence of this was that I couldn't sync/umount or shutdown

Re: [PATCH v2 04/27] libbtrfsutil: add btrfs_util_is_subvolume() and btrfs_util_subvolume_id()

2018-02-21 Thread David Sterba
On Thu, Feb 15, 2018 at 11:04:49AM -0800, Omar Sandoval wrote: > --- /dev/null > +++ b/libbtrfsutil/subvolume.c > @@ -0,0 +1,127 @@ > +/* > + * Copyright (C) 2018 Facebook > + * > + * This file is part of libbtrfsutil. > + * > + * libbtrfsutil is free software: you can redistribute it and/or

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Filipe Manana
On Wed, Feb 21, 2018 at 1:10 PM, Nikolay Borisov wrote: > > > On 21.02.2018 15:06, Filipe Manana wrote: >> On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: >>> Currently the DIO read cases uses a botched idea from ext4 to ensure >>> that DIO reads

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Filipe Manana
On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: > Currently the DIO read cases uses a botched idea from ext4 to ensure > that DIO reads don't race with truncate. The idea is that if we have a > pending truncate we set BTRFS_INODE_READDIO_NEED_LOCK which in turn >

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Nikolay Borisov
On 21.02.2018 15:51, Filipe Manana wrote: > On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: >> Currently the DIO read cases uses a botched idea from ext4 to ensure >> that DIO reads don't race with truncate. The idea is that if we have a >> pending truncate we set

Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Christoph Anton Mitterer
Interestingly, I got another one only within minutes after the scrub: Feb 21 15:23:49 heisenberg kernel: BTRFS warning (device dm-0): csum failed root 257 ino 7703 off 56852480 csum 0x42d1b69c expected csum 0x3ce55621 mirror 1 Feb 21 15:23:52 heisenberg kernel: BTRFS warning (device dm-0): csum

Re: [PATCH v2 03/27] libbtrfsutil: add Python bindings

2018-02-21 Thread David Sterba
On Thu, Feb 15, 2018 at 11:04:48AM -0800, Omar Sandoval wrote: > +setup( > +name='btrfsutil', > +version=get_version(), > +description='Library for managing Btrfs filesystems', > +url='https://github.com/kdave/btrfs-progs', > +license='GPLv3', LGPLv3? > +

Re: [PATCH v2 04/27] libbtrfsutil: add btrfs_util_is_subvolume() and btrfs_util_subvolume_id()

2018-02-21 Thread David Sterba
On Wed, Feb 21, 2018 at 12:43:07PM +0100, David Sterba wrote: > On Thu, Feb 15, 2018 at 11:04:49AM -0800, Omar Sandoval wrote: > > --- /dev/null > > +++ b/libbtrfsutil/subvolume.c > > @@ -0,0 +1,127 @@ > > +/* > > + * Copyright (C) 2018 Facebook > > + * > > + * This file is part of libbtrfsutil. >

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Filipe Manana
On Wed, Feb 21, 2018 at 2:15 PM, Nikolay Borisov wrote: > > > On 21.02.2018 15:51, Filipe Manana wrote: >> On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: >>> Currently the DIO read cases uses a botched idea from ext4 to ensure >>> that DIO reads

Re: Status of FST and mount times

2018-02-21 Thread Ellis H. Wilson III
On 02/20/2018 08:49 PM, Qu Wenruo wrote: On 2018年02月16日 22:12, Ellis H. Wilson III wrote: $ sudo btrfs-debug-tree -t chunk /dev/sdb | grep CHUNK_ITEM | wc -l 3454 Increasing node size may reduce extent tree size. Although at most reduce one level AFAIK. But considering that the higher the

Re: Status of FST and mount times

2018-02-21 Thread Hans van Kranenburg
On 02/21/2018 03:49 PM, Ellis H. Wilson III wrote: > On 02/20/2018 08:49 PM, Qu Wenruo wrote: > On 2018年02月16日 22:12, Ellis H. Wilson III wrote: >> $ sudo btrfs-debug-tree -t chunk /dev/sdb | grep CHUNK_ITEM | wc -l >> 3454 > >> Increasing node size may reduce extent tree size.

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Filipe Manana
On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: > Currently the DIO read cases uses a botched idea from ext4 to ensure > that DIO reads don't race with truncate. The idea is that if we have a > pending truncate we set BTRFS_INODE_READDIO_NEED_LOCK which in turn >

[PATCH] btrfs: Add nossd_spread mount option

2018-02-21 Thread Howard McLauchlan
Btrfs has two mount options for SSD optimizations: ssd and ssd_spread. Presently there is an option to disable all SSD optimizations, but there isn't an option to disable just ssd_spread. This patch adds a mount option nossd_spread that disables ssd_spread only. Signed-off-by: Howard McLauchlan

Re: [PATCH v2 10/27] libbtrfsutil: add btrfs_util_[gs]et_default_subvolume()

2018-02-21 Thread Misono, Tomohiro
On 2018/02/16 4:04, Omar Sandoval wrote: > From: Omar Sandoval > > set_default_subvolume() is a trivial ioctl(), but there's no ioctl() for > get_default_subvolume(), so we need to search the root tree. > > Signed-off-by: Omar Sandoval > --- >

Re: [PATCH] btrfs: Add nossd_spread mount option

2018-02-21 Thread Hans van Kranenburg
On 02/22/2018 12:31 AM, Howard McLauchlan wrote: > Btrfs has two mount options for SSD optimizations: ssd and ssd_spread. > Presently there is an option to disable all SSD optimizations, but there > isn't an option to disable just ssd_spread. > > This patch adds a mount option nossd_spread that

Re: [PATCH v2 23/27] btrfs-progs: use libbtrfsutil for subvol sync

2018-02-21 Thread Misono, Tomohiro
On 2018/02/16 4:05, Omar Sandoval wrote: > From: Omar Sandoval > > btrfs_util_f_deleted_subvolumes() replaces enumerate_dead_subvols() and > btrfs_util_f_subvolume_info() replaces is_subvolume_cleaned(). And, the function names are older version. > > Signed-off-by: Omar

Re: Status of FST and mount times

2018-02-21 Thread Qu Wenruo
On 2018年02月21日 22:49, Ellis H. Wilson III wrote: > On 02/20/2018 08:49 PM, Qu Wenruo wrote: > On 2018年02月16日 22:12, Ellis H. Wilson III wrote: >> $ sudo btrfs-debug-tree -t chunk /dev/sdb | grep CHUNK_ITEM | wc -l >> 3454 > >> Increasing node size may reduce extent tree size.

Re: [PATCH] btrfs: qgroups, properly handle no reservations

2018-02-21 Thread Jeff Mahoney
On 2/21/18 8:36 PM, Qu Wenruo wrote: > > > On 2018年02月22日 04:19, je...@suse.com wrote: >> From: Jeff Mahoney >> >> There are several places where we call btrfs_qgroup_reserve_meta and >> assume that a return value of 0 means that the reservation was successful. >> >> Later, we

btrfs crash consistency bug : Blocks allocated beyond eof are lost

2018-02-21 Thread Jayashree Mohan
Hi, On btrfs (as of kernel 4.15), say we fallocate a file with keep_size option, followed by fdatasync() or fsync(). If we now crash, on recovery we see a wrong block count and all the blocks allocated beyond the eof are lost. This bug was reported(xfstest generic/468) and patched on ext4[1], and

Re: [PATCH v2 03/27] libbtrfsutil: add Python bindings

2018-02-21 Thread Misono, Tomohiro
On 2018/02/16 4:04, Omar Sandoval wrote: > From: Omar Sandoval > > The C libbtrfsutil library isn't very useful for scripting, so we also > want bindings for Python. Writing unit tests in Python is also much > easier than doing so in C. Only Python 3 is supported; if someone

Re: [PATCH v2 06/10] btrfs-progs: kernel-lib: Port kernel sort() to btrfs-progs

2018-02-21 Thread Qu Wenruo
On 2018年02月21日 23:40, David Sterba wrote: > On Fri, Feb 09, 2018 at 03:44:24PM +0800, Qu Wenruo wrote: >> Used by later btrfs_alloc_chunk() rework. > > We have the libc provided qsort, so please don't pull another > implementation but rather add a wrapper. Thanks for pointing this out.

Re: [PATCH] btrfs: qgroups, properly handle no reservations

2018-02-21 Thread Qu Wenruo
On 2018年02月22日 09:50, Jeff Mahoney wrote: > On 2/21/18 8:36 PM, Qu Wenruo wrote: >> >> >> On 2018年02月22日 04:19, je...@suse.com wrote: >>> From: Jeff Mahoney >>> >>> There are several places where we call btrfs_qgroup_reserve_meta and >>> assume that a return value of 0 means

Re: [PATCH v2 23/27] btrfs-progs: use libbtrfsutil for subvol sync

2018-02-21 Thread Misono, Tomohiro
On 2018/02/16 4:05, Omar Sandoval wrote: > From: Omar Sandoval > > btrfs_util_f_deleted_subvolumes() replaces enumerate_dead_subvols() and > btrfs_util_f_subvolume_info() replaces is_subvolume_cleaned(). > > Signed-off-by: Omar Sandoval > --- >

[RFC PATCH] btrfs: Speedup btrfs_read_block_groups()

2018-02-21 Thread Qu Wenruo
btrfs_read_block_groups() is used to build up the block group cache for all block groups, so it will iterate all block group items in extent tree. For large filesystem (TB level), it will search for BLOCK_GROUP_ITEM thousands times, which is the most time consuming part of mounting btrfs. So

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Liu Bo
On Wed, Feb 21, 2018 at 07:05:13PM +, Filipe Manana wrote: > On Wed, Feb 21, 2018 at 6:28 PM, Liu Bo wrote: > > On Wed, Feb 21, 2018 at 02:42:08PM +, Filipe Manana wrote: > >> On Wed, Feb 21, 2018 at 2:15 PM, Nikolay Borisov wrote: > >> > > >> > >

Re: [PATCH] btrfs: qgroups, properly handle no reservations

2018-02-21 Thread Qu Wenruo
On 2018年02月22日 04:19, je...@suse.com wrote: > From: Jeff Mahoney > > There are several places where we call btrfs_qgroup_reserve_meta and > assume that a return value of 0 means that the reservation was successful. > > Later, we use the original bytes value passed to that call

fs was hung and sort of full

2018-02-21 Thread Rich Rauenzahn
I have a mount point that became ... hung for lack of a better word. I was doing a LARGE sort of a file in it, using temporary files in that directory, and the system hung and probably the watchdog kicked in, reset the system. Upon reboot, the filesystem hung if you touched it. Processes were

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Nikolay Borisov
On 22.02.2018 00:38, Liu Bo wrote: > On Wed, Feb 21, 2018 at 07:05:13PM +, Filipe Manana wrote: >> On Wed, Feb 21, 2018 at 6:28 PM, Liu Bo wrote: >>> On Wed, Feb 21, 2018 at 02:42:08PM +, Filipe Manana wrote: On Wed, Feb 21, 2018 at 2:15 PM, Nikolay Borisov

Re: [PATCH v2 16/27] btrfs-progs: use libbtrfsutil for read-only property

2018-02-21 Thread Misono, Tomohiro
On 2018/02/16 4:05, Omar Sandoval wrote: > From: Omar Sandoval > > Signed-off-by: Omar Sandoval > --- > messages.h | 13 > props.c| 69 > +++--- > 2 files changed, 38 insertions(+), 44

Fwd: [Bug 1547319] 4.16.0-0.rc1.git4.1.fc28.x86_64 #1 Not tainted: possible recursive locking detected

2018-02-21 Thread Tomasz Kłoczko
-- Forwarded message -- From: Date: 21 February 2018 at 16:22 Subject: [Bug 1547319] 4.16.0-0.rc1.git4.1.fc28.x86_64 #1 Not tainted: possible recursive locking detected To: kloczko.tom...@gmail.com https://bugzilla.redhat.com/show_bug.cgi?id=1547319

Re: [RFC PATCH] btrfs: Speedup btrfs_read_block_groups()

2018-02-21 Thread Qu Wenruo
On 2018年02月22日 12:52, Qu Wenruo wrote: > btrfs_read_block_groups() is used to build up the block group cache for > all block groups, so it will iterate all block group items in extent > tree. > > For large filesystem (TB level), it will search for BLOCK_GROUP_ITEM > thousands times, which is

[PATCH v3 6/9] btrfs-progs: volumes: Unify free dev extent search behavior between kernel and btrfs-progs.

2018-02-21 Thread Qu Wenruo
As preparation to create libbtrfs which shares code between kernel and btrfs, this patch mainly unifies the search for free device extents. The main modifications are: 1) Search for free device extent Use the kernel method, by sorting the devices by its max hole capability, and use that

[PATCH v3 7/9] btrfs-progs: Move chunk stripe size calcution function to volumes.h

2018-02-21 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- check/main.c | 22 -- volumes.h| 22 ++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/check/main.c b/check/main.c index 97baae583f04..8ad7ab03e0e8 100644 --- a/check/main.c +++

[PATCH v3 5/9] btrfs-progs: volumes: Allow find_free_dev_extent() to return maximum hole size

2018-02-21 Thread Qu Wenruo
Just as kernel find_free_dev_extent(), allow it to return maximum hole size for us to build device list for later chunk allocator rework. Signed-off-by: Qu Wenruo --- volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/volumes.c b/volumes.c index

[PATCH v3 9/9] btrfs-progs: Refactor btrfs_alloc_chunk to mimic kernel structure and behavior

2018-02-21 Thread Qu Wenruo
Kernel uses a delayed chunk allocation behavior for metadata chunks KERNEL: btrfs_alloc_chunk() |- __btrfs_alloc_chunk(): Only allocate chunk mapping |- btrfs_make_block_group(): Add corresponding bg to fs_info->new_bgs Then at transaction commit time, it finishes the remaining work:

[PATCH v3 3/9] btrfs-progs: Make btrfs_alloc_chunk to handle block group creation

2018-02-21 Thread Qu Wenruo
Before this patch, chunk allocation is split into 2 parts: 1) Chunk allocation Handled by btrfs_alloc_chunk(), which will insert chunk and device extent items. 2) Block group allocation Handled by btrfs_make_block_group(), which will insert block group item and update space info.

[PATCH v3 2/9] btrfs-progs: Merge btrfs_alloc_data_chunk into btrfs_alloc_chunk

2018-02-21 Thread Qu Wenruo
We used to have two chunk allocators, btrfs_alloc_chunk() and btrfs_alloc_data_chunk(), the former is the more generic one, while the later is only used in mkfs and convert, to allocate SINGLE data chunk. Although btrfs_alloc_data_chunk() has some special hacks to cooperate with convert, it's

[PATCH v3 8/9] btrfs-progs: Use btrfs_device->fs_info to replace btrfs_device->dev_root

2018-02-21 Thread Qu Wenruo
Same as kernel declaration. Signed-off-by: Qu Wenruo --- utils.c | 2 +- volumes.c | 6 +++--- volumes.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils.c b/utils.c index e9cb3a82fda6..eff5fb64cfd5 100644 --- a/utils.c +++ b/utils.c @@ -216,7 +216,7

[PATCH v3 1/9] btrfs-progs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info

2018-02-21 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/volumes.c b/volumes.c index edad367b593c..677d085de96c 100644 --- a/volumes.c +++ b/volumes.c @@ -826,7 +826,7 @@ error: return ret; } -#define

[PATCH v3 0/9] Chunk allocator unification

2018-02-21 Thread Qu Wenruo
This patchset can be fetched from github: https://github.com/adam900710/btrfs-progs/tree/libbtrfs_prepare This patchset unified a large part of chunk allocator (free device extent search) between kernel and btrfs-progs. And reuses kernel function structures like btrfs_finish_chunk_alloc() and

[PATCH v3 4/9] btrfs-progs: Introduce btrfs_raid_array and related infrastructures

2018-02-21 Thread Qu Wenruo
As part of the effort to unify code and behavior between btrfs-progs and kernel, copy the btrfs_raid_array from kernel to btrfs-progs. So later we can use the btrfs_raid_array[] to get needed raid info other than manually do if-else branches. Signed-off-by: Qu Wenruo --- ctree.h

Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Christoph Anton Mitterer
Spurious corruptions seem to continue [ 69.688652] BTRFS critical (device dm-0): unable to find logical 4503658729209856 length 4096 [ 69.688656] BTRFS critical (device dm-0): unable to find logical 4503658729209856 length 4096 [ 69.688658] BTRFS critical (device dm-0): unable to find

Re: Status of FST and mount times

2018-02-21 Thread Hans van Kranenburg
On 02/21/2018 04:19 PM, Ellis H. Wilson III wrote: > On 02/21/2018 10:03 AM, Hans van Kranenburg wrote: >> On 02/21/2018 03:49 PM, Ellis H. Wilson III wrote: >>> On 02/20/2018 08:49 PM, Qu Wenruo wrote: My suggestion is to use balance to reduce number of block groups, so we could do less

Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Christoph Anton Mitterer
A scrub now gave: # btrfs scrub start -Br /dev/disk/by-label/system ERROR: scrubbing /dev/disk/by-label/system failed for device id 1: ret=-1, errno=5 (Input/output error) scrub canceled for b6050e38-716a-40c3-a8df-fcf1dd7e655d scrub started at Wed Feb 21 17:42:39 2018 and was aborted

Re: [PATCH] btrfs: fix NPD during canceling replace when the target is missing

2018-02-21 Thread Anand Jain
On 02/21/2018 01:04 AM, David Sterba wrote: On Tue, Feb 20, 2018 at 10:48:09PM +0800, Anand Jain wrote: Replace target can be missing after a reboot during the replace. So check if device is null. BUG: unable to handle kernel NULL pointer dereference at 00b0 IP:

[PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Nikolay Borisov
Currently the DIO read cases uses a botched idea from ext4 to ensure that DIO reads don't race with truncate. The idea is that if we have a pending truncate we set BTRFS_INODE_READDIO_NEED_LOCK which in turn forces the dio read case to fallback to inode_locking to prevent read/truncate races.

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Nikolay Borisov
On 21.02.2018 15:06, Filipe Manana wrote: > On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: >> Currently the DIO read cases uses a botched idea from ext4 to ensure >> that DIO reads don't race with truncate. The idea is that if we have a >> pending truncate we set

Re: [PATCH v2 03/27] libbtrfsutil: add Python bindings

2018-02-21 Thread Omar Sandoval
On Wed, Feb 21, 2018 at 02:47:54PM +0100, David Sterba wrote: > On Thu, Feb 15, 2018 at 11:04:48AM -0800, Omar Sandoval wrote: > > +setup( > > +name='btrfsutil', > > +version=get_version(), > > +description='Library for managing Btrfs filesystems', > > +

Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Nikolay Borisov
On 21.02.2018 19:18, Christoph Anton Mitterer wrote: > e8f1bc1493855e32b7a2a019decc3c353d94daf6 > > That bug... When was that introduced and how can I find out whether an fs was > affected/corrupted by this? Cause I've mounted and wrote to some extremely > important (to me) fs recently.

Re: [PATCH v2 04/27] libbtrfsutil: add btrfs_util_is_subvolume() and btrfs_util_subvolume_id()

2018-02-21 Thread Omar Sandoval
On Wed, Feb 21, 2018 at 02:02:02PM +0100, David Sterba wrote: > On Wed, Feb 21, 2018 at 12:43:07PM +0100, David Sterba wrote: > > On Thu, Feb 15, 2018 at 11:04:49AM -0800, Omar Sandoval wrote: > > > --- /dev/null > > > +++ b/libbtrfsutil/subvolume.c > > > @@ -0,0 +1,127 @@ > > > +/* > > > + *

Re: [PATCH v2 27/27] btrfs-progs: deprecate libbtrfs helpers

2018-02-21 Thread Omar Sandoval
On Wed, Feb 21, 2018 at 04:04:28PM +0100, David Sterba wrote: > On Thu, Feb 15, 2018 at 11:05:12AM -0800, Omar Sandoval wrote: > > diff --git a/btrfs-list.c b/btrfs-list.c > > index a2fdb3f9..56aa2455 100644 > > --- a/btrfs-list.c > > +++ b/btrfs-list.c > > @@ -34,6 +34,12 @@ > > #include

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Liu Bo
On Wed, Feb 21, 2018 at 02:42:08PM +, Filipe Manana wrote: > On Wed, Feb 21, 2018 at 2:15 PM, Nikolay Borisov wrote: > > > > > > On 21.02.2018 15:51, Filipe Manana wrote: > >> On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov > >> wrote: > >>> Currently

Re: [PATCH v2 00/27] btrfs-progs: introduce libbtrfsutil, "btrfs-progs as a library"

2018-02-21 Thread Omar Sandoval
On Wed, Feb 21, 2018 at 04:13:38PM +0100, David Sterba wrote: > On Tue, Feb 20, 2018 at 07:50:48PM +0100, David Sterba wrote: > > I have more comments or maybe questions about the future development > > workflow, but at this point the patchset is in a good shape for > > incremental merge. > >

Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Christoph Anton Mitterer
e8f1bc1493855e32b7a2a019decc3c353d94daf6 That bug... When was that introduced and how can I find out whether an fs was affected/corrupted by this? Cause I've mounted and wrote to some extremely important (to me) fs recently. Thanks, Chris. -- To unsubscribe from this list: send the line

Re: BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-21 Thread Christoph Anton Mitterer
And you have any other ideas on how to dubs that filesystem? Or at least backup as much as possible? Thanks, Chris. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2 27/27] btrfs-progs: deprecate libbtrfs helpers

2018-02-21 Thread David Sterba
On Thu, Feb 15, 2018 at 11:05:12AM -0800, Omar Sandoval wrote: > diff --git a/btrfs-list.c b/btrfs-list.c > index a2fdb3f9..56aa2455 100644 > --- a/btrfs-list.c > +++ b/btrfs-list.c > @@ -34,6 +34,12 @@ > #include "btrfs-list.h" > #include "rbtree-utils.h" > > +/* > + * The deprecated

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Filipe Manana
On Wed, Feb 21, 2018 at 6:28 PM, Liu Bo wrote: > On Wed, Feb 21, 2018 at 02:42:08PM +, Filipe Manana wrote: >> On Wed, Feb 21, 2018 at 2:15 PM, Nikolay Borisov wrote: >> > >> > >> > On 21.02.2018 15:51, Filipe Manana wrote: >> >> On Wed, Feb 21, 2018

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Nikolay Borisov
On 21.02.2018 20:28, Liu Bo wrote: > On Wed, Feb 21, 2018 at 02:42:08PM +, Filipe Manana wrote: >> On Wed, Feb 21, 2018 at 2:15 PM, Nikolay Borisov wrote: >>> >>> >>> On 21.02.2018 15:51, Filipe Manana wrote: On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov

Re: [PATCH v2 06/10] btrfs-progs: kernel-lib: Port kernel sort() to btrfs-progs

2018-02-21 Thread David Sterba
On Fri, Feb 09, 2018 at 03:44:24PM +0800, Qu Wenruo wrote: > Used by later btrfs_alloc_chunk() rework. We have the libc provided qsort, so please don't pull another implementation but rather add a wrapper. > --- /dev/null > +++ b/kernel-lib/sort.c > @@ -0,0 +1,104 @@ > +/* > + * taken from linux

[PATCH] btrfs: qgroups, properly handle no reservations

2018-02-21 Thread jeffm
From: Jeff Mahoney There are several places where we call btrfs_qgroup_reserve_meta and assume that a return value of 0 means that the reservation was successful. Later, we use the original bytes value passed to that call to free bytes during error handling or to pass the number

Re: [PATCH] btrfs: Fix rcu_dereference usage outside of read critical section

2018-02-21 Thread David Sterba
On Tue, Feb 20, 2018 at 08:44:57PM +0800, Anand Jain wrote: > > > On 02/20/2018 07:40 PM, Nikolay Borisov wrote: > > Patch 11ac3f1da5fd ("btrfs: log, when replace, is canceled by the user") > > added a new btrfs_info call with a couple of btrfs_dev_name() args. This > > is wrong since the latter

Re: [PATCH v2 00/27] btrfs-progs: introduce libbtrfsutil, "btrfs-progs as a library"

2018-02-21 Thread David Sterba
On Tue, Feb 20, 2018 at 07:50:48PM +0100, David Sterba wrote: > I have more comments or maybe questions about the future development > workflow, but at this point the patchset is in a good shape for > incremental merge. After removnig the first patch adding subvolume.c (with linux/btrfs_tree.h)

Re: [PATCH] btrfs: Fix locking during DIO read

2018-02-21 Thread Liu Bo
On Wed, Feb 21, 2018 at 04:15:38PM +0200, Nikolay Borisov wrote: > > > On 21.02.2018 15:51, Filipe Manana wrote: > > On Wed, Feb 21, 2018 at 11:41 AM, Nikolay Borisov wrote: > >> Currently the DIO read cases uses a botched idea from ext4 to ensure > >> that DIO reads don't

Re: Status of FST and mount times

2018-02-21 Thread E V
On Wed, Feb 21, 2018 at 9:49 AM, Ellis H. Wilson III wrote: > On 02/20/2018 08:49 PM, Qu Wenruo wrote: > > On 2018年02月16日 22:12, Ellis H. Wilson III wrote: >> >> $ sudo btrfs-debug-tree -t chunk /dev/sdb | grep CHUNK_ITEM | wc -l >> 3454 > > >>