From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs-progs: rework how we traverse rootdir
Date: Wed, 31 Jul 2024 19:08:45 +0930 [thread overview]
Message-ID: <cover.1722418505.git.wqu@suse.com> (raw)
Thanks to Mark's recent work, I finally get some time to rework rootdir
traversal.
All the problems are described inside the second patch.
While the last patch is a small enhancement to --rootdir to reject hard
links.
With this change, it's much easier to support subvolume creations at
mkfs time:
- Create a hashmap (or other similar structure) to record all the
directories that should be subvolume
- Call btrfs_make_subvoume() other than btrfs_insert_inode() if a path
should be a subvolume
- Call btrfs_link_subvolume() other than btrfs_add_link() for a
subvolume
Everything like parent directory inode size is properly handled by
btrfs_link_subvolume() and btrfs_add_link() already.
Qu Wenruo (3):
btrfs-progs: constify the name parameter of btrfs_add_link()
btrfs-progs: mkfs: rework how we traverse rootdir
btrfs-progs: rootdir: reject hard links
kernel-shared/ctree.h | 2 +-
kernel-shared/inode.c | 2 +-
mkfs/rootdir.c | 676 +++++++++++++++++-------------------------
mkfs/rootdir.h | 8 -
4 files changed, 271 insertions(+), 417 deletions(-)
--
2.45.2
next reply other threads:[~2024-07-31 9:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 9:38 Qu Wenruo [this message]
2024-07-31 9:38 ` [PATCH 1/3] btrfs-progs: constify the name parameter of btrfs_add_link() Qu Wenruo
2024-07-31 9:38 ` [PATCH 2/3] btrfs-progs: mkfs: rework how we traverse rootdir Qu Wenruo
2024-07-31 22:59 ` Boris Burkov
2024-07-31 23:19 ` Qu Wenruo
2024-07-31 23:42 ` Boris Burkov
2024-08-01 0:06 ` Qu Wenruo
2024-07-31 9:38 ` [PATCH 3/3] btrfs-progs: rootdir: reject hard links Qu Wenruo
2024-07-31 22:17 ` Boris Burkov
2024-07-31 22:55 ` Qu Wenruo
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=cover.1722418505.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/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.