Re: [PATCH] Btrfs: fix qgroup accounting when snapshotting

2016-05-06 Thread Mark Fasheh
On Thu, Apr 28, 2016 at 08:34:13AM +0800, Qu Wenruo wrote: > > > Josef Bacik wrote on 2016/04/27 11:18 -0400: > >On 04/26/2016 09:19 PM, Qu Wenruo wrote: > >> > >> > >>Josef Bacik wrote on 2016/04/26 10:24 -0400: > >>>The new qgroup stuff needs the quota accounting to be run before doing >

btrfs filesystem keeps allocating new chunks for no apparent reason

2016-05-06 Thread Hans van Kranenburg
Hi, I've got a mostly inactive btrfs filesystem inside a virtual machine somewhere that shows interesting behaviour: while no interesting disk activity is going on, btrfs keeps allocating new chunks, a GiB at a time. A picture, telling more than 1000 words:

Re: [PATCH] btrfs-progs: udev: add rules for dm devices

2016-05-06 Thread Jeff Mahoney
On 5/6/16 3:27 PM, Jeff Mahoney wrote: > Systemd's btrfs rule runs btrfs dev ready on each device > as it's discovered. The btrfs command is executed as a builtin > command via an IMPORT{builtin} rule, which means it gets > executed at rule evaluation time, not rule execution time. That > means

[PATCH] btrfs-progs: udev: add rules for dm devices

2016-05-06 Thread Jeff Mahoney
Systemd's btrfs rule runs btrfs dev ready on each device as it's discovered. The btrfs command is executed as a builtin command via an IMPORT{builtin} rule, which means it gets executed at rule evaluation time, not rule execution time. That means that the device mapper links haven't been setup

btrfs-progs: separated binaries with elevated privileges (proof-of-concept)

2016-05-06 Thread Axel Burri
(see links to patchset at end of mail) While btrfs-progs offer the all-inclusive "btrfs" command, it gets pretty cumbersome to restrict privileges to the subcommands. Common approaches are to either setuid root for "/sbin/btrfs" (which is not recommended at all), or to write special sudo rules

[PATCH] Btrfs: fix number of transaction units for renames with whiteout

2016-05-06 Thread fdmanana
From: Filipe Manana When we do a rename with the whiteout flag, we need to create the whiteout inode, which in the worst case requires 5 transaction units (1 inode item, 1 inode ref, 2 dir items and 1 xattr if selinux is enabled). So bump the number of transaction units from

Re: [PATCH] btrfs-progs: Restrict e2fsprogs version for new convert

2016-05-06 Thread David Sterba
On Tue, May 03, 2016 at 08:59:58AM +0800, Qu Wenruo wrote: > > > David Sterba wrote on 2016/05/02 14:33 +0200: > > On Mon, Apr 25, 2016 at 04:55:32PM +0200, David Sterba wrote: > >> On Mon, Apr 18, 2016 at 09:20:18AM +0800, Qu Wenruo wrote: > >>> > >>> > >>> David Sterba wrote on 2016/04/15

Re: [PATCH 1/2] Btrfs: add more valid checks for superblock

2016-05-06 Thread David Sterba
On Wed, May 04, 2016 at 10:40:02AM -0700, Liu Bo wrote: > > > + printk(KERN_ERR "BTRFS: bytes_used is too small %llu\n", > > > +btrfs_super_bytes_used(sb)); > > > + ret = -EINVAL; > > > + } > > > + if (btrfs_super_stripesize(sb) != 4096) { > > > > This is too

Re: [PATCH 1/2] Btrfs: add more valid checks for superblock

2016-05-06 Thread David Sterba
On Thu, May 05, 2016 at 09:08:54AM +0800, Qu Wenruo wrote: > >> An early check can compare against some reasonable value, but the > >> total_bytes value must be equal to the sum of all device sizes > >> (disk_total_bytes). I'm not sure if we have enough information to verify > >> that at this

Re: [PATCH] btrfs: don't force mounts to wait for cleaner_kthread to delete one or more subvolumes

2016-05-06 Thread David Sterba
On Thu, May 05, 2016 at 10:12:32AM +0100, Filipe Manana wrote: > On Thu, May 5, 2016 at 5:23 AM, Zygo Blaxell > wrote: > > During a mount, we start the cleaner kthread first because the transaction > > kthread wants to wake up the cleaner kthread. We start the

Re: How to rollback a snapshot of a subvolume with nested subvolumes?

2016-05-06 Thread Austin S. Hemmelgarn
On 2016-05-06 07:48, Niccolò Belli wrote: The following are my subvolumes: $ sudo btrfs subvol list / [sudo] password di niko: ID 257 gen 1040 top level 5 path @ ID 258 gen 1040 top level 5 path @home ID 270 gen 889 top level 257 path var/cache/pacman/pkg ID 271 gen 15 top level 257 path

How to rollback a snapshot of a subvolume with nested subvolumes?

2016-05-06 Thread Niccolò Belli
The following are my subvolumes: $ sudo btrfs subvol list / [sudo] password di niko: ID 257 gen 1040 top level 5 path @ ID 258 gen 1040 top level 5 path @home ID 270 gen 889 top level 257 path var/cache/pacman/pkg ID 271 gen 15 top level 257 path var/abs ID 272 gen 972 top level 257 path

Re: btrfs ate my data in just two days, after a fresh install. ram and disk are ok. it still mounts, but I cannot repair

2016-05-06 Thread Niccolò Belli
I formatted the partition and copied the content of my previous rootfs to it. There is no dmcrypt now and mount options are defaults, except for noatime. After a single boot I got the very same problem as before (fs corrupted and an infinite loop when doing btrfs check --repair. I wanted to

Re: scrub: Tree block spanning stripes, ignored

2016-05-06 Thread Ivan P
Issue persists with btrfs-progs 4.5.1 and linux 4.5.1. Did you have time to implement that option in btrfsck you were talking about? I'm a bit reluctant to use this partition at this point. Regards Ivan On Tue, Apr 12, 2016 at 7:15 PM, Ivan P wrote: > Feel free to send

Re: Spare volumes and hot auto-replacement feature

2016-05-06 Thread Austin S. Hemmelgarn
On 2016-05-06 05:08, David Sterba wrote: On Thu, May 05, 2016 at 07:23:11AM -0400, Austin S. Hemmelgarn wrote: On 2016-05-04 19:18, Dmitry Katsubo wrote: Dear btrfs community, I am interested in spare volumes and hot auto-replacement feature [1]. I have a couple of questions: * Which kernel

Re: [RFC PATCH 1/1] btrfs: Encryption: Add btrfs encryption support

2016-05-06 Thread Anand Jain
Thanks for the review comments Liu bo. I am looking into the comments. Anand On 03/10/2016 10:19 AM, Liu Bo wrote: On Wed, Mar 02, 2016 at 12:08:10AM +0800, Anand Jain wrote: *** *** Warning: Experimental code. *** Adds encryption support. The branch is based on v4.5-rc6. Signed-off-by:

Re: Spare volumes and hot auto-replacement feature

2016-05-06 Thread David Sterba
On Thu, May 05, 2016 at 07:23:11AM -0400, Austin S. Hemmelgarn wrote: > On 2016-05-04 19:18, Dmitry Katsubo wrote: > > Dear btrfs community, > > > > I am interested in spare volumes and hot auto-replacement feature [1]. I > > have a couple of questions: > > > > * Which kernel version this feature