diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-04-25 16:41:01 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-06 15:55:23 -0400 |
commit | 48a3b6366f6913683563d934eb16fea67dead9c1 (patch) | |
tree | eb26170d3a5ddb6f81ae612db21fb8fba14e655d /fs/btrfs/backref.c | |
parent | 634554dc0acfc8753c05e432b2fdb34b0be89c78 (diff) |
btrfs: make static code static & remove dead code
Big patch, but all it does is add statics to functions which
are in fact static, then remove the associated dead-code fallout.
removed functions:
btrfs_iref_to_path()
__btrfs_lookup_delayed_deletion_item()
__btrfs_search_delayed_insertion_item()
__btrfs_search_delayed_deletion_item()
find_eb_for_page()
btrfs_find_block_group()
range_straddles_pages()
extent_range_uptodate()
btrfs_file_extent_length()
btrfs_scrub_cancel_devid()
btrfs_start_transaction_lflush()
btrfs_print_tree() is left because it is used for debugging.
btrfs_start_transaction_lflush() and btrfs_reada_detach() are
left for symmetry.
ulist.c functions are left, another patch will take care of those.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 04b5b3093893..b4fb41558111 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -1189,6 +1189,20 @@ int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid, | |||
1189 | return ret; | 1189 | return ret; |
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | /* | ||
1193 | * this iterates to turn a name (from iref/extref) into a full filesystem path. | ||
1194 | * Elements of the path are separated by '/' and the path is guaranteed to be | ||
1195 | * 0-terminated. the path is only given within the current file system. | ||
1196 | * Therefore, it never starts with a '/'. the caller is responsible to provide | ||
1197 | * "size" bytes in "dest". the dest buffer will be filled backwards. finally, | ||
1198 | * the start point of the resulting string is returned. this pointer is within | ||
1199 | * dest, normally. | ||
1200 | * in case the path buffer would overflow, the pointer is decremented further | ||
1201 | * as if output was written to the buffer, though no more output is actually | ||
1202 | * generated. that way, the caller can determine how much space would be | ||
1203 | * required for the path to fit into the buffer. in that case, the returned | ||
1204 | * value will be smaller than dest. callers must check this! | ||
1205 | */ | ||
1192 | char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path, | 1206 | char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path, |
1193 | u32 name_len, unsigned long name_off, | 1207 | u32 name_len, unsigned long name_off, |
1194 | struct extent_buffer *eb_in, u64 parent, | 1208 | struct extent_buffer *eb_in, u64 parent, |
@@ -1258,32 +1272,6 @@ char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path, | |||
1258 | } | 1272 | } |
1259 | 1273 | ||
1260 | /* | 1274 | /* |
1261 | * this iterates to turn a btrfs_inode_ref into a full filesystem path. elements | ||
1262 | * of the path are separated by '/' and the path is guaranteed to be | ||
1263 | * 0-terminated. the path is only given within the current file system. | ||
1264 | * Therefore, it never starts with a '/'. the caller is responsible to provide | ||
1265 | * "size" bytes in "dest". the dest buffer will be filled backwards. finally, | ||
1266 | * the start point of the resulting string is returned. this pointer is within | ||
1267 | * dest, normally. | ||
1268 | * in case the path buffer would overflow, the pointer is decremented further | ||
1269 | * as if output was written to the buffer, though no more output is actually | ||
1270 | * generated. that way, the caller can determine how much space would be | ||
1271 | * required for the path to fit into the buffer. in that case, the returned | ||
1272 | * value will be smaller than dest. callers must check this! | ||
1273 | */ | ||
1274 | char *btrfs_iref_to_path(struct btrfs_root *fs_root, | ||
1275 | struct btrfs_path *path, | ||
1276 | struct btrfs_inode_ref *iref, | ||
1277 | struct extent_buffer *eb_in, u64 parent, | ||
1278 | char *dest, u32 size) | ||
1279 | { | ||
1280 | return btrfs_ref_to_path(fs_root, path, | ||
1281 | btrfs_inode_ref_name_len(eb_in, iref), | ||
1282 | (unsigned long)(iref + 1), | ||
1283 | eb_in, parent, dest, size); | ||
1284 | } | ||
1285 | |||
1286 | /* | ||
1287 | * this makes the path point to (logical EXTENT_ITEM *) | 1275 | * this makes the path point to (logical EXTENT_ITEM *) |
1288 | * returns BTRFS_EXTENT_FLAG_DATA for data, BTRFS_EXTENT_FLAG_TREE_BLOCK for | 1276 | * returns BTRFS_EXTENT_FLAG_DATA for data, BTRFS_EXTENT_FLAG_TREE_BLOCK for |
1289 | * tree blocks and <0 on error. | 1277 | * tree blocks and <0 on error. |