Re: [PATCH v3 1/2] btrfs-progs: qgroup: add sync option to 'qgroup show'

2017-01-24 Thread David Sterba
On Thu, Dec 15, 2016 at 01:29:28PM +0900, Tsutomu Itoh wrote: > The 'qgroup show' command does not synchronize filesystem. > Therefore, 'qgroup show' may not display the correct value unless > synchronized with 'filesystem sync' command etc. > > So add the '--sync' option so that we can choose

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Mon, Jan 23, 2017 at 08:51:24PM -0700, Chris Murphy wrote: > On Mon, Jan 23, 2017 at 5:05 PM, Omar Sandoval wrote: > > Thanks! Hmm, okay, so it's coming from btrfs_update_delayed_inode()... > > That's probably us failing btrfs_lookup_inode(), but just to make sure, > >

Re: [PATCH v2] btrfs-progs: tests: add test for --sync option of qgroup show

2017-01-24 Thread David Sterba
On Thu, Dec 15, 2016 at 01:33:05PM +0900, Tsutomu Itoh wrote: > Simple test script for the following patch. > >btrfs-progs: qgroup: add sync option to 'qgroup show' > > Signed-off-by: Tsutomu Itoh Applied, thanks. -- To unsubscribe from this list: send the line

Re: [PATCH v3 5/6] btrfs-progs: convert: Switch to new rollback function

2017-01-24 Thread David Sterba
On Tue, Jan 24, 2017 at 08:44:00AM +0800, Qu Wenruo wrote: > > > At 01/24/2017 01:54 AM, David Sterba wrote: > > On Mon, Dec 19, 2016 at 02:56:41PM +0800, Qu Wenruo wrote: > >> Since we have the whole facilities needed to rollback, switch to the new > >> rollback. > > > > Sorry, the change from

Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update

2017-01-24 Thread Christoph Anton Mitterer
Hey Qu. I was giving your patches a try, again on the very same fs (which saw however writes in the meantime), from my initial report. btrfs-progs v4.9 WITHOUT patch: *** # btrfs check /dev/nbd0 ; echo $? checking extents checking free space cache checking fs roots

[PATCH 2/2] btrfs: add lockdep annotation for btrfs_log_inode

2017-01-24 Thread Christian Borntraeger
Add a proper subclass to get rid of the following lockdep error. [ INFO: possible recursive locking detected ] 4.9.0+ #279 Not tainted - vim/4801 is trying to acquire lock: (>log_mutex){+.+...}, at: [<03ff82057592>] btrfs_log_inode+0x182/0xfa8

[PATCH 0/1] btrfs lockdep annotation

2017-01-24 Thread Christian Borntraeger
Chris, since my bug report about this did not result in any fix and since this disables lockdep before the the code that I want to debug runs here is my attempt to fix it. Please double check if the subclass looks right. It seems to work for me but I do not know enough about btrfs to decide if

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 01:13:47PM -0700, Chris Murphy wrote: > OK I've reproduced it in a virt-manager VM with Fedora Rawhide from a > week old ISO, which is using btrfs-progs 4.9 and kernel 4.10-rc3. > > Get this though. The problem doesn't happen with boot param selinux=0, > either in the VM

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 11:37:43AM -0700, Chris Murphy wrote: > On Tue, Jan 24, 2017 at 10:49 AM, Omar Sandoval wrote: > > On Mon, Jan 23, 2017 at 08:51:24PM -0700, Chris Murphy wrote: > >> On Mon, Jan 23, 2017 at 5:05 PM, Omar Sandoval wrote: > >> >

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
OK I've reproduced it in a virt-manager VM with Fedora Rawhide from a week old ISO, which is using btrfs-progs 4.9 and kernel 4.10-rc3. Get this though. The problem doesn't happen with boot param selinux=0, either in the VM or one of the laptops. Whereas the problem happens still with

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
On Tue, Jan 24, 2017 at 11:56 AM, Omar Sandoval wrote: > Yup, definitely doesn't look like memory corruption. I set up a Fedora > VM yesterday to try to repro with basically those same steps but it > didn't happen. I'll try again, but is there anything special about your >

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
I can reproduce it on another laptop with Fedora 25. I haven't tried to reproduce it in a VM. In this case, it's a single partition Btrfs volume, completely stock, and is about 5 weeks old, no crashes or forced shutdowns. The HP uses a Samsung NVMe SSD, whereas on this Macbook Pro it's a Samsung

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 01:24:51PM -0700, Chris Murphy wrote: > On Tue, Jan 24, 2017 at 1:10 PM, Omar Sandoval wrote: > > > Hm, still no luck, maybe it's a Server vs Workstation thing? I'll try > > installing Workstation. In the meantime, I noticed that in both of the > >

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
On Tue, Jan 24, 2017 at 10:49 AM, Omar Sandoval wrote: > On Mon, Jan 23, 2017 at 08:51:24PM -0700, Chris Murphy wrote: >> On Mon, Jan 23, 2017 at 5:05 PM, Omar Sandoval wrote: >> > Thanks! Hmm, okay, so it's coming from btrfs_update_delayed_inode()... >>

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
OK I just did a 2nd boot - all the same everything as the previous dmesg.log (patch kernel snapshot). Identical. But not identical results: timing wise the problem happens much sooner, at 14s the fs goes read only instead of 30+ seconds. And I also get this line: [ 14.039931]

raid1: cannot add disk to replace faulty because can only mount fs as read-only.

2017-01-24 Thread Hans Deragon
Greetings, Warning: Btrfs user here; no knowledge of the inside working of btrfs. If I am in the wrong mailing list, please redirect me and accept my apologies. At home, lacking of disks and free SATA ports, I created a raid1 btrfs filesystem by converting an existing single btrfs instance

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 12:19:29PM -0700, Chris Murphy wrote: > I can reproduce it on another laptop with Fedora 25. I haven't tried > to reproduce it in a VM. In this case, it's a single partition Btrfs > volume, completely stock, and is about 5 weeks old, no crashes or > forced shutdowns. The HP

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
On Tue, Jan 24, 2017 at 1:10 PM, Omar Sandoval wrote: > Hm, still no luck, maybe it's a Server vs Workstation thing? I'll try > installing Workstation. In the meantime, I noticed that in both of the > traces, systemd-tmpfiles was the process that tripped the WARN_ONCE(). >

Re: [PATCH 1/2] btrfs-progs: quota: fix printing during wait mode

2017-01-24 Thread David Sterba
On Tue, Jan 17, 2017 at 08:56:39PM -0500, je...@suse.com wrote: > From: Jeff Mahoney > > If we call "btrfs quota rescan -w", it will attempt to start the rescan > operation, wait for it, and then print the "quota rescan started" message. > The wait could last an arbitrary amount

Re: btrfs rescue chunk-recover segfaults

2017-01-24 Thread Duncan
Simon Waid posted on Mon, 23 Jan 2017 09:42:28 +0100 as excerpted: > I have a btrfs raid5 array that has become unmountable. [As a list regular and btrfs user myself, not a dev, but I try to help with replies where I can in ordered to allow the devs and real experts to put their time to

Re: [PATCH 0/1] btrfs lockdep annotation

2017-01-24 Thread Filipe Manana
On Tue, Jan 24, 2017 at 9:01 AM, Christian Borntraeger wrote: > Chris, > > since my bug report about this did not result in any fix and since It was fixed and the fix landed in 4.10-rc4:

Re: [PATCH 0/1] btrfs lockdep annotation

2017-01-24 Thread Christian Borntraeger
On 01/24/2017 11:22 AM, Filipe Manana wrote: > On Tue, Jan 24, 2017 at 9:01 AM, Christian Borntraeger > wrote: >> Chris, >> >> since my bug report about this did not result in any fix and since > > It was fixed and the fix landed in 4.10-rc4: Thanks, I missed that last

Re: [PATCH v4] btrfs-progs: Fix disable backtrace assert error

2017-01-24 Thread David Sterba
On Thu, Jan 19, 2017 at 12:00:03PM +0800, Qu Wenruo wrote: > Due to commit 00e769d04c2c83029d6c71(btrfs-progs: Correct value printed > by assertions/BUG_ON/WARN_ON), which changed the assert_trace() > parameter, the condition passed to assert/WARN_ON/BUG_ON are logical > notted for backtrace

Re: [PATCH v4] btrfs-progs: Fix disable backtrace assert error

2017-01-24 Thread David Sterba
On Tue, Jan 24, 2017 at 12:55:22PM +0100, David Sterba wrote: > On Thu, Jan 19, 2017 at 12:00:03PM +0800, Qu Wenruo wrote: > > Due to commit 00e769d04c2c83029d6c71(btrfs-progs: Correct value printed > > by assertions/BUG_ON/WARN_ON), which changed the assert_trace() > > parameter, the condition

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
journal_debug.log booted with patched kernel and params systemd.log_level=debug rd.debug, and then output to file with journalctl -b -o short-monotonic https://drive.google.com/open?id=0B_2Asp8DGjJ9MjRDWi0tZ0x4V2s I'm uncertain of the immediacy of some event resulting in another but... [

Planned feature status

2017-01-24 Thread Stephen Wiebelhaus
I know that setting different RAID level per subvolume is planned for the future, but I can't find documentation on the Wiki as to what priority the feature is. I can find docs on some user submitted feature requests, but it seems since this is something that was planned longer ago it's not

Re: Planned feature status

2017-01-24 Thread Hugo Mills
On Tue, Jan 24, 2017 at 01:37:21PM -0700, Stephen Wiebelhaus wrote: > I know that setting different RAID level per subvolume is planned > for the future, but I can't find documentation on the Wiki as to > what priority the feature is. I can find docs on some user submitted > feature requests, but

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
On Tue, Jan 24, 2017 at 1:27 PM, Omar Sandoval wrote: > On Tue, Jan 24, 2017 at 01:24:51PM -0700, Chris Murphy wrote: >> On Tue, Jan 24, 2017 at 1:10 PM, Omar Sandoval wrote: >> >> > Hm, still no luck, maybe it's a Server vs Workstation thing? I'll try

Re: btrfs-check: Fix bitflipped keys from bad RAM

2017-01-24 Thread Otto Kekäläinen
2016-06-28 23:11 GMT+03:00 Otto Kekäläinen : > Hello! > > A patch with this subject was submitted in May 2014: > http://www.spinics.net/lists/linux-btrfs/msg33777.html > > I don't see it among any of the ~360 open issues at >

Re: raid1: cannot add disk to replace faulty because can only mount fs as read-only.

2017-01-24 Thread Adam Borowski
On Tue, Jan 24, 2017 at 01:57:24PM -0500, Hans Deragon wrote: > If I remove 'ro' from the option, I cannot get the filesystem mounted > because of the following error: > > BTRFS: missing devices(1) exceeds the limit(0), writeable mount is not > allowed > > So I am stuck. I can only mount the

Re: btrfs check lowmem vs original

2017-01-24 Thread Qu Wenruo
At 01/24/2017 05:14 AM, Chris Murphy wrote: OK so all of these pass original check, but have problems reported by lowmem. Separate notes about each inline. Thanks for your images! It really helps a lot. I tested my patches against these images. Feel free to test them:

Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update

2017-01-24 Thread Christoph Anton Mitterer
On Wed, 2017-01-25 at 12:16 +0800, Qu Wenruo wrote: > New patches are out now. > > Although I just updated  > 0001-btrfs-progs-lowmem-check-Fix-wrong-block-group-check.patch to > fix  > all similar bugs. > > You could get it from github: >

Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update

2017-01-24 Thread Qu Wenruo
At 01/25/2017 08:46 AM, Christoph Anton Mitterer wrote: On Wed, 2017-01-25 at 08:44 +0800, Qu Wenruo wrote: Thanks for the test, You're welcome... I'm happy if I can help :) Just tell me once you think you found something, and I'll repeat the testing. Cheers, Chr is. New patches are

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 07:53:06PM -0700, Chris Murphy wrote: > On Tue, Jan 24, 2017 at 3:50 PM, Omar Sandoval wrote: > > > Got this to repro after installing systemd-container. It's happening on > > lsetxattr() to set the SELinux context on /var/lib/machines, which is a > >

[PATCH] btrfs: add regression test for setxattr on subvolume directory

2017-01-24 Thread Omar Sandoval
From: Omar Sandoval This is a regression test for "Btrfs: disable xattr operations on subvolume directories". On v4.9, it will result in an aborted transaction. Signed-off-by: Omar Sandoval --- tests/btrfs/047 | 69

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 01:48:12PM -0700, Chris Murphy wrote: > journal_debug.log booted with patched kernel and params > systemd.log_level=debug rd.debug, and then output to file with > journalctl -b -o short-monotonic > https://drive.google.com/open?id=0B_2Asp8DGjJ9MjRDWi0tZ0x4V2s > > I'm

Re: [PATCH v3 5/6] btrfs-progs: convert: Switch to new rollback function

2017-01-24 Thread Qu Wenruo
At 01/25/2017 12:37 AM, David Sterba wrote: On Tue, Jan 24, 2017 at 08:44:00AM +0800, Qu Wenruo wrote: At 01/24/2017 01:54 AM, David Sterba wrote: On Mon, Dec 19, 2016 at 02:56:41PM +0800, Qu Wenruo wrote: Since we have the whole facilities needed to rollback, switch to the new rollback.

[PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range

2017-01-24 Thread Liu Bo
Commit "d0b7da88 Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units" did this, but btrfs_lookup_ordered_range expects a 'length' rather than a 'page_end'. Signed-off-by: Liu Bo --- Is this a candidate for stable? fs/btrfs/inode.c | 2 +- 1 file changed, 1

Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update

2017-01-24 Thread Christoph Anton Mitterer
On Wed, 2017-01-25 at 08:44 +0800, Qu Wenruo wrote: > Thanks for the test, You're welcome... I'm happy if I can help :) Just tell me once you think you found something, and I'll repeat the testing. Cheers, Chr is. smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update

2017-01-24 Thread Qu Wenruo
At 01/25/2017 12:54 AM, Christoph Anton Mitterer wrote: Hey Qu. I was giving your patches a try, again on the very same fs (which saw however writes in the meantime), from my initial report. btrfs-progs v4.9 WITHOUT patch: *** # btrfs check /dev/nbd0 ; echo $?

Re: [PATCH] Btrfs: disable xattr operations on subvolume directories

2017-01-24 Thread Omar Sandoval
On Tue, Jan 24, 2017 at 06:38:02PM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > When you snapshot a subvolume containing a subvolume, you get a > placeholder read-only directory where the subvolume would be. These > directory inodes have ->i_ops set to

[PATCH] Btrfs: disable xattr operations on subvolume directories

2017-01-24 Thread Omar Sandoval
From: Omar Sandoval When you snapshot a subvolume containing a subvolume, you get a placeholder read-only directory where the subvolume would be. These directory inodes have ->i_ops set to btrfs_dir_ro_inode_operations. Previously, this didn't include the xattr operation

Re: read-only fs, kernel 4.9.0, fs/btrfs/delayed-inode.c:1170 __btrfs_run_delayed_items,

2017-01-24 Thread Chris Murphy
On Tue, Jan 24, 2017 at 3:50 PM, Omar Sandoval wrote: > Got this to repro after installing systemd-container. It's happening on > lsetxattr() to set the SELinux context on /var/lib/machines, which is a > subvolume. Looking into it now. Thanks for all of the help, Chris.

Re: [PATCH 1/2] btrfs-progs: Introduce kernel sizes to cleanup large intermediate number

2017-01-24 Thread David Sterba
On Tue, Jan 24, 2017 at 11:03:05AM +0800, Qu Wenruo wrote: > Large numbers like (1024 * 1024 * 1024) may cost reader/reviewer to > waste one second to convert to 1G. > > Introduce kernel include/linux/sizes.h to replace any intermediate > number larger than 4096 (not including 4096) to SZ_*. > >

Re: RAID56 status?

2017-01-24 Thread Niccolò Belli
+1 On martedì 24 gennaio 2017 00:31:42 CET, Christoph Anton Mitterer wrote: On Mon, 2017-01-23 at 18:18 -0500, Chris Mason wrote: We've been focusing on the single-drive use cases internally. This year that's changing as we ramp up more users in different places. Performance/stability work