btrfs: relocation: Add introduction of how relocation works
authorQu Wenruo <wqu@suse.com>
Thu, 16 Jan 2020 05:04:07 +0000 (13:04 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:23 +0000 (17:01 +0100)
commit0c891389705698821ab59147bbcfffba22372a91
treee07c800cd37ca090877312a8c0253cbf7ca3cb6a
parent42836cf4ba9c9b1797d1f7fe3245d82cf6dea6c4
btrfs: relocation: Add introduction of how relocation works

Relocation is one of the most complex part of btrfs, while it's also the
foundation stone for online resizing, profile converting.

For such a complex facility, we should at least have some introduction
to it.

This patch will add an basic introduction at pretty a high level,
explaining:

- What relocation does
- How relocation is done
  Only mentioning how data reloc tree and reloc tree are involved in the
  operation.
  No details like the backref cache, or the data reloc tree contents.
- Which function to refer.

More detailed comments will be added for reloc tree creation, data reloc
tree creation and backref cache.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c