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.
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.
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 +---
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
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
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
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
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.
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