summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.h
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2011-11-23 18:55:04 +0100
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-01-04 16:26:38 +0100
commit8da6d5815c592b713ecaf4f4f8b631f8359c96c4 (patch)
tree1dac6f55dd37193eee821b9d29ff59ee61edb853 /fs/btrfs/backref.h
parenta168650c08300434e1456abe7b6451f1448230d3 (diff)
downloadop-kernel-dev-8da6d5815c592b713ecaf4f4f8b631f8359c96c4.zip
op-kernel-dev-8da6d5815c592b713ecaf4f4f8b631f8359c96c4.tar.gz
Btrfs: added btrfs_find_all_roots()
This function gets a byte number (a data extent), collects all the leafs pointing to it and walks up the trees to find all fs roots pointing to those leafs. It also returns the list of all leafs pointing to that extent. It does proper locking for the involved trees, can be used on busy file systems and honors delayed refs. Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs/backref.h')
-rw-r--r--fs/btrfs/backref.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h
index 9261883..d00dfa9 100644
--- a/fs/btrfs/backref.h
+++ b/fs/btrfs/backref.h
@@ -20,6 +20,7 @@
#define __BTRFS_BACKREF__
#include "ioctl.h"
+#include "ulist.h"
struct inode_fs_paths {
struct btrfs_path *btrfs_path;
@@ -54,6 +55,10 @@ int iterate_inodes_from_logical(u64 logical, struct btrfs_fs_info *fs_info,
int paths_from_inode(u64 inum, struct inode_fs_paths *ipath);
+int btrfs_find_all_roots(struct btrfs_trans_handle *trans,
+ struct btrfs_fs_info *fs_info, u64 bytenr,
+ u64 num_bytes, u64 seq, struct ulist **roots);
+
struct btrfs_data_container *init_data_container(u32 total_bytes);
struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root,
struct btrfs_path *path);
OpenPOWER on IntegriCloud