Re: [PATCH v2 3/3] btrfs-progs: device: add remove missing-all

2017-10-12 Thread Duncan
Misono, Tomohiro posted on Wed, 11 Oct 2017 11:18:50 +0900 as excerpted: > Add 'btrfs remove missing-all' to remove all the missing devices at once > for improving usability. > > Example: > sudo mkfs.btrfs -f -d raid1 /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4 > sudo wipefs -a /dev/sdb1 /dev/sdb3

Re: btrfs seed question

2017-10-12 Thread Anand Jain
Not quite. While the seed device is still connected I would like to force some files over to the rw device. The use case is basically a much slower link to a seed device holding significantly more data than we currently need. An example would be a slower iscsi link to the seed device and a

Re: btrfs errors over NFS

2017-10-12 Thread Steve Leung
On 10/12/2017 11:44 AM, Steve Leung wrote: Hi list, TL;DR: ran into some btrfs errors and weird behaviour, but things generally seem to work. Just posting some details in case it helps devs or other users. I've run into a btrfs error trying to do a -j8 build of android on a btrfs

[PATCH] btrfs: fix call to btrfs_end_transaction without a transaction handler

2017-10-12 Thread Anand Jain
In btrfs_init_new_device() when btrfs_attach_transaction() fails we shouldn't call btrfs_end_transaction(). Fix it. Signed-off-by: Anand Jain Fixes: btrfs: error out if btrfs_attach_transaction() fails --- Hi David, Can you pls squash this changes to the patch which it

Re: [bug report] btrfs: error out if btrfs_attach_transaction() fails

2017-10-12 Thread Anand Jain
Thanks Dan! You are right. Will fix it. Anand On 10/13/2017 04:39 AM, Dan Carpenter wrote: Hello Anand Jain, The patch 1eea2715ca9b: "btrfs: error out if btrfs_attach_transaction() fails" from Sep 28, 2017, leads to the following static checker warning: fs/btrfs/volumes.c:2502

Re: USB upgrade fun

2017-10-12 Thread Kai Hendry
Thank you Austin & Chris for your replies! On Fri, 13 Oct 2017, at 01:19 AM, Austin S. Hemmelgarn wrote: > Same here on a pair of 3 year old NUC's. Based on the traces and the > other information, I'd be willing to bet this is probably the root cause > of the issues. It probably is... since

[RFC PATCH] Btrfs: heuristic replace heap sort with radix sort

2017-10-12 Thread Timofey Titovets
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 up heuristic, is to speed up sort on bucket. So, add a general radix_sort

Re: [RFC] Btrfs: compression heuristic performance

2017-10-12 Thread Timofey Titovets
Just info update. I did some more benchmark, optimization and testing. (Write kernel generalized version of radix sort (that can be ported to sort.c)) (Some memory allocating changes & etc) (Also i'm stupid and make a mistake with inversion of percentage numbers) New, more clean numbers (I

Re: [PATCH] btrfs: Clean up unused variables in free-space-tree.c

2017-10-12 Thread Omar Sandoval
On Thu, Oct 12, 2017 at 10:40:42PM +0100, Christos Gkekas wrote: > Remove variables 'start' and 'end', which are set but never used. Oops. Reviewed-by: Omar Sandoval > Signed-off-by: Christos Gkekas > --- > fs/btrfs/free-space-tree.c | 4 > 1 file

[PATCH] btrfs: Clean up unused variables in free-space-tree.c

2017-10-12 Thread Christos Gkekas
Remove variables 'start' and 'end', which are set but never used. Signed-off-by: Christos Gkekas --- fs/btrfs/free-space-tree.c | 4 1 file changed, 4 deletions(-) diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c index 684f122..fe5e032 100644 ---

[bug report] btrfs: error out if btrfs_attach_transaction() fails

2017-10-12 Thread Dan Carpenter
Hello Anand Jain, The patch 1eea2715ca9b: "btrfs: error out if btrfs_attach_transaction() fails" from Sep 28, 2017, leads to the following static checker warning: fs/btrfs/volumes.c:2502 btrfs_init_new_device() error: 'trans' dereferencing possible ERR_PTR() fs/btrfs/volumes.c

Re: [PATCH v3 5/5] btrfs: ensure that metadata and flush are issued from the root cgroup

2017-10-12 Thread David Sterba
On Thu, Oct 12, 2017 at 10:06:28AM -0700, Tejun Heo wrote: > Issuing metdata or otherwise shared IOs from !root cgroup can lead to > priority inversion. This patch ensures that those IOs are always > issued from the root cgroup. > > v3: Dropped unnecessary btree_inode handling as suggested by

Re: [Nouveau] [PATCH 03/10] driver:gpu: return -ENOMEM on allocation failure.

2017-10-12 Thread Daniel Vetter
On Wed, Sep 13, 2017 at 01:02:12PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais Applied to drm-misc-next, thanks. -Daniel > --- > drivers/gpu/drm/gma500/mid_bios.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

fs_reclaim() deadlock complaint

2017-10-12 Thread Bart Van Assche
Hello, Since I started testing kernel v4.14-rc1 I see a deadlock complaint appearing in the kernel log during boot. Is this a known issue? $ cat /etc/fstab # /dev/mapper/vg-root / btrfs defaults,subvol=@ 0 1 /dev/mapper/vg-boot /boot ext4

btrfs errors over NFS

2017-10-12 Thread Steve Leung
Hi list, TL;DR: ran into some btrfs errors and weird behaviour, but things generally seem to work. Just posting some details in case it helps devs or other users. I've run into a btrfs error trying to do a -j8 build of android on a btrfs filesystem exported over NFSv3. That in itself

Re: USB upgrade fun

2017-10-12 Thread Austin S. Hemmelgarn
On 2017-10-12 12:57, Chris Murphy wrote: On Sun, Oct 8, 2017 at 10:58 AM, Kai Hendry wrote: Hi there, My /mnt/raid1 suddenly became full somewhat expectedly, so I bought 2 new USB 4TB hard drives (one WD, one Seagate) to upgrade to. After adding sde and sdd I started to see

Re: USB upgrade fun

2017-10-12 Thread Chris Murphy
On Thu, Oct 12, 2017 at 3:27 AM, Kai Hendry wrote: > A guy on #btrsfs suggests: > > 15:09 hendry: super_total_bytes 8001581707264 mismatch with > fs_devices total_rw_bytes 8001581710848 that one is because unaligned > partitions, 4.12 - 4.13 kernels are affected (at least some

[PATCH v3 5/5] btrfs: ensure that metadata and flush are issued from the root cgroup

2017-10-12 Thread Tejun Heo
Issuing metdata or otherwise shared IOs from !root cgroup can lead to priority inversion. This patch ensures that those IOs are always issued from the root cgroup. v3: Dropped unnecessary btree_inode handling as suggested by David Sterba. v2: Fixed missing @bh in submit_bh_blkcg_css() call.

Re: USB upgrade fun

2017-10-12 Thread Chris Murphy
On Sun, Oct 8, 2017 at 10:58 AM, Kai Hendry wrote: > Hi there, > > My /mnt/raid1 suddenly became full somewhat expectedly, so I bought 2 > new USB 4TB hard drives (one WD, one Seagate) to upgrade to. > > After adding sde and sdd I started to see errors in dmesg [2]. >

Re: btrfs seed question

2017-10-12 Thread Austin S. Hemmelgarn
On 2017-10-12 11:30, Chris Murphy wrote: On Thu, Oct 12, 2017 at 3:44 PM, Joseph Dunn wrote: On Thu, 12 Oct 2017 15:32:24 +0100 Chris Murphy wrote: On Thu, Oct 12, 2017 at 2:20 PM, Joseph Dunn wrote: On Thu, 12 Oct 2017

Re: btrfs seed question

2017-10-12 Thread Joseph Dunn
On Thu, 12 Oct 2017 16:30:36 +0100 Chris Murphy wrote: > On Thu, Oct 12, 2017 at 3:44 PM, Joseph Dunn wrote: > > On Thu, 12 Oct 2017 15:32:24 +0100 > > Chris Murphy wrote: > > > >> On Thu, Oct 12, 2017 at 2:20 PM, Joseph

Re: [PATCH v2 5/5] btrfs: ensure that metadata and flush are issued from the root cgroup

2017-10-12 Thread Tejun Heo
On Wed, Oct 11, 2017 at 07:07:23PM +0200, David Sterba wrote: > The comment is useful, but the condition will be always true, so I don't > see the point. > > /* >* The btree_inode will be always in the root cgroup. The cgroup >* writeback can be enabled on regular inodes

Re: btrfs seed question

2017-10-12 Thread Chris Murphy
On Thu, Oct 12, 2017 at 3:44 PM, Joseph Dunn wrote: > On Thu, 12 Oct 2017 15:32:24 +0100 > Chris Murphy wrote: > >> On Thu, Oct 12, 2017 at 2:20 PM, Joseph Dunn wrote: >> > >> > On Thu, 12 Oct 2017 12:18:01 +0800 >> > Anand Jain

Re: btrfs seed question

2017-10-12 Thread Joseph Dunn
On Thu, 12 Oct 2017 15:32:24 +0100 Chris Murphy wrote: > On Thu, Oct 12, 2017 at 2:20 PM, Joseph Dunn wrote: > > > > On Thu, 12 Oct 2017 12:18:01 +0800 > > Anand Jain wrote: > > > > > On 10/12/2017 08:47 AM, Joseph Dunn

Re: btrfs seed question

2017-10-12 Thread Chris Murphy
On Thu, Oct 12, 2017 at 2:20 PM, Joseph Dunn wrote: > > On Thu, 12 Oct 2017 12:18:01 +0800 > Anand Jain wrote: > > > On 10/12/2017 08:47 AM, Joseph Dunn wrote: > > > After seeing how btrfs seeds work I wondered if it was possible to push > > > specific

Re: btrfs seed question

2017-10-12 Thread Joseph Dunn
On Thu, 12 Oct 2017 12:18:01 +0800 Anand Jain wrote: > On 10/12/2017 08:47 AM, Joseph Dunn wrote: > > After seeing how btrfs seeds work I wondered if it was possible to push > > specific files from the seed to the rw device. I know that removing > > the seed device will

Re: [PATCH] btrfs: set include path relatively

2017-10-12 Thread David Sterba
On Thu, Oct 12, 2017 at 11:22:24AM +0900, Naohiro Aota wrote: > Currently, gcc is passed the include directory with full path. As a result, > dependency files (*.o.d) also record the full path at the build time. Such > full path dependency is annoying for sharing the source between multiple >

Re: [PATCH] configure.ac: allow '--with-convert=' to accept comma-separated values

2017-10-12 Thread David Sterba
On Thu, Oct 12, 2017 at 01:08:54PM +0100, Sergei Trofimovich wrote: > Before the change configure refused to accept it's defaults explicitly: > $ ./configure --enable-convert --with-convert=ext2,reiserfs > ... > configure: error: unknown tokens for --with-convert: , > > After the

[PATCH] configure.ac: allow '--with-convert=' to accept comma-separated values

2017-10-12 Thread Sergei Trofimovich
Before the change configure refused to accept it's defaults explicitly: $ ./configure --enable-convert --with-convert=ext2,reiserfs ... configure: error: unknown tokens for --with-convert: , After the change both converters are enabled: $ ./configure --enable-convert

Re: Delivery Status Notification (Failure)

2017-10-12 Thread Nick Gilmour
Thanks for the detailed description! It makes all sense. My question was rather stupid. I shrunk the partition with gparted (I suppose it uses the btrfs resize command) and then cloned the partition with clonezilla. I tried to create a zvol of the same size but I got an error about the size (I

Re: [PATCH 1/2] btrfs-progs: mkfs: Enhance minimal device size calculation to fix mkfs failure on small file

2017-10-12 Thread Lu Fengqi
On Thu, Oct 12, 2017 at 12:28:57AM -0700, Qu Wenruo wrote: >Since commit c11e36a29e84 ("Btrfs-progs: Do not force mixed block group >creation unless '-M' option is specified"), mkfs no longer use mixed >block group unless specified manually. > >This breaks the minimal device size calculation,

Re: [PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-12 Thread Nikolay Borisov
On 12.10.2017 11:43, Anand Jain wrote: > A cleanup patch, use need_full_stripe() to replace the open code. The code is equivalent by merit of De Morgan's law (I had to actually go look up the equivalence classes before I convinced myself it was correct) ~A ^ ~B == ~(A or B) Reviewed-by:

[PATCH] btrfs: remove BUG_ON in btrfs_rm_dev_replace_free_srcdev()

2017-10-12 Thread Anand Jain
That was only an extra check to tackle few bugs around this area, now its save to remove it. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index

Re: [PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-12 Thread Qu Wenruo
On 2017年10月12日 16:43, Anand Jain wrote: A cleanup patch, use need_full_stripe() to replace the open code. Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Thanks, Qu --- fs/btrfs/volumes.c | 16 ++-- 1 file changed, 6

[PATCH v2 2/2] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-12 Thread Qu Wenruo
New test case to test if the minimal device size given by "mkfs.btrfs" failure case is valid. Signed-off-by: Qu Wenruo --- changelog: v2: Remove tailing whitespace. Use more accurate regex to match minimal device size, suggested by Lu Fengqi. --- tests/common

[PATCH] btrfs: use need_full_stripe() in __btrfs_map_block()

2017-10-12 Thread Anand Jain
A cleanup patch, use need_full_stripe() to replace the open code. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index

Re: [PATCH 2/2] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-12 Thread Qu Wenruo
On 2017年10月12日 16:24, Lu Fengqi wrote: On Thu, Oct 12, 2017 at 12:28:58AM -0700, Qu Wenruo wrote: New test case to test if the minimal device size given by "mkfs.btrfs" failure case is valid. Signed-off-by: Qu Wenruo --- tests/common | 57

Re: [PATCH 2/2] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-12 Thread Lu Fengqi
On Thu, Oct 12, 2017 at 12:28:58AM -0700, Qu Wenruo wrote: >New test case to test if the minimal device size given by "mkfs.btrfs" >failure case is valid. > >Signed-off-by: Qu Wenruo >--- > tests/common | 57 +++- >

[PATCH 1/2] btrfs-progs: mkfs: Enhance minimal device size calculation to fix mkfs failure on small file

2017-10-12 Thread Qu Wenruo
Since commit c11e36a29e84 ("Btrfs-progs: Do not force mixed block group creation unless '-M' option is specified"), mkfs no longer use mixed block group unless specified manually. This breaks the minimal device size calculation, which only considered mixed block group use case. This patch

[PATCH 2/2] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-12 Thread Qu Wenruo
New test case to test if the minimal device size given by "mkfs.btrfs" failure case is valid. Signed-off-by: Qu Wenruo --- tests/common | 57 +++- tests/mkfs-tests/010-small-image/test.sh | 51

Re: [PATCH] Fstest: btrfs/151: test if device delete ends up with losing raid profile

2017-10-12 Thread Eryu Guan
On Mon, Oct 09, 2017 at 11:39:21AM -0600, Liu Bo wrote: > Currently running 'btrfs device delete' can end up with losing data raid > profile (if any), this test is to reproduce the problem. > > The fix is > "Btrfs: avoid losing data raid profile when deleting a device" > > Signed-off-by: