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

2018-02-20 Thread Nikolay Borisov
On 21.02.2018 06:09, Christoph Anton Mitterer wrote: > Hi. > > Not sure if that's a bug in btrfs... maybe someone's interested in it. > > Cheers, > Chris. > > # uname -a > Linux heisenberg 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 > GNU/Linux > > > Feb 21 04:55:51

BUG: unable to handle kernel paging request at ffff9fb75f827100

2018-02-20 Thread Christoph Anton Mitterer
Hi. Not sure if that's a bug in btrfs... maybe someone's interested in it. Cheers, Chris. # uname -a Linux heisenberg 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux Feb 21 04:55:51 heisenberg kernel: BUG: unable to handle kernel paging request at 9fb75f827100 Feb

Re: Status of FST and mount times

2018-02-20 Thread Qu Wenruo
On 2018年02月20日 23:41, Austin S. Hemmelgarn wrote: > On 2018-02-20 09:59, Ellis H. Wilson III wrote: >> On 02/16/2018 07:59 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 >>> >>> OK, this

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

2018-02-20 Thread David Sterba
On Thu, Feb 15, 2018 at 11:04:45AM -0800, Omar Sandoval wrote: > From: Omar Sandoval > This is v2 of "btrfs-progs as a library". > > Most of the changes since v1 are small: > > - Rebased onto v4.15 > - Split up btrfs_util_subvolume_path() which was accidentally squashed >

Re: [PATCH v2 02/27] Add libbtrfsutil

2018-02-20 Thread David Sterba
On Tue, Feb 20, 2018 at 10:32:17AM -0700, Liu Bo wrote: > > --- a/.gitignore > > +++ b/.gitignore > > @@ -43,6 +43,8 @@ libbtrfs.so.0.1 > > library-test > > library-test-static > > /fssum > > +/libbtrfsutil.so* > > +/libbtrfsutil.a > > .gitignore is not part of btrfs-progs, is it? It is,

Re: [PATCH v2 02/27] Add libbtrfsutil

2018-02-20 Thread Liu Bo
On Thu, Feb 15, 2018 at 11:04:47AM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > Currently, users wishing to manage Btrfs filesystems programatically > have to shell out to btrfs-progs and parse the output. This isn't ideal. > The goal of libbtrfsutil is to provide a

Re: [PATCH v2] btrfs: fix endianness compatibility during the SB RW

2018-02-20 Thread Liu Bo
On Tue, Feb 13, 2018 at 11:00:46AM +0800, Anand Jain wrote: > Fixes the endianness bug in the fs_info::super_copy by using its > btrfs_set_super...() function to set values in the SB, as these > functions manage the endianness compatibility nicely. Reviewed-by: Liu Bo

Re: [PATCH] Fix NULL pointer exception in find_bio_stripe()

2018-02-20 Thread Liu Bo
On Fri, Feb 16, 2018 at 07:51:38PM +, Dmitriy Gorokh wrote: > On detaching of a disk which is a part of a RAID6 filesystem, the following > kernel OOPS may happen: > > [63122.680461] BTRFS error (device sdo): bdev /dev/sdo errs: wr 0, rd 0, > flush 1, corrupt 0, gen 0 > [63122.719584]

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

2018-02-20 Thread David Sterba
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: btrfs_destroy_dev_replace_tgtdev+0x43/0xf0 [btrfs] >

Re: btrfs_clone_files and bind mounts

2018-02-20 Thread Nikolay Borisov
On 20.02.2018 17:50, Hristo Venev wrote: > What is the problem with cloning files between different (vfs)mounts of > the same filesystem? > The "problem" is not really a problem, but rather a well-imposed restriction: >From http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html

btrfs_clone_files and bind mounts

2018-02-20 Thread Hristo Venev
What is the problem with cloning files between different (vfs)mounts of the same filesystem? signature.asc Description: This is a digitally signed message part

Re: [PATCH V3] Btrfs: enchanse raid1/10 balance heuristic

2018-02-20 Thread Timofey Titovets
Gentle ping. 2018-01-03 0:23 GMT+03:00 Timofey Titovets : > 2018-01-02 21:31 GMT+03:00 Liu Bo : >> On Sat, Dec 30, 2017 at 11:32:04PM +0300, Timofey Titovets wrote: >>> Currently btrfs raid1/10 balancer bаlance requests to mirrors, >>> based on pid %

Re: Status of FST and mount times

2018-02-20 Thread Austin S. Hemmelgarn
On 2018-02-20 09:59, Ellis H. Wilson III wrote: On 02/16/2018 07:59 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 OK, this explains everything. There are too many chunks. This means at mount you

Re: Status of FST and mount times

2018-02-20 Thread Ellis H. Wilson III
On 02/16/2018 07:59 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 OK, this explains everything. There are too many chunks. This means at mount you need to search for block group item 3454 times.

[PATCH 1/1] btrfs: remove assert in btrfs_init_dev_replace_tgtdev()

2018-02-20 Thread Anand Jain
In the same function we just ran btrfs_alloc_device() which means the btrfs_device::resized_list is sure to be empty and we are protected with the btrfs_fs_info::volume_mutex. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 1 - 1 file changed, 1 deletion(-) diff

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

2018-02-20 Thread Anand Jain
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: btrfs_destroy_dev_replace_tgtdev+0x43/0xf0 [btrfs] Call Trace: btrfs_dev_replace_cancel+0x22b/0x250 [btrfs]

[PATCH 1/1] btrfs: fix NPD when target device is missing

2018-02-20 Thread Anand Jain
The replace target device can be missing in which case we don't allocate a missing btrfs_device when mounted with the -o degraded. So check the device before access. BUG: unable to handle kernel NULL pointer dereference at 00b0 IP: btrfs_destroy_dev_replace_tgtdev+0x43/0xf0 [btrfs]

Re: [PATCH RESEND] btrfs: delete function btrfs_close_extra_devices()

2018-02-20 Thread Anand Jain
On 02/20/2018 12:53 AM, David Sterba wrote: On Thu, Feb 15, 2018 at 01:02:24PM +0800, Anand Jain wrote: btrfs_close_extra_devices() is not exactly about just closing the opened devices, but its also about free-ing the stale devices which may have scanned into the btrfs_fs_devices::dev_list.

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

2018-02-20 Thread Anand Jain
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 require being called in rcu read side critical section. Fix it by instead

Re: [PATCH] btrfs/150: add _scratch_dev_pool_get/put to run the test as expected

2018-02-20 Thread Qu Wenruo
On 2018年02月20日 13:34, Misono, Tomohiro wrote: > btrfs/150 uses RAID1 profile and make SCRATCH_DEV fail for test. > However, if SCRATCH_DEV_POOL consists more than two devices, SCRATCH_DEV > may not be used for RAID1 pair and the tests may not run as expected. > > Fix this by add

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

2018-02-20 Thread Nikolay Borisov
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 require being called in rcu read side critical section. Fix it by instead calling btrfs_info_in_rcu. This fixes the following