All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] btrfs-progs: make sure "mkfs --rootdir" copies all the attributes for the rootdir
@ 2023-10-11 20:49 Qu Wenruo
  2023-10-11 20:49 ` [PATCH v3 1/2] btrfs-progs: mkfs/rootdir: copy missing attributes for the rootdir inode Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Qu Wenruo @ 2023-10-11 20:49 UTC (permalink / raw)
  To: linux-btrfs

[CHANGELOG]
v3:
- Use 'stat()' instead pf 'lstate()' for the rootdir
  This would follow a softlink for the rootdir.

v2:
- Add more attributes to be copied for rootdir, including:
  * mode
  * uid
  * gid
  * timestamps

- Update the test case
  * Use two loopback devices
    One to store the source directory, so that we're ensured to have
    xattr support.
  * Add checks for all the uid/gid/mode attributes

We got a bug report that "mkfs.btrfs --rootdir" copies all the xattr but
the xattr of the source directory.

It turns out that we only do the regular xattr/gid/uid/mode/timestamps
copy for all the child inodes, not the source directory itself.

Fix it and create a test case for it.

Qu Wenruo (2):
  btrfs-progs: mkfs/rootdir: copy missing attributes for the rootdir
    inode
  btrfs-progs: tests/mkfs: make sure rootdir inode got its attributes
    copied

 mkfs/rootdir.c                             | 88 ++++++++++++++++------
 tests/mkfs-tests/027-rootdir-inode/test.sh | 60 +++++++++++++++
 2 files changed, 127 insertions(+), 21 deletions(-)
 create mode 100755 tests/mkfs-tests/027-rootdir-inode/test.sh

--
2.42.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-17 17:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 20:49 [PATCH v3 0/2] btrfs-progs: make sure "mkfs --rootdir" copies all the attributes for the rootdir Qu Wenruo
2023-10-11 20:49 ` [PATCH v3 1/2] btrfs-progs: mkfs/rootdir: copy missing attributes for the rootdir inode Qu Wenruo
2023-10-13 15:55   ` David Sterba
2023-10-13 19:55     ` Qu Wenruo
2023-10-17 17:23       ` David Sterba
2023-10-13 16:13   ` David Sterba
2023-10-11 20:49 ` [PATCH v3 2/2] btrfs-progs: tests/mkfs: make sure rootdir inode got its attributes copied Qu Wenruo
2023-10-13 16:21 ` [PATCH v3 0/2] btrfs-progs: make sure "mkfs --rootdir" copies all the attributes for the rootdir David Sterba

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.