[solved] Re: BTRFS Raid 5 Space missing - ideas ?

2019-04-20 Thread Juergen Sauer
Am 21.04.19 um 06:39 schrieb Andrei Borzenkov: > 20.04.2019 23:19, Adam Borowski пишет: >> On Sat, Apr 20, 2019 at 12:46:16PM +0200, Juergen Sauer wrote: >>> I wish a happy Easer Days before :) >> >> Same to you! >> >>> During my tests with BTRFS as Raid5 setup, I found a courious little >>> "probl

Re: BTRFS Raid 5 Space missing - ideas ?

2019-04-20 Thread Andrei Borzenkov
20.04.2019 23:19, Adam Borowski пишет: > On Sat, Apr 20, 2019 at 12:46:16PM +0200, Juergen Sauer wrote: >> I wish a happy Easer Days before :) > > Same to you! > >> During my tests with BTRFS as Raid5 setup, I found a courious little >> "problem". > >> Total devices 3 FS bytes used 9.98T

Re: BTRFS Raid 5 Space missing - ideas ?

2019-04-20 Thread Adam Borowski
On Sat, Apr 20, 2019 at 12:46:16PM +0200, Juergen Sauer wrote: > I wish a happy Easer Days before :) Same to you! > During my tests with BTRFS as Raid5 setup, I found a courious little > "problem". > Total devices 3 FS bytes used 9.98TiB > devid1 size 9.09TiB used 4.99TiB pat

Re: [PATCH] btrfs: test send with deduplication running concurrently

2019-04-20 Thread Filipe Manana
On Mon, Apr 15, 2019 at 9:32 AM wrote: > > From: Filipe Manana > > Stress send running in parallel with deduplication against files that > belong to the snapshots used by send. The goal is to hit assertion failures > and BUG_ONs when send is running, or send finding an inconsistent snapshot > tha

[PATCH 00/10] cleanup btrfs_ioctl_setflags and btrfs_set_prop

2019-04-20 Thread Anand Jain
A set of pathes to clean up btrfs_ioctl_setflags(), btrfs_set_prop_trans() and btrfs_set_prop(). So as to avoidi duplicate code in btrfs_ioctl_setflags() and killing of btrfs_set_prop_trans(). Anand Jain (10): btrfs: refactor btrfs_set_props to validate externally btrfs: export btrfs_set_prop

[PATCH 10/10] btrfs: btrfs_set_prop trans is never null

2019-04-20 Thread Anand Jain
Since now the trans argument is never null we don't have to check if its null. So delete it. Signed-off-by: Anand Jain --- fs/btrfs/props.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c index c41ed2a6347e..ca271

[PATCH 09/10] btrfs: delete unused function btrfs_set_prop_trans

2019-04-20 Thread Anand Jain
The last consumer of btrfs_set_prop_trans() was taken away by the patch btrfs: start transaction in xattr_handler_set_prop so now this function can be deleted. Signed-off-by: Anand Jain --- fs/btrfs/props.c | 6 -- fs/btrfs/props.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/fs/

[PATCH 05/10] btrfs: make a local copy of btrfs_inode flags before update

2019-04-20 Thread Anand Jain
Instead of updating the binode::flags directly, update a local copy, and then at the point of no error-return copy it to the binode::flags. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 57 ++-- 1 file changed, 26 insertions(+), 31 deletions(-) dif

[PATCH 08/10] btrfs: start transaction in xattr_handler_set_prop

2019-04-20 Thread Anand Jain
btrfs specific extended attributes on the inode are set using btrfs_xattr_handler_set_prop(), and the required transaction for this update is started by btrfs_setxattr(). For better visibility of the transaction start and end, do this in btrfs_xattr_handler_set_prop(). For which this patch copied c

[PATCH 07/10] btrfs: drop local copy of inode i_mode

2019-04-20 Thread Anand Jain
There isn't real use of making struct inode::i_mode a local copy, it saves a dereference one time, not much. Just use it directly. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e

[PATCH 02/10] btrfs: export btrfs_set_prop

2019-04-20 Thread Anand Jain
Make btrfs_set_prop() a non static function, so that it can be called from btrfs_ioctl_setflags(). We need btrfs_set_prop() instead of btrfs_set_prop_trans() so that we can use the transaction which is already started in the current thread. Signed-off-by: Anand Jain --- fs/btrfs/props.c | 6 +++-

[PATCH 04/10] btrfs: drop useless inode i_flags copy and restore

2019-04-20 Thread Anand Jain
The patch (btrfs: start transaction in btrfs_ioctl_setflags()) used btrfs_set_prop() instead of btrfs_set_prop_trans() by which now the inode::i_flags update functions such as btrfs_sync_inode_flags_to_i_flags() and btrfs_update_inode() is called in btrfs_ioctl_setflags() instead of btrfs_set_prop_

[PATCH 06/10] btrfs: drop old_fsflags in btrfs_ioctl_setflags

2019-04-20 Thread Anand Jain
btrfs_inode_flags_to_fsflags() is copied into %old_fsflags and used only once. Instead used it directly. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index b87a249642f7..e83412d7363a 1

[PATCH 01/10] btrfs: refactor btrfs_set_props to validate externally

2019-04-20 Thread Anand Jain
In preparation to merge multiple transactions when setting the compression flags, split btrfs_set_props() validation part outside of it. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 3 +++ fs/btrfs/props.c | 23 +-- fs/btrfs/props.h | 1 + fs/btrfs/xattr.c | 5 + 4

[PATCH 03/10] btrfs: start transaction in btrfs_ioctl_setflags()

2019-04-20 Thread Anand Jain
Inode attribute can be set through the FS_IOC_SETFLAGS ioctl. This flags also includes compression attribute for which we would set/reset the compression extended attribute. While doing this there is a bit of duplicate code, the following things happens twice- start/end_transaction, inode_inc_ivers

BTRFS Raid 5 Space missing - ideas ?

2019-04-20 Thread Juergen Sauer
Hi! I wish a happy Easer Days before :) During my tests with BTRFS as Raid5 setup, I found a courious little "problem". Test Envirornment: Experimental Server: Arch Linux, v5.0.x Kernel, almost up-to-date in /srv I have a BTRFS/Raid 5 mounted: /dev/sdb121T 10T 5,1T 67% /srv [root