From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 5/6] btrfs-progs: mkfs: introduce experimental --subvol option
Date: Tue, 17 Oct 2023 09:54:30 -0400 [thread overview]
Message-ID: <20231017135430.GB2350212@perftesting> (raw)
In-Reply-To: <bcb175042cb8b4036f532269235af02e10a69de5.1697430866.git.wqu@suse.com>
On Mon, Oct 16, 2023 at 03:08:51PM +1030, Qu Wenruo wrote:
> Although mkfs.btrfs supports --rootdir to fill the target filesystem, it
> doesn't have the ability to create any subvolume.
>
> This patch introduce a very basic version of --subvol for mkfs.btrfs,
> the limits are:
>
> - No co-operation with --rootdir
> This requires --rootdir to have extra handling for any existing
> inodes.
> (Currently --rootdir assumes the fs tree is completely empty)
>
> - No multiple --subvol options supports
> This requires us to collect and sort all the paths and start creating
> subvolumes from the shortest path.
> Furthermore this requires us to create subvolume under another
> subvolume.
>
> For now, this patch focus on the basic checks on the provided subvolume
> path, to wipe out any invalid things like ".." or something like "//////".
>
> We support something like "//dir1/dir2///subvol///" just like VFS path
> (duplicated '/' would just be ignored).
>
> Issue: #42
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> mkfs/main.c | 23 ++++++++
> mkfs/rootdir.c | 157 +++++++++++++++++++++++++++++++++++++++++++++++++
> mkfs/rootdir.h | 1 +
> 3 files changed, 181 insertions(+)
>
> diff --git a/mkfs/main.c b/mkfs/main.c
> index 42aa68b7ecf4..6bf30b758572 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -434,6 +434,9 @@ static const char * const mkfs_usage[] = {
> "Creation:",
> OPTLINE("-b|--byte-count SIZE", "set size of each device to SIZE (filesystem size is sum of all device sizes)"),
> OPTLINE("-r|--rootdir DIR", "copy files from DIR to the image root directory"),
> +#if EXPERIMENTAL
I assume you're doing EXPERIMENTAL because you want to un-gate it once you
remove all the restrictions? Thanks,
Josef
next prev parent reply other threads:[~2023-10-17 13:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 4:38 [PATCH 0/6] btrfs-progs: mkfs: introduce an experimental --subvol option Qu Wenruo
2023-10-16 4:38 ` [PATCH 1/6] btrfs-progs: enhance btrfs_mkdir() function Qu Wenruo
2023-10-16 4:38 ` [PATCH 2/6] btrfs-progs: enhance and rename btrfs_mksubvol() function Qu Wenruo
2023-10-16 4:38 ` [PATCH 3/6] btrfs-progs: enhance btrfs_create_root() function Qu Wenruo
2023-10-16 4:38 ` [PATCH 4/6] btrfs-progs: use a unified btrfs_make_subvol() implementation Qu Wenruo
2023-10-17 13:49 ` Josef Bacik
2023-10-17 20:14 ` Qu Wenruo
2023-10-17 23:11 ` David Sterba
2023-10-17 23:50 ` Qu Wenruo
2023-10-24 17:38 ` David Sterba
2023-10-24 20:44 ` Qu Wenruo
2023-10-25 16:18 ` David Sterba
2023-10-25 22:41 ` Qu Wenruo
2023-10-25 22:57 ` Neal Gompa
2023-10-16 4:38 ` [PATCH 5/6] btrfs-progs: mkfs: introduce experimental --subvol option Qu Wenruo
2023-10-17 13:54 ` Josef Bacik [this message]
2023-10-17 20:13 ` Qu Wenruo
2023-10-16 4:38 ` [PATCH 6/6] btrfs-progs: mkfs-tests: introduce a test case to verify " Qu Wenruo
2023-10-19 18:19 ` [PATCH 0/6] btrfs-progs: mkfs: introduce an experimental " Goffredo Baroncelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231017135430.GB2350212@perftesting \
--to=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.