btrfs: rename BTRFS_ROOT_REF_COWS to BTRFS_ROOT_SHAREABLE
authorQu Wenruo <wqu@suse.com>
Fri, 15 May 2020 06:01:40 +0000 (14:01 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:35 +0000 (11:25 +0200)
commit92a7cc4252231d1641b36c38cf845cfc50308ab0
tree9dcd3b8ba373c5c064563bfd8ce4be772901d5e3
parentae3e715f85fff878b317369b898cf4b89785c80a
btrfs: rename BTRFS_ROOT_REF_COWS to BTRFS_ROOT_SHAREABLE

The name BTRFS_ROOT_REF_COWS is not very clear about the meaning.

In fact, that bit can only be set to those trees:

- Subvolume roots
- Data reloc root
- Reloc roots for above roots

All other trees won't get this bit set.  So just by the result, it is
obvious that, roots with this bit set can have tree blocks shared with
other trees.  Either shared by snapshots, or by reloc roots (an special
snapshot created by relocation).

This patch will rename BTRFS_ROOT_REF_COWS to BTRFS_ROOT_SHAREABLE to
make it easier to understand, and update all comment mentioning
"reference counted" to follow the rename.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
13 files changed:
fs/btrfs/backref.c
fs/btrfs/backref.h
fs/btrfs/block-rsv.c
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/relocation.c
fs/btrfs/transaction.c
fs/btrfs/tree-defrag.c