[PATCH 1/1] btrfs: fix improper return value

2016-12-03 Thread Pan Bian
In function btrfs_uuid_tree_iterate(), errno is assigned to variable ret on errors. However, it directly returns 0. It may be better to return ret. This patch also removes the warning, because the caller already prints a warning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731 Signed-

Re: system hangs due to qgroups

2016-12-03 Thread Adam Borowski
On Sat, Dec 03, 2016 at 10:46:40PM +0100, Marc Joliet wrote: > As it's a rescue shell, I have only the one shell AFAIK, and it's occupied > by mount. So I can't tell if there are dmesg entries, however, when this > happens during a normal running system, I never saw any dmesg entries. You can us

Re: [PATCH 01/18] btrfs: call functions that overwrite their root parameter with fs_info

2016-12-03 Thread Jeff Mahoney
On 12/2/16 5:32 PM, Omar Sandoval wrote: > On Fri, Dec 02, 2016 at 12:07:21AM -0500, je...@suse.com wrote: >> From: Jeff Mahoney >> >> There are 11 functions that accept a root parameter and immediately >> overwrite it. We can pass those an fs_info pointer instead. >> >> Signed-off-by: Jeff Mahon

Re: system hangs due to qgroups

2016-12-03 Thread Chris Murphy
s? I would try to work on it from another volume. An advantage of openSUSE Tumbleweed is they claim to fully support qgroups, where upstream uses much more guarded language about its stability. Whereas last night's Fedora Rawhide has kernel 4.9-rc7 and btrfs-progs 4.8.5. https://kojipkgs.fedora

Re: system hangs due to qgroups

2016-12-03 Thread Marc Joliet
On Saturday 03 December 2016 13:42:42 Chris Murphy wrote: > On Sat, Dec 3, 2016 at 11:40 AM, Marc Joliet wrote: > > Hello all, > > > > I'm having some trouble with btrfs on a laptop, possibly due to qgroups. > > Specifically, some file system activities (e.g., snapshot creation, > > baloo_file_ex

[PATCH] btrfs: limit async_work allocation and worker func duration

2016-12-03 Thread Maxim Patlasov
Problem statement: unprivileged user who has read-write access to more than one btrfs subvolume may easily consume all kernel memory (eventually triggering oom-killer). Reproducer (./mkrmdir below essentially loops over mkdir/rmdir): [root@kteam1 ~]# cat prep.sh DEV=/dev/sdb mkfs.btrfs -f $DEV m

Re: system hangs due to qgroups

2016-12-03 Thread Chris Murphy
On Sat, Dec 3, 2016 at 11:40 AM, Marc Joliet wrote: > Hello all, > > I'm having some trouble with btrfs on a laptop, possibly due to qgroups. > Specifically, some file system activities (e.g., snapshot creation, > baloo_file_extractor from KDE Plasma) cause the system to hang for up to about > 40

[PATCH v2] btrfs-progs: utils: negative numbers are more plausible than sizes over 8 EiB

2016-12-03 Thread Zygo Blaxell
I got tired of seeing "16.00EiB" whenever btrfs-progs encounters a negative size value, e.g. during resize: Unallocated: /dev/mapper/datamd18 16.00EiB This version is much more useful: Unallocated: /dev/mapper/datamd18 -26.29GiB Signed-off-by: Zygo Blaxell --- v2: change the function

Re: [PATCH] btrfs-progs: utils: negative numbers are more plausible than sizes over 8 EiB

2016-12-03 Thread Zygo Blaxell
On Sat, Dec 03, 2016 at 10:25:17AM -0800, Omar Sandoval wrote: > On Sat, Dec 03, 2016 at 01:19:38AM -0500, Zygo Blaxell wrote: > > I got tired of seeing "16.00EiB" whenever btrfs-progs encounters a > > negative size value. > > > > e.g. during filesystem shrink we see: > > > > Unallocated: > >

Re: missing checksums on reboot

2016-12-03 Thread Chris Murphy
On Fri, Dec 2, 2016 at 1:36 PM, Blake Lewis wrote: > Well, 3.10 is what you get with the RHEL7.x distributions, so that's > why people are running it. > Apparently, it is "good enough" for many purposes. Nope. Btrfs in RHEL 7 is a technology preview, and ... "Technology Preview features are curr

Re: [PATCH 1/1] btrfs: fix improper return value

2016-12-03 Thread Omar Sandoval
On Sat, Dec 03, 2016 at 06:55:16PM +0800, Pan Bian wrote: > In function btrfs_uuid_tree_iterate(), errno is assigned to variable > ret on errors. However, it directly returns 0. It may be better to > return ret. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731 > > Signed-off-by: P

system hangs due to qgroups

2016-12-03 Thread Marc Joliet
Hello all, I'm having some trouble with btrfs on a laptop, possibly due to qgroups. Specifically, some file system activities (e.g., snapshot creation, baloo_file_extractor from KDE Plasma) cause the system to hang for up to about 40 minutes, maybe more. It always causes (most of) my desktop

Re: [PATCH 1/1] btrfs: volumes: fix improper return value

2016-12-03 Thread Omar Sandoval
On Sat, Dec 03, 2016 at 07:01:45PM +0800, Pan Bian wrote: > Variable ret takes the errno on failures. However, it directly returns 0. > It may be better to return "ret". > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188741 > > Signed-off-by: Pan Bian > --- > fs/btrfs/volumes.c | 2 +

Re: [PATCH] btrfs-progs: utils: negative numbers are more plausible than sizes over 8 EiB

2016-12-03 Thread Omar Sandoval
On Sat, Dec 03, 2016 at 01:19:38AM -0500, Zygo Blaxell wrote: > I got tired of seeing "16.00EiB" whenever btrfs-progs encounters a > negative size value. > > e.g. during filesystem shrink we see: > > Unallocated: >/dev/mapper/testvol0 16.00EiB > > Interpreting this as a signed quantity is

Re: btrfs_destroy_inode warn (outstanding extents)

2016-12-03 Thread Dave Jones
On Thu, Dec 01, 2016 at 10:32:09AM -0500, Dave Jones wrote: > http://codemonkey.org.uk/junk/btrfs-destroy-inode-outstanding-extents.txt > > Also same bug, different run, but a different traceview > http://codemonkey.org.uk/junk/btrfs-destroy-inode-outstanding-extents-function-graph.txt > >

`btrfs check --repair` stuck in a loop // filesystem repair case study

2016-12-03 Thread Tomasz Melcer
Hi, I have a btrfs filesystem on a 4TB HDD connected with USB 2.0. Some time ago I accidentally disconnected the drive while doing heavy writes. After reconnecting it seemed like the filesystem still works (it mounted fine and I could read some files chosen at random), but I ran `btrfs scrub`

[PATCH 1/1] btrfs: volumes: fix improper return value

2016-12-03 Thread Pan Bian
Variable ret takes the errno on failures. However, it directly returns 0. It may be better to return "ret". Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188741 Signed-off-by: Pan Bian --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/vo

[PATCH 1/1] btrfs: fix improper return value

2016-12-03 Thread Pan Bian
In function btrfs_uuid_tree_iterate(), errno is assigned to variable ret on errors. However, it directly returns 0. It may be better to return ret. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731 Signed-off-by: Pan Bian --- fs/btrfs/uuid-tree.c | 2 +- 1 file changed, 1 insertion(+