diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2012-10-15 04:30:45 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-25 15:45:16 -0400 |
commit | 96b5bd777118bb673b458b41bbefc7f0f31d65c9 (patch) | |
tree | bcb941e48650405cf61d7f152da9c102a5a07975 /fs/btrfs/backref.c | |
parent | 84167d190569eedcdb24bf2499bdda437e442962 (diff) |
Btrfs: extended inode refs support for send mechanism
This adds support for the new extended inode refs to btrfs send.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 2bcbea3f6308..b8b69266393a 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -1177,11 +1177,10 @@ int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid, | |||
1177 | return ret; | 1177 | return ret; |
1178 | } | 1178 | } |
1179 | 1179 | ||
1180 | static char *ref_to_path(struct btrfs_root *fs_root, | 1180 | char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path, |
1181 | struct btrfs_path *path, | 1181 | u32 name_len, unsigned long name_off, |
1182 | u32 name_len, unsigned long name_off, | 1182 | struct extent_buffer *eb_in, u64 parent, |
1183 | struct extent_buffer *eb_in, u64 parent, | 1183 | char *dest, u32 size) |
1184 | char *dest, u32 size) | ||
1185 | { | 1184 | { |
1186 | int slot; | 1185 | int slot; |
1187 | u64 next_inum; | 1186 | u64 next_inum; |
@@ -1266,10 +1265,10 @@ char *btrfs_iref_to_path(struct btrfs_root *fs_root, | |||
1266 | struct extent_buffer *eb_in, u64 parent, | 1265 | struct extent_buffer *eb_in, u64 parent, |
1267 | char *dest, u32 size) | 1266 | char *dest, u32 size) |
1268 | { | 1267 | { |
1269 | return ref_to_path(fs_root, path, | 1268 | return btrfs_ref_to_path(fs_root, path, |
1270 | btrfs_inode_ref_name_len(eb_in, iref), | 1269 | btrfs_inode_ref_name_len(eb_in, iref), |
1271 | (unsigned long)(iref + 1), | 1270 | (unsigned long)(iref + 1), |
1272 | eb_in, parent, dest, size); | 1271 | eb_in, parent, dest, size); |
1273 | } | 1272 | } |
1274 | 1273 | ||
1275 | /* | 1274 | /* |
@@ -1715,9 +1714,8 @@ static int inode_to_path(u64 inum, u32 name_len, unsigned long name_off, | |||
1715 | ipath->fspath->bytes_left - s_ptr : 0; | 1714 | ipath->fspath->bytes_left - s_ptr : 0; |
1716 | 1715 | ||
1717 | fspath_min = (char *)ipath->fspath->val + (i + 1) * s_ptr; | 1716 | fspath_min = (char *)ipath->fspath->val + (i + 1) * s_ptr; |
1718 | fspath = ref_to_path(ipath->fs_root, ipath->btrfs_path, name_len, | 1717 | fspath = btrfs_ref_to_path(ipath->fs_root, ipath->btrfs_path, name_len, |
1719 | name_off, eb, inum, fspath_min, | 1718 | name_off, eb, inum, fspath_min, bytes_left); |
1720 | bytes_left); | ||
1721 | if (IS_ERR(fspath)) | 1719 | if (IS_ERR(fspath)) |
1722 | return PTR_ERR(fspath); | 1720 | return PTR_ERR(fspath); |
1723 | 1721 | ||