fs: btrfs: Crossport volumes.[ch] from btrfs-progs
authorQu Wenruo <wqu@suse.com>
Wed, 24 Jun 2020 16:02:54 +0000 (18:02 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 8 Sep 2020 00:57:27 +0000 (20:57 -0400)
commitb1f0067aba5cc51540922e4187d5e8c8f77b1431
treed4bef60a6c05a261e47dc38cca7bb6f74790f465
parentbe3594254605047d0623f905329d160544ca925c
fs: btrfs: Crossport volumes.[ch] from btrfs-progs

This patch crossports volumes.[ch] from btrfs-progs, including:
- btrfs_map_block()
  The core mechanism to map btrfs logical address to physical address.
  This version includes multi-device support, along with RAID56 support.

- btrfs_scan_one_device()
  This is the function to register one btrfs device to the list.
  This is the main part of the multi-device btrfs assembling process.
  Although we're not going to support multiple devices until U-Boot
  allows us to scan one device without actually opening it.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
[trini: Use %zu in a debug print to avoid warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
fs/btrfs/Makefile
fs/btrfs/compat.h
fs/btrfs/ctree.h
fs/btrfs/volumes.c [new file with mode: 0644]
fs/btrfs/volumes.h [new file with mode: 0644]