Re: commands like "du", "df", and "btrfs fs sync" hang

2016-05-04 Thread Kai Krakow
Am Tue, 3 May 2016 08:48:14 +0200 schrieb Kai Krakow : > Am Sun, 1 May 2016 20:39:31 -0400 > schrieb Nicholas D Steeves : > > > On 1 May 2016 at 03:00, Kai Krakow wrote: > > > Hello! > > > > > > I'm not sure what triggeres this, neither if it is btrfs specific. > > > The filesystems have been

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

2016-05-04 Thread Zygo Blaxell
During a mount, we start the cleaner kthread first because the transaction kthread wants to wake up the cleaner kthread. We start the transaction kthread next because everything in btrfs wants transactions. We do reloc recovery in the thread that was doing the original mount call once the transac

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-04 Thread Qu Wenruo
Niccolò Belli wrote on 2016/05/05 01:21 +0200: I really need your help, because it's the second time btrfs ate my data in a couple of days and I can't use my laptop if I don't find the culprit. This was the mail I sent a couple of days ago: https://www.spinics.net/lists/linux-btrfs/msg54754.ht

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

2016-05-04 Thread Qu Wenruo
Liu Bo wrote on 2016/05/04 10:44 -0700: On Wed, May 04, 2016 at 03:23:29PM +0200, David Sterba wrote: On Tue, May 03, 2016 at 09:02:56AM +0800, Qu Wenruo wrote: Liu Bo wrote on 2016/05/02 11:15 -0700: This adds valid checks for super_total_bytes, super_bytes_used and super_stripesize. Rep

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-04 Thread Chris Murphy
On Wed, May 4, 2016 at 5:21 PM, Niccolò Belli wrote: > rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,subvolid=257,subvol=/@ I suggest using defaults for starters. The only thing in that list that needs be there is either subvolid or subvold, not both. Add in the non-default options

Re: [PATCH 2/2] Btrfs: add valid checks for chunk loading

2016-05-04 Thread Qu Wenruo
Liu Bo wrote on 2016/05/03 16:36 -0700: On Tue, May 03, 2016 at 09:12:01AM +0800, Qu Wenruo wrote: Liu Bo wrote on 2016/05/02 11:15 -0700: To prevent fuzz filesystem images from panic the whole system, we need various validation checks to refuse to mount such an image if btrfs finds any inv

Spare volumes and hot auto-replacement feature

2016-05-04 Thread Dmitry Katsubo
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 will be included? * The description says that replacement happens automatically when there is any write failed or flush failed. Is it po

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-04 Thread Niccolò Belli
I really need your help, because it's the second time btrfs ate my data in a couple of days and I can't use my laptop if I don't find the culprit. This was the mail I sent a couple of days ago: https://www.spinics.net/lists/linux-btrfs/msg54754.html I previously thought the culprit was a bug in

Re: [PATCH] btrfs: Fix BUG_ON condition in scrub_setup_recheck_block()

2016-05-04 Thread Sanidhya Solanki
On Fri, 29 Apr 2016 18:33:59 -0700 Ashish Samant wrote: > pagev array in scrub_block{} is of size SCRUB_MAX_PAGES_PER_BLOCK. > page_index should be checked with the same to trigger BUG_ON(). > > Signed-off-by: Ashish Samant > --- > fs/btrfs/scrub.c | 2 +- > 1 file changed, 1 insertion(+), 1 d

[PATCH] btrfs-progs: Adjust timing of safety delay countdown

2016-05-04 Thread Noah Massey
When printing the countdown in the safety delay, the number should correspond to the number of seconds remaining to wait at the time the delay is printed. In other words, there should be a one second sleep after printing '1'. Signed-off-by: Noah Massey --- cmds-balance.c | 2 +- 1 file changed,

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Chris Murphy
On Wed, May 4, 2016 at 12:34 PM, Duncan <1i5t5.dun...@cox.net> wrote: > Chris Murphy posted on Wed, 04 May 2016 12:07:39 -0600 as excerpted: > >> If you think it's worth the hassle, then you have to directly modify the >> grub.cfg to include an expanded rootflags parameter. Right now >> grub-mkconf

Re: Subvolumes cannot be mounted after raid1 conversion

2016-05-04 Thread Hasse Hagen Johansen
Den 04/05/16 kl. 20:12 skrev Chris Murphy: > On Tue, May 3, 2016 at 4:24 AM, Hasse Hagen Johansen > wrote: >> Ok. I can mount it manually just fine now using this command : sudo mount >> -t btrfs -o subvol=music /dev/sde /mnt/temp >> >> But somehow I cannot mount it at /music anymore(and I just

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Austin S. Hemmelgarn
On 2016-05-04 14:07, Chris Murphy wrote: On Wed, May 4, 2016 at 7:52 AM, Niccolò Belli wrote: I tried to add rootflags=noatime,compress=lzo,discard,autodefrag to GRUB_CMDLINE_LINUX in /etc/default/grub as you suggested but my system didn't manage to boot, probably because grub automatically a

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Duncan
Chris Murphy posted on Wed, 04 May 2016 12:07:39 -0600 as excerpted: > If you think it's worth the hassle, then you have to directly modify the > grub.cfg to include an expanded rootflags parameter. Right now > grub-mkconfig logic doesn't not include all options in fstab for > rootflags. And...

Re: Subvolumes cannot be mounted after raid1 conversion

2016-05-04 Thread Chris Murphy
On Tue, May 3, 2016 at 4:24 AM, Hasse Hagen Johansen wrote: > Ok. I can mount it manually just fine now using this command : sudo mount -t > btrfs -o subvol=music /dev/sde /mnt/temp > > But somehow I cannot mount it at /music anymore(and I just found out that is > what has been tricking me) > >

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Chris Murphy
On Wed, May 4, 2016 at 7:52 AM, Niccolò Belli wrote: > I tried to add rootflags=noatime,compress=lzo,discard,autodefrag to > GRUB_CMDLINE_LINUX in /etc/default/grub as you suggested but my system > didn't manage to boot, probably because grub automatically adds > rootflags=subvol=@ and only a si

Re: [PATCH 00/42] v7: separate operations from flags in the bio/request structs

2016-05-04 Thread Mike Christie
On 05/04/2016 12:58 PM, Jeff Moyer wrote: > Mike Christie writes: > >> On 05/03/2016 03:44 PM, Jeff Moyer wrote: >>> Hi, Mike, >>> >>> That git tree doesn't seem to exist. I did manage to apply your patch >>> set on top of next-20160415, though. >>> >>> So... what testing did you do? ;-) I ran i

Re: [PATCH 00/42] v7: separate operations from flags in the bio/request structs

2016-05-04 Thread Jeff Moyer
Mike Christie writes: > On 05/03/2016 03:44 PM, Jeff Moyer wrote: >> Hi, Mike, >> >> That git tree doesn't seem to exist. I did manage to apply your patch >> set on top of next-20160415, though. >> >> So... what testing did you do? ;-) I ran into the following problems > > I normally run xfste

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Chris Murphy
> Niccolò Belli posted on Wed, 04 May 2016 11:46:10 +0200 as excerpted: > >> Hi, >> I have the following options for my rootfs in /etc/fstab: >> rw,relatime,compress=lzo,ssd,discard,space_cache,autodefrag, >> subvolid=257,subvol=/@ The combination of subvolid and subvol is rejected in recent kerne

Re: [PATCH 00/42] v7: separate operations from flags in the bio/request structs

2016-05-04 Thread Mike Christie
On 05/03/2016 03:44 PM, Jeff Moyer wrote: > mchri...@redhat.com writes: > >> The following patches begin to cleanup the request->cmd_flags and >> bio->bi_rw mess. We currently use cmd_flags to specify the operation, >> attributes and state of the request. For bi_rw we use it for similar >> info an

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

2016-05-04 Thread Liu Bo
On Wed, May 04, 2016 at 03:23:29PM +0200, David Sterba wrote: > On Tue, May 03, 2016 at 09:02:56AM +0800, Qu Wenruo wrote: > > > > > > Liu Bo wrote on 2016/05/02 11:15 -0700: > > > This adds valid checks for super_total_bytes, super_bytes_used and > > > super_stripesize. > > > > > > Reported-by:

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

2016-05-04 Thread Liu Bo
On Wed, May 04, 2016 at 03:29:35PM +0200, David Sterba wrote: > On Mon, May 02, 2016 at 11:15:50AM -0700, Liu Bo wrote: > > This adds valid checks for super_total_bytes, super_bytes_used and > > super_stripesize. > > > > Reported-by: Vegard Nossum > > Reported-by: Quentin Casasnovas > > Signed-o

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Andrei Borzenkov
04.05.2016 18:54, Duncan пишет: > Niccolò Belli posted on Wed, 04 May 2016 15:52:39 +0200 as excerpted: > >> Thanks, >> Now my fstab option are >> rw,noatime,compress=lzo,discard,autodefrag,subvolid=257,subvol=/@ >> I tried to add rootflags=noatime,compress=lzo,discard,autodefrag to >> GRUB_CMDLIN

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Duncan
Niccolò Belli posted on Wed, 04 May 2016 15:52:39 +0200 as excerpted: > Thanks, > Now my fstab option are > rw,noatime,compress=lzo,discard,autodefrag,subvolid=257,subvol=/@ > I tried to add rootflags=noatime,compress=lzo,discard,autodefrag to > GRUB_CMDLINE_LINUX in /etc/default/grub as you sugge

Re: [PATCH] btrfs-progs: add safety delay before starting full balance

2016-05-04 Thread David Sterba
On Mon, May 02, 2016 at 10:09:48AM -0400, Noah Massey wrote: > > + if (!(flags & BALANCE_START_FILTERS) && !(flags & > > BALANCE_START_NOWARN)) { > > + int delay = 10; > > + > > + printf("WARNING:\n\n"); > > + printf("\tFull balance without filters r

Re: [PATCH] Btrfs: fix unexpected balance crash due to BUG_ON

2016-05-04 Thread David Sterba
On Mon, May 02, 2016 at 04:01:02PM -0700, Liu Bo wrote: > --- a/fs/btrfs/volumes.c > +++ b/fs/btrfs/volumes.c > @@ -3418,13 +3418,25 @@ static int __btrfs_balance(struct btrfs_fs_info > *fs_info) > ret = btrfs_shrink_device(device, old_size - size_to_free); > if (ret ==

Re: [PATCH 2/2] Btrfs: add valid checks for chunk loading

2016-05-04 Thread David Sterba
A few minor comments below On Mon, May 02, 2016 at 11:15:51AM -0700, Liu Bo wrote: > --- a/fs/btrfs/volumes.c > +++ b/fs/btrfs/volumes.c > @@ -6206,27 +6206,23 @@ struct btrfs_device *btrfs_alloc_device(struct > btrfs_fs_info *fs_info, > return dev; > } > > -static int read_one_chunk(str

Re: [PATCH] btrfs-progs: subvolume sync: fix handling of -s option

2016-05-04 Thread David Sterba
On Wed, May 04, 2016 at 03:36:35PM +0200, Marek Rusinowski wrote: > Setting check interval for subvolume sync resulted > in picking wrong element from argv for it's value: > > $ btrfs subvolume sync -s 10 ./dir > ERROR: invalid sleep interval ./dir > $ btrfs subvolume sync ./dir -s 10 > Se

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Niccolò Belli
Thanks, Now my fstab option are rw,noatime,compress=lzo,discard,autodefrag,subvolid=257,subvol=/@ I tried to add rootflags=noatime,compress=lzo,discard,autodefrag to GRUB_CMDLINE_LINUX in /etc/default/grub as you suggested but my system didn't manage to boot, probably because grub automatically

[PATCH] btrfs-progs: subvolume sync: fix handling of -s option

2016-05-04 Thread Marek Rusinowski
Setting check interval for subvolume sync resulted in picking wrong element from argv for it's value: $ btrfs subvolume sync -s 10 ./dir ERROR: invalid sleep interval ./dir $ btrfs subvolume sync ./dir -s 10 Segmentation fault Signed-off-by: Marek Rusinowski --- cmds-subvolume.c | 5 ++-

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

2016-05-04 Thread David Sterba
On Mon, May 02, 2016 at 11:15:50AM -0700, Liu Bo wrote: > This adds valid checks for super_total_bytes, super_bytes_used and > super_stripesize. > > Reported-by: Vegard Nossum > Reported-by: Quentin Casasnovas > Signed-off-by: Liu Bo > --- > fs/btrfs/disk-io.c | 14 ++ > 1 file cha

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

2016-05-04 Thread David Sterba
On Tue, May 03, 2016 at 09:02:56AM +0800, Qu Wenruo wrote: > > > Liu Bo wrote on 2016/05/02 11:15 -0700: > > This adds valid checks for super_total_bytes, super_bytes_used and > > super_stripesize. > > > > Reported-by: Vegard Nossum > > Reported-by: Quentin Casasnovas > > Signed-off-by: Liu Bo

Re: [PATCH] Btrfs-progs: fix incorrect flag check

2016-05-04 Thread David Sterba
On Mon, May 02, 2016 at 11:13:20AM -0700, Liu Bo wrote: > The flag OPEN_CTREE_RECOVER_SUPER is set when it's going to recover > any bad superblock copy, the current code doesn't match that. > > Signed-off-by: Liu Bo Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe li

Re: [PATCH, maybe WRONG] btrfs: don't let btrfs_recover_relocation get stuck waiting for cleaner_kthread to delete a snapshot

2016-05-04 Thread David Sterba
On Wed, May 04, 2016 at 10:49:23AM +0100, Filipe Manana wrote: > On Wed, May 4, 2016 at 2:10 AM, Zygo Blaxell > wrote: > > This is one way to fix a long hang during mounts. There's probably a > > better way, but this is the one I've used to get my filesystems up > > and running. > > > > We start

[PATCH v2] btrfs: ioctl: reorder exclusive op check in RM_DEV

2016-05-04 Thread David Sterba
From: David Sterba Move the op exclusivity check before the other code (same as in ADD_DEV). Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 5a23806ae418..70

Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Duncan
Niccolò Belli posted on Wed, 04 May 2016 11:46:10 +0200 as excerpted: > Hi, > I have the following options for my rootfs in /etc/fstab: > rw,relatime,compress=lzo,ssd,discard,space_cache,autodefrag, > subvolid=257,subvol=/@ > > grub2 already placed rootflags=subvol=@ in its cmdline, but not the >

Re: Subvolumes cannot be mounted after raid1 conversion

2016-05-04 Thread Duncan
hasse posted on Tue, 03 May 2016 20:38:14 +0200 as excerpted: > I have found the easy solution. From > https://bbs.archlinux.org/viewtopic.php?id=192991 > > First: > > # systemctl daemon-reload > > followed by: > > # systemctl restart remote-fs.target > > or > > # sys

[PATCH 1/2] Btrfs: unpin log if rename operation fails

2016-05-04 Thread fdmanana
From: Filipe Manana If rename operations fail at some point after we pinned the log, we end up aborting the current transaction but never unpin the log, which leaves concurrent tasks that are trying to sync the log (as part of an fsync request from user space) blocked forever and preventing the f

[PATCH 2/2] Btrfs: pin log earlier when renaming

2016-05-04 Thread fdmanana
From: Filipe Manana We were pinning the log right after the first step in the rename operation (inserting inode ref for the new name in the destination directory) instead of doing it before. This behaviour was introduced in 2009 for some reason that was not mentioned neither on the changelog nor

Re: [PATCH] btrfs: ioctl: reorder exclusive op check in RM_DEV

2016-05-04 Thread Filipe Manana
On Wed, May 4, 2016 at 10:32 AM, David Sterba wrote: > From: David Sterba > > Move the op exclusivity check before the other code (same as in > ADD_DEV). > > Signed-off-by: David Sterba > --- > fs/btrfs/ioctl.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) >

Re: [PATCH, maybe WRONG] btrfs: don't let btrfs_recover_relocation get stuck waiting for cleaner_kthread to delete a snapshot

2016-05-04 Thread Filipe Manana
On Wed, May 4, 2016 at 2:10 AM, Zygo Blaxell wrote: > This is one way to fix a long hang during mounts. There's probably a > better way, but this is the one I've used to get my filesystems up > and running. > > We start the cleaner kthread first because the transaction kthread wants > to wake up

/etc/fstab rootfs options vs grub2 rootflags cmdline

2016-05-04 Thread Niccolò Belli
Hi, I have the following options for my rootfs in /etc/fstab: rw,relatime,compress=lzo,ssd,discard,space_cache,autodefrag,subvolid=257,subvol=/@ grub2 already placed rootflags=subvol=@ in its cmdline, but not the other options. I suppose that some of them will automatically be set during remoun

[PATCH] btrfs: kill unused writepage_io_hook callback

2016-05-04 Thread David Sterba
It seems to be long time unused, since 2008 and 6885f308b5570 ("Btrfs: Misc 2.6.25 updates"). Propagating the removal touches some code but has no functional effect. Signed-off-by: David Sterba --- fs/btrfs/extent_io.c | 39 --- fs/btrfs/extent_io.h | 1 - 2

[PATCH] btrfs: add write protection to SET_FEATURES ioctl

2016-05-04 Thread David Sterba
From: David Sterba Perform the want_write check if we get far enough to do any writes. Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 5a23806ae418..e3239272fa61 100

[PATCH] btrfs: ioctl: reorder exclusive op check in RM_DEV

2016-05-04 Thread David Sterba
From: David Sterba Move the op exclusivity check before the other code (same as in ADD_DEV). Signed-off-by: David Sterba --- fs/btrfs/ioctl.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e3239272fa61..45

Re: [PATCH 1/1] btrfs: fix lock dep warning move scratch super outside of chunk_mutex

2016-05-04 Thread David Sterba
On Tue, Apr 12, 2016 at 09:36:16PM +0800, Anand Jain wrote: > Move scratch super outside of the chunk lock to avoid below > lockdep warning. The better place to scratch super is in > the function btrfs_rm_dev_replace_free_srcdev() just before > free_device, which is outside of the chunk lock as wel

Re: [PATCH v2] btrfs: cleanup assigning next active device with a check

2016-05-04 Thread David Sterba
On Wed, May 04, 2016 at 07:31:55AM +0800, Anand Jain wrote: > > >>While here can also integrate this. > >> > >>[PATCH 1/1] btrfs: fix lock dep warning move scratch super outside of > >> chunk_mutex > > > > That one has been in for-next for some time. > > There is another patch which is si

Re: [PATCH v2] btrfs: cleanup assigning next active device with a check

2016-05-04 Thread David Sterba
On Tue, May 03, 2016 at 07:47:28PM +0200, David Sterba wrote: > On Tue, May 03, 2016 at 06:01:31PM +0800, Anand Jain wrote: > > > > > > On 05/02/2016 11:26 PM, David Sterba wrote: > > > On Mon, May 02, 2016 at 07:02:08AM +0800, Anand Jain wrote: > > >> --- a/fs/btrfs/dev-replace.c > > >> +++ b/fs

Re: [PATCH] btrfs: s_bdev is not null after missing replace

2016-05-04 Thread Anand Jain
On 05/04/2016 01:31 AM, David Sterba wrote: On Thu, Apr 14, 2016 at 06:24:10PM +0800, Anand Jain wrote: Yauhen reported in the ML that s_bdev is null at mount, and s_bdev gets updated to some device when missing device is replaced, as because bdev is null for missing device, things gets match