mbox series

[v2,0/2] btrfs-progs: mkfs/rootdir: add hard link support

Message ID cover.1724125282.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: mkfs/rootdir: add hard link support | expand

Message

Qu Wenruo Aug. 20, 2024, 3:45 a.m. UTC
[Changelog]
v2:
- Fix several grammar errors and change "can not" to more formal
  "cannot"
- Initialize the temporary hardlink_entry structure as const
- Double quote the $nr_hardlink used in test case

With the recently reworked --rootdir support, although it solves several
hard link related problems, it splits the hard links into new inodes.

And on each split, it shows a warning on each file with hardlinks.

Although the split behavior doesn't cause any data corruption, it can
still be pretty noisy for rootfs creation, as there are a lot of distros
storing timezone files as hardlinks.

This patchset adds back the hard link detection and creation, with
enhanced handling to co-operate with --subvol option.

The details can be found in the first patch, with the new corner case
introduced by --subvol option.

The second patch enhances the existing --rootdir and --subvol test case
with extra corner cases like hard links, and hard links split by
subvolume boundary.

Qu Wenruo (2):
  btrfs-progs: mkfs/rootdir: add hard link support
  btrfs-progs: mkfs-tests: add hardlink related tests for --subvol

 Documentation/mkfs.btrfs.rst                |  13 ++
 mkfs/rootdir.c                              | 199 +++++++++++++++++---
 tests/mkfs-tests/036-rootdir-subvol/test.sh |  78 ++++++--
 3 files changed, 247 insertions(+), 43 deletions(-)

--
2.46.0