btrfs-progs/Documentation
Qu Wenruo e2cfded96e btrfs-progs: mkfs: add hard link support for --rootdir
The new hard link detection and creation support is done by maintaining
an rb tree with the following members:

- st_ino, st_dev
  This is to record the stat() report from the host fs.
  With this two, we can detect if it's really a hard link (st_dev
  determines one filesystem/subvolume, and st_ino determines the inode
  number inside the fs).

- root
  This is btrfs root pointer. This a special requirement for the recent
  introduced "--subvol" option.

  As we can have the following corner case:

  rootdir/
  |- foobar_hardlink1
  |- foobar_hardlink2
  |- subv/		<- To be a subvolume inside btrfs
     |- foobar_hardlink3

  In above case, on the host fs, `subv/` directory is just a regular
  directory, but in the new btrfs it will be a subvolume.

  In that case, `foobar_hardlink3` cannot be created as a hard link,
  but a new inode.

- st_nlink and found_nlink
  Records the original reported number of links, and the nlinks we
  created inside btrfs.
  This is recorded in case we created all hard links and can remove
  the entry early.

- btrfs_ino
  This is the inode number inside btrfs.

And since we can handle hard links safely, remove all the related
warnings, and add a new note for `--subvol` option, warning about the
case where we need to split hard links due to subvolume boundary.

Pull-request: #873
Signed-off-by: Qu Wenruo <wqu@suse.com>
2024-11-08 17:00:15 +01:00
..
_static btrfs-progs: docs: restyle the landing page 2023-12-01 00:54:27 +01:00
_templates
dev btrfs-progs: docs: add path-utils.h API docs 2024-09-17 16:47:42 +02:00
Administration.rst btrfs-progs: docs: include sysfs to Administration 2024-07-30 20:05:11 +02:00
Auto-repair.rst
Balance.rst
CHANGES.rst
Checksumming.rst
CmdLineConventions
CodingConventions
Common-features.rst btrfs-progs: docs: cross references, ioctl updates 2023-12-06 17:44:28 +01:00
Compression.rst
Contributors.rst btrfs-progs: docs: add 6.11 kernel development statistics 2024-09-17 16:19:03 +02:00
Convert.rst
Custom-ioctls.rst btrfs-progs: run codespell throughout fixing typos automagically 2024-07-30 19:56:08 +02:00
Deduplication.rst
Defragmentation.rst
DocConventions.rst btrfs-progs: run codespell throughout fixing typos automagically 2024-07-30 19:56:08 +02:00
Feature-by-version.rst btrfs-progs: run codespell throughout fixing typos automagically 2024-07-30 19:56:08 +02:00
Glossary.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
Hardware.rst
INSTALL.rst
Inline-files.rst btrfs-progs: docs: inline files vs tail packing 2024-09-17 16:47:42 +02:00
Interoperability.rst btrfs-progs: docs: list supported fs-verity ioctls 2024-07-30 20:05:11 +02:00
Introduction.rst btrfs-progs: docs: cross references, ioctl updates 2023-12-06 17:44:28 +01:00
Kernel-by-version.rst btrfs-progs: docs: add heading for 6.11 2024-09-17 16:19:03 +02:00
Makefile.in btrfs-progs: install btrfs-ioctl manual page 2024-09-17 14:33:22 +02:00
Qgroups.rst
Quick-start.rst btrfs-progs: docs: updates 2023-08-28 17:24:25 +02:00
Reflink.rst
Resize.rst
Scrub.rst
Seeding-device.rst
Send-receive.rst btrfs-progs: docs: clarify btrfs-send checksum 2024-08-14 23:59:47 +02:00
Source-repositories.rst btrfs-progs: docs: update source repositories, workflows 2024-07-30 20:05:11 +02:00
Status.rst btrfs-progs: docs: update feature status 2024-09-17 16:19:03 +02:00
Subpage.rst btrfs-progs: docs: mkfs and sectorsize updates 2024-01-18 02:44:58 +01:00
Subvolumes.rst
Swapfile.rst
Tree-checker.rst btrfs-progs: docs: fix sphinx code-block warnings 2024-01-10 22:49:06 +01:00
Trim.rst btrfs-progs: docs: updates 2023-08-28 17:24:25 +02:00
Volume-management.rst
Zoned-mode.rst
btrfs-balance.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
btrfs-check.rst btrfs-progs: check: remove --clear-ino-cache option 2024-05-02 14:02:50 +02:00
btrfs-convert.rst
btrfs-device.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
btrfs-filesystem.rst btrfs-progs: fi resize: warn if new size is < 256M 2024-09-17 16:19:03 +02:00
btrfs-find-root.rst
btrfs-image.rst btrfs-progs: docs: add warning for -s option of btrfs-image 2024-07-30 19:56:41 +02:00
btrfs-inspect-internal.rst btrfs-progs: list-chunks: update help and documentation 2024-07-30 19:53:33 +02:00
btrfs-ioctl.rst btrfs-progs: docs: add new encoded rw ioctls to the list 2024-07-30 20:05:11 +02:00
btrfs-man5.rst btrfs-progs: install btrfs-ioctl manual page 2024-09-17 14:33:22 +02:00
btrfs-map-logical.rst
btrfs-property.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
btrfs-qgroup.rst btrfs-progs: clarify unlinked and deleted terminology for subvolumes 2024-05-17 18:13:18 +02:00
btrfs-quota.rst btrfs-progs: docs: document squota 2023-10-03 01:11:54 +02:00
btrfs-receive.rst btrfs-progs: docs: clarify receive --dump encoding 2024-06-24 19:19:04 +02:00
btrfs-replace.rst
btrfs-rescue.rst btrfs-progs: check: remove inode cache clearing functionality 2023-12-05 17:57:04 +01:00
btrfs-restore.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
btrfs-scrub.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
btrfs-select-super.rst
btrfs-send.rst
btrfs-subvolume.rst btrfs-progs: subvolume delete: add new option for recursive deletion 2024-11-08 17:00:02 +01:00
btrfs.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
btrfsck.8
btrfstune.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
ch-balance-examples.rst
ch-balance-filters.rst
ch-balance-intro.rst
ch-bootloaders.rst
ch-checksumming.rst btrfs-progs: docs: recalculate checksumming performance 2024-02-13 07:15:31 +01:00
ch-compression.rst btrfs-progs: docs: fix incorrect description about compression with O_DIRECT 2024-03-25 22:57:50 +01:00
ch-convert-intro.rst btrfs-progs: docs: clarify potential problems with convert 2024-02-20 10:52:08 +01:00
ch-file-attributes.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
ch-flexibility.rst
ch-fs-limits.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
ch-hardware-considerations.rst btrfs-progs: docs: update memory related problems 2024-03-25 23:33:25 +01:00
ch-mount-options.rst btrfs-progs: docs: update the rescue mount options 2024-06-24 19:20:18 +02:00
ch-quota-intro.rst btrfs-progs: docs: document squota 2023-10-03 01:11:54 +02:00
ch-scrub-intro.rst btrfs-progs: docs: correct systemd-run argument for limiting bandwith 2024-03-06 20:57:09 +01:00
ch-seeding-device.rst
ch-subvolume-intro.rst btrfs-progs: docs: fix new typos 2024-08-14 23:58:14 +02:00
ch-swapfile.rst btrfs-progs: docs: clarify swapfile an multi-device filesystem 2024-07-30 20:05:11 +02:00
ch-sysfs.rst btrfs-progs: docs: fix new typos 2024-08-14 23:58:14 +02:00
ch-volume-management-intro.rst btrfs-progs: docs: fix warnings and links to duplicated labels 2024-02-13 18:24:19 +01:00
ch-zoned-intro.rst btrfs-progs: docs: add zone reclaim 2024-07-30 20:05:11 +02:00
conf.py btrfs-progs: install btrfs-ioctl manual page 2024-09-17 14:33:22 +02:00
fsck.btrfs.rst btrfs-progs: docs: use manref role for all manual page references 2024-02-16 09:38:16 +01:00
html-preview.sh btrfs-progs: ci: build html manual page previews if source changed 2024-07-30 19:53:32 +02:00
index.rst btrfs-progs: docs: move Interoperability to the first section 2024-07-30 20:05:11 +02:00
man-index.rst btrfs-progs: install btrfs-ioctl manual page 2024-09-17 14:33:22 +02:00
man-preview.sh btrfs-progs: run codespell throughout fixing typos automagically 2024-07-30 19:56:08 +02:00
mkfs.btrfs.rst btrfs-progs: mkfs: add hard link support for --rootdir 2024-11-08 17:00:15 +01:00
plot-contribs.svg btrfs-progs: docs: update 6.10 contribution graphs 2024-07-30 19:53:33 +02:00
plot-patches.svg btrfs-progs: docs: update 6.10 contribution graphs 2024-07-30 19:53:33 +02:00
plot-sloc-lines.svg btrfs-progs: docs: update 6.10 contribution graphs 2024-07-30 19:53:33 +02:00
requirements.txt btrfs-progs: docs: add config file for readthedocs.io 2023-12-05 16:36:24 +01:00
trouble-index.rst btrfs-progs: docs: fix sphinx code-block warnings 2024-01-10 22:49:06 +01:00