Re: [PATCH 1/7] btrfs: Check qgroup level in kernel qgroup assign.

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: Although we have qgroup level check in btrfs-progs, it's not enough since other programe may still call ioctl directly not using btrfs-progs. For example, systemd. But it's btrfs-progs to be blame since we don't provide a full-function(like subvolume

Re: [PATCH 4/7] btrfs: Update btrfs qgroup status item when rescan is done.

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: Update qgroup status when rescan is done. Before this patch, status item is not updated on rescan finish, which causing the RESCAN and INCONSISTENT flags never cleared. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com Reviewed-by: Josef Bacik

Re: [PATCH 1/9] btrfs: qgroup: move WARN_ON() to the correct location.

2015-03-02 Thread Josef Bacik
On 02/10/2015 05:23 AM, Dongsheng Yang wrote: In function qgroup_excl_accounting(), we need to WARN when qg-excl is less than what we want to free, same to child and parents. But currently, for parent qgroup, the WARN_ON() is located after freeing qg-excl. It will WARN out even we free it

Re: [PATCH 3/7] btrfs: qgroup: Fix dead judgement on qgroup_rescan_leaf() return value.

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: Old qgroup_rescan_leaf() comment indicates ret == 2 as complete and cleared INCONSISTENT flag. This is not true since it will never return 2, and inside it no codes will clear INCONSISTENT flag. The flag clearance is done in btrfs_qgroup_rescan_work().

Re: [PATCH 2/7] btrfs: Don't allow subvolid = (1 BTRFS_QGROUP_LEVEL_SHIFT) to be created

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: Btrfs will create qgroup on subvolume creation if quota is enabled, but qgroup uses the high bits(currently 16 bits) as level, to build the inheritance. However it is fully possible a subvolume can be created with a subvolumeid larger than 1

Re: [PATCH 6/7] btrfs: quota: Automatically update related qgroups or mark INCONSISTENT flags when assigning/deleting a qgroup relations.

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: Operation like qgroups assigning/deleting qgroup relations will mostly cause qgroup data inconsistent, since it needs to do the full rescan to determine whether shared extents are exclusive or still shared in parent qgroups. But there are some

Re: [PATCH 7/7] btrfs: quota: Update quota tree after qgroup relationship change.

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: Previous patch modified the in memory struct but it's not written in quota tree until next commit. So user will still get old data using btrfs qgroup show after assign/remove. This patch will call btrfs_run_qgroups in assign ioctl so it will be updated

Re: [PATCH 2/9] btrfs: qgroup: inherit limit info from srcgroup in creating snapshot.

2015-03-02 Thread Josef Bacik
On 02/10/2015 05:23 AM, Dongsheng Yang wrote: Currently, when we snapshot a subvol, snapshot will not copy the limits from srcqgroup. This patch make the qgroup in snapshot inherit the limit info when create a snapshot. Signed-off-by: Dongsheng Yang yangds.f...@cn.fujitsu.com Reviewed-by:

Re: [PATCH 5/7] btrfs: qgroup: clear STATUS_FLAG_ON in disabling quota.

2015-03-02 Thread Josef Bacik
On 02/27/2015 03:24 AM, Qu Wenruo wrote: From: Dongsheng Yang yangds.f...@cn.fujitsu.com we forgot to clear STATUS_FLAG_ON in quota_disable(), it will cause a problem shown as below: # mount /dev/sdc /mnt # btrfs quota enable /mnt # btrfs quota disable /mnt #

rsync causes kernel oops

2015-03-02 Thread Rich Gannon
This is on a Dell Poweredge 2650 with dual Xeons. Running Gentoo x86. Kernel 3.18.7 with GRSecurity patches (gentoo's hardened-sources). btrfs-progs version 3.18.2 I originally had the drives setup as raid5 with kernel 3.19 and no GRSecurity patches (and tried 4.0-rc1)., but kept having

Re: [PATCH v2] Btrfs: fix data loss in the fast fsync path

2015-03-02 Thread Liu Bo
On Sun, Mar 01, 2015 at 09:08:38AM +, Filipe Manana wrote: When using the fast file fsync code path we can miss the fact that new writes happened since the last file fsync and therefore return without waiting for the IO to finish and write the new extents to the fsync log. Here's an

Re: [PATCH 1/1] btrfs: Align EOF length to block in extent_same

2015-03-02 Thread Zygo Blaxell
I second this. I've seen the same behavior. Clone seems to have evolved a little further than extent-same knows about. e.g. there is code in the extent-same ioctl that tries to avoid doing a clone from within one inode to elsewhere in the same inode; however, the clone ioctl (which extent-same

Regression: kernel 4.0.0-rc1 - soft lockups

2015-03-02 Thread Marcel Ritter
Hi, yesterday I did a kernel update on my btrfs test system (Ubuntu 14.04.2) from custom-build kernel 3.19-rc6 to 4.0.0-rc1. Almost instantly after starting my test script, the system got stuck with soft lockups (the machine was running the very same test for weeks on the old kernel without

Re: Documenting MS_LAZYTIME

2015-03-02 Thread Michael Kerrisk (man-pages)
On 02/27/2015 06:51 PM, Darrick J. Wong wrote: On Fri, Feb 27, 2015 at 09:01:10AM +0100, Michael Kerrisk (man-pages) wrote: On 02/27/2015 01:04 AM, Theodore Ts'o wrote: On Thu, Feb 26, 2015 at 02:36:33PM +0100, Michael Kerrisk (man-pages) wrote: The disadvantage of MS_STRICTATIME |

Re: Regression: kernel 4.0.0-rc1 - soft lockups

2015-03-02 Thread Liu Bo
On Tue, Mar 03, 2015 at 07:02:01AM +0100, Marcel Ritter wrote: Hi, yesterday I did a kernel update on my btrfs test system (Ubuntu 14.04.2) from custom-build kernel 3.19-rc6 to 4.0.0-rc1. Almost instantly after starting my test script, the system got stuck with soft lockups (the machine

Re: Regression: kernel 4.0.0-rc1 - soft lockups

2015-03-02 Thread Marcel Ritter
Hi, yes it is reproducible. Just creating a new btrfs filesystem (14 disks, data/mdata raid6, latest git btrfs-progs) and mounting this filesystems causes the system to hang (I think I once even got it mounted, but it did hang shortly after when dd started writing to it). I just ran some quick

Re: rsync causes kernel oops

2015-03-02 Thread Liu Bo
On Mon, Mar 02, 2015 at 09:43:04PM -0500, Rich Gannon wrote: This is on a Dell Poweredge 2650 with dual Xeons. Running Gentoo x86. Kernel 3.18.7 with GRSecurity patches (gentoo's hardened-sources). btrfs-progs version 3.18.2 I originally had the drives setup as raid5 with kernel 3.19 and

Re: [PATCH 1/1] btrfs: Align EOF length to block in extent_same

2015-03-02 Thread Matt Robinson
Hi David, Have you had a chance to look at this? Am very happy to answer further questions, adjust my implementation, provide a different kind of test case, etc. Many Thanks, Matt On 28 January 2015 at 19:46, Matt Robinson g...@nerdoftheherd.com wrote: On 28 January 2015 at 12:55, David

Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()

2015-03-02 Thread Markus Trippelsdorf
On 2015.02.24 at 13:29 +0100, Markus Trippelsdorf wrote: On 2015.02.20 at 11:09 +0100, Markus Trippelsdorf wrote: I get the following warnings during Firefox LTO build. lto1-wpa-stream outputs the final object files in parallel and therefore stresses the filessystem. These warnings

[PATCH v2] Btrfs: fix data loss in the fast fsync path

2015-03-02 Thread Filipe Manana
When using the fast file fsync code path we can miss the fact that new writes happened since the last file fsync and therefore return without waiting for the IO to finish and write the new extents to the fsync log. Here's an example scenario where the fsync will miss the fact that new file data

Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()

2015-03-02 Thread Markus Trippelsdorf
On 2015.03.02 at 12:07 +, Filipe David Manana wrote: [83159.038708] [ cut here ] [83159.038716] WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0() [83159.038718] CPU: 2 PID: 32343 Comm: rm Tainted: GW

Re: WARNING: CPU: 2 PID: 32343 at fs/btrfs/inode.c:8693 btrfs_destroy_inode+0x278/0x2a0()

2015-03-02 Thread Filipe David Manana
On Mon, Mar 2, 2015 at 11:25 AM, Markus Trippelsdorf mar...@trippelsdorf.de wrote: On 2015.02.24 at 13:29 +0100, Markus Trippelsdorf wrote: On 2015.02.20 at 11:09 +0100, Markus Trippelsdorf wrote: I get the following warnings during Firefox LTO build. lto1-wpa-stream outputs the final

Btrfs Send/Receive no such file or directory bug

2015-03-02 Thread Robbie Ko
Hi, I have been testing btrfs send/receive recently. I got an error rename failed: no such file or directory on receive side. The followings are simple reproduced steps and related information, Is there any idea about what this might be or how to fix it? uanme -a Linux ubuntu 4.0.0-rc1-custom

[PATCH] btrfs: Support busy loop of write and delete

2015-03-02 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com Reproduce: while true; do dd if=/dev/zero of=/mnt/btrfs/file count=[75% fs_size] rm /mnt/btrfs/file done Then we can see above loop failed on NO_SPACE. It it long-term problem since very beginning, because delayed-iput after rm are not run. We

Re: Btrfs Send/Receive no such file or directory bug

2015-03-02 Thread Filipe David Manana
On Mon, Mar 2, 2015 at 12:22 PM, Robbie Ko robbi...@synology.com wrote: Hi, I have been testing btrfs send/receive recently. I got an error rename failed: no such file or directory on receive side. The followings are simple reproduced steps and related information, Is there any idea about

[PATCH] Btrfs: fix ASSERT(list_empty(cur_trans-dirty_bgs_list)

2015-03-02 Thread Josef Bacik
Dave could hit this assert consistently running btrfs/078. This is because when we update the block groups we could truncate the free space, which would try to delete the csums for that range and dirty the csum root. For this to happen we have to have already written out the csum root so it's

[PATCH] Btrfs: remove extra run_delayed_refs in update_cowonly_root

2015-03-02 Thread Josef Bacik
This got added with my dirty_bgs patch, it's not needed. Thanks, Signed-off-by: Josef Bacik jba...@fb.com --- fs/btrfs/transaction.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index a7a413f..3d017d6 100644 --- a/fs/btrfs/transaction.c