Re: number of subvolumes

2017-08-30 Thread Ulli Horlacher
On Thu 2017-08-24 (18:45), Peter Grandi wrote: > As usual with Btrfs, there are corner cases to avoid: 'defrag' > should be done before 'balance' Good hint. So far I did it the other way: balance before defrag. I will switch. > and with compression switched off I have filesystems with compres

Re: [PATCH] btrfs/029: fix wrong usage of name filter

2017-08-30 Thread Misono, Tomohiro
On 2017/08/30 20:09, Eryu Guan wrote: > On Wed, Aug 30, 2017 at 04:38:16PM +0900, Misono, Tomohiro wrote: >> btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and >> $SCRATCH_MNT directory. >> >> In this function, it calls both _filter_test_dir and _filter_scratch >> concatenapted b

[PATCH] btrfs-progs: Add zstd support

2017-08-30 Thread Nick Terrell
Adds zstd support to the btrfs program, and a dependency on libzstd >= 1.0.0. The patch is also available in my fork of btrfs-progs [1], which passes Travis-CI. I tested each command that is effected in my test script [2]. I haven't updated Android.mk since I have no way to test it, and am not ce

[PATCH 3/4 v2] btrfs-progs: mkfs: refactor create_data_reloc_tree

2017-08-30 Thread Yingyi Luo
From: yingyil Add an objectid parameter to make the function a general one for inserting root items and rename it to create_tree. The change cascades down to the callchain. Signed-off-by: yingyil --- v2: utilize create_tree() function for creating a subvolume, instead of create_subvol() in conv

[PATCH 2/4 v2] btrfs-progs: add a parameter to btrfs_link_subvol

2017-08-30 Thread Yingyi Luo
From: yingyil A convert parameter is added as a flag to indicate if btrfs_link_subvol() is used for btrfs-convert. The change cascades down to the callchain. Signed-off-by: yingyil --- v2: Added a flag for btrfs_link_subvol() function so that it can be used in a more general way. For example, i

[PATCH 4/4 v2] btrfs-progs: mkfs: add subvolume support to mkfs

2017-08-30 Thread Yingyi Luo
From: yingyil Add -S/--subvol [NAME] option to configure. It enables users to create a subvolume under the toplevel volume and populate the created subvolume with files from the rootdir specified by -r/--rootdir option. Signed-off-by: yingyil --- v2: Fixed the bug for subvolume creation failure

[PATCH 1/4 v2] btrfs-progs: convert: move link_subvol out of main

2017-08-30 Thread Yingyi Luo
From: yingyil link_subvol() is moved to utils.c and renamed as btrfs_link_subvol(). The change cascades down to the callchain. Signed-off-by: yingyil --- v2: split the original patch to make code movement into a separate patch. convert/main.c | 125 +---

[PATCH 0/4 v2] add subvolume support to mkfs

2017-08-30 Thread Yingyi Luo
From: yingyil Hi all, Thanks for all the comments you gave to me. I really appriciate it. I've updated the patch, split it into small ones so that it may be easier for you to see the changes and review. One use case of this feature is that it allows easier operations on subvolumes, such as migr

[PATCH] btrfs: Remove memory barrier from block_group_cache_done

2017-08-30 Thread Nikolay Borisov
This memory barrier was introduced in 817d52f8dba2 ("Btrfs: async block group caching"), but even at that time it's usage was broken since it didn't pair with anything. There was one situation where the cached member was set to BTRFS_CACHE_FINISHED in a spinlock region which *might* have acted as a

Re: [PATCH 2/4] btrfs: convert enum btrfs_compression_type to define

2017-08-30 Thread Anand Jain
On 08/17/2017 07:57 PM, David Sterba wrote: On Thu, Aug 17, 2017 at 04:33:41AM +0800, Anand Jain wrote: On 08/16/2017 09:59 PM, David Sterba wrote: On Sun, Aug 13, 2017 at 12:02:42PM +0800, Anand Jain wrote: There isn't a huge list to manage the types, which can be managed with defines. It

[PATCH] btrfs: declare TRACE_DEFINE_ENUM for each of show_flush_state enum

2017-08-30 Thread Anand Jain
So that perf can show the state symbol. Signed-off-by: Anand Jain --- include/trace/events/btrfs.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index d412c49f5a6a..64002f898717 100644 --- a/include/trace/events/btrfs.h +++

Re: [PATCH] btrfs/029: fix wrong usage of name filter

2017-08-30 Thread Eryu Guan
On Wed, Aug 30, 2017 at 04:38:16PM +0900, Misono, Tomohiro wrote: > btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and > $SCRATCH_MNT directory. > > In this function, it calls both _filter_test_dir and _filter_scratch > concatenated by pipe. Therefore if $TEST_DIR is a prefix of

Re: [PATCH] btrfs: resume qgroup rescan on rw remount

2017-08-30 Thread David Sterba
On Sat, Aug 26, 2017 at 04:39:02PM +1000, Aleksa Sarai wrote: > On 07/12/2017 03:03 AM, David Sterba wrote: > > On Mon, Jul 10, 2017 at 04:56:36PM +0300, Nikolay Borisov wrote: > >> On 10.07.2017 16:12, Nikolay Borisov wrote: > >>> On 4.07.2017 14:49, Aleksa Sarai wrote: > Several distributio

[PATCH] btrfs/029: fix wrong usage of name filter

2017-08-30 Thread Misono, Tomohiro
btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and $SCRATCH_MNT directory. In this function, it calls both _filter_test_dir and _filter_scratch concatenated by pipe. Therefore if $TEST_DIR is a prefix of $SCRATCH_MNT, this filter function gives wrong filtered name for $SCRATCH_M

[PATCH] btrfs: remove BTRFS_FS_QUOTA_DISABLING flag

2017-08-30 Thread Misono, Tomohiro
Currently, "btrfs quota enable" would fail after "btrfs quota disable" on the first time with syslog output "qgroup_rescan_init failed with -22", but it would succeed on the second time. When "quota disable" is called, BTRFS_FS_QUOTA_DISABLING flag bit will be set in fs_info->flags in btrfs_quota_