mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
btrfs-tree: drop BtrfsFsTreeFetcher and clean up class comments
BtrfsFsTreeFetcher was used for early versions of the extent scanner, but neither subvol nor extent scan now needs an object that is both persistent and configured to access only one subvol. BtrfsExtentDataFetcher does the same thing in that case. Clarify the comments on what the remaining classes do, so that BtrfsFsTreeFetcher doesn't get inadvertently reinvented in the future. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
f9a697518d
commit
75040789c6
@ -173,30 +173,27 @@ namespace crucible {
|
|||||||
void get_sums(uint64_t logical, size_t count, function<void(uint64_t logical, const uint8_t *buf, size_t count)> output);
|
void get_sums(uint64_t logical, size_t count, function<void(uint64_t logical, const uint8_t *buf, size_t count)> output);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Fetch extent items from extent tree
|
/// Fetch extent items from extent tree.
|
||||||
|
/// Does not filter out metadata! See BtrfsDataExtentTreeFetcher for that.
|
||||||
class BtrfsExtentItemFetcher : public BtrfsTreeObjectFetcher {
|
class BtrfsExtentItemFetcher : public BtrfsTreeObjectFetcher {
|
||||||
public:
|
public:
|
||||||
BtrfsExtentItemFetcher(const Fd &fd);
|
BtrfsExtentItemFetcher(const Fd &fd);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Fetch extent refs from an inode
|
/// Fetch extent refs from an inode. Caller must set the tree and objectid.
|
||||||
class BtrfsExtentDataFetcher : public BtrfsTreeOffsetFetcher {
|
class BtrfsExtentDataFetcher : public BtrfsTreeOffsetFetcher {
|
||||||
public:
|
public:
|
||||||
BtrfsExtentDataFetcher(const Fd &fd);
|
BtrfsExtentDataFetcher(const Fd &fd);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Fetch inodes from a subvol
|
/// Fetch raw inode items
|
||||||
class BtrfsFsTreeFetcher : public BtrfsTreeObjectFetcher {
|
|
||||||
public:
|
|
||||||
BtrfsFsTreeFetcher(const Fd &fd, uint64_t subvol);
|
|
||||||
};
|
|
||||||
|
|
||||||
class BtrfsInodeFetcher : public BtrfsTreeObjectFetcher {
|
class BtrfsInodeFetcher : public BtrfsTreeObjectFetcher {
|
||||||
public:
|
public:
|
||||||
BtrfsInodeFetcher(const Fd &fd);
|
BtrfsInodeFetcher(const Fd &fd);
|
||||||
BtrfsTreeItem stat(uint64_t subvol, uint64_t inode);
|
BtrfsTreeItem stat(uint64_t subvol, uint64_t inode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Fetch a root (subvol) item
|
||||||
class BtrfsRootFetcher : public BtrfsTreeObjectFetcher {
|
class BtrfsRootFetcher : public BtrfsTreeObjectFetcher {
|
||||||
public:
|
public:
|
||||||
BtrfsRootFetcher(const Fd &fd);
|
BtrfsRootFetcher(const Fd &fd);
|
||||||
|
@ -662,14 +662,6 @@ namespace crucible {
|
|||||||
type(BTRFS_EXTENT_DATA_KEY);
|
type(BTRFS_EXTENT_DATA_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
BtrfsFsTreeFetcher::BtrfsFsTreeFetcher(const Fd &new_fd, uint64_t subvol) :
|
|
||||||
BtrfsTreeObjectFetcher(new_fd)
|
|
||||||
{
|
|
||||||
tree(subvol);
|
|
||||||
type(BTRFS_EXTENT_DATA_KEY);
|
|
||||||
scale_size(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
BtrfsInodeFetcher::BtrfsInodeFetcher(const Fd &fd) :
|
BtrfsInodeFetcher::BtrfsInodeFetcher(const Fd &fd) :
|
||||||
BtrfsTreeObjectFetcher(fd)
|
BtrfsTreeObjectFetcher(fd)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user