[PATCH 0/1] btrfs-progs: mkfs: add subvolume support to mkfs

2017-08-25 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. Two functions link_subvol() and create_subvol() are moved from convert/main.

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

2017-08-25 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. Two functions link_subvol() and create_subvol() are moved from convert/main.

[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 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 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 1/4 v3] btrfs-progs: convert: move link_subvol out of main

2017-09-15 Thread Yingyi Luo
From: yingyil link_subvol() is moved to inode.c and renamed as btrfs_mksubvol(). The change cascades down to the callchain. Signed-off-by: yingyil --- v3: moved link_subvol to inode.c and put its header in ctree.h. The name is changed to btrfs_mksubvol. Thanks for your comments. convert/main.

[PATCH 2/4 v3] btrfs-progs: add a parameter to btrfs_mksubvol

2017-09-15 Thread Yingyi Luo
From: yingyil A convert parameter is added as a flag to indicate if btrfs_mksubvol() is used for btrfs-convert. The change cascades down to the callchain. Signed-off-by: yingyil --- v3: changed the convert flag from int type to bool type. convert/main.c | 2 +- ctree.h| 4 +++- inod