diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-09-01 14:43:09 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-09-01 14:43:09 -0400 |
commit | ed8a1a766af7371bfbe41857a3a11496b4165143 (patch) | |
tree | dd2812500ed9d6dc1a305b0b382d6bc25ff25733 /fs/ext4 | |
parent | 3bdf14b4d7a3a7416577e9f9f421dbf29b5b6747 (diff) |
ext4: rename ext4_ext_find_extent() to ext4_find_extent()
Make the function name less redundant.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ext4.h | 8 | ||||
-rw-r--r-- | fs/ext4/extents.c | 38 | ||||
-rw-r--r-- | fs/ext4/extents_status.c | 2 | ||||
-rw-r--r-- | fs/ext4/migrate.c | 3 | ||||
-rw-r--r-- | fs/ext4/move_extent.c | 4 |
5 files changed, 27 insertions, 28 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 4a5a6b95b2fa..c07f43f8eb93 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -573,7 +573,7 @@ enum { | |||
573 | 573 | ||
574 | /* | 574 | /* |
575 | * The bit position of these flags must not overlap with any of the | 575 | * The bit position of these flags must not overlap with any of the |
576 | * EXT4_GET_BLOCKS_*. They are used by ext4_ext_find_extent(), | 576 | * EXT4_GET_BLOCKS_*. They are used by ext4_find_extent(), |
577 | * read_extent_tree_block(), ext4_split_extent_at(), | 577 | * read_extent_tree_block(), ext4_split_extent_at(), |
578 | * ext4_ext_insert_extent(), and ext4_ext_create_new_leaf(). | 578 | * ext4_ext_insert_extent(), and ext4_ext_create_new_leaf(). |
579 | * EXT4_EX_NOCACHE is used to indicate that the we shouldn't be | 579 | * EXT4_EX_NOCACHE is used to indicate that the we shouldn't be |
@@ -2732,9 +2732,9 @@ extern int ext4_can_extents_be_merged(struct inode *inode, | |||
2732 | extern int ext4_ext_insert_extent(handle_t *, struct inode *, | 2732 | extern int ext4_ext_insert_extent(handle_t *, struct inode *, |
2733 | struct ext4_ext_path **, | 2733 | struct ext4_ext_path **, |
2734 | struct ext4_extent *, int); | 2734 | struct ext4_extent *, int); |
2735 | extern struct ext4_ext_path *ext4_ext_find_extent(struct inode *, ext4_lblk_t, | 2735 | extern struct ext4_ext_path *ext4_find_extent(struct inode *, ext4_lblk_t, |
2736 | struct ext4_ext_path **, | 2736 | struct ext4_ext_path **, |
2737 | int flags); | 2737 | int flags); |
2738 | extern void ext4_ext_drop_refs(struct ext4_ext_path *); | 2738 | extern void ext4_ext_drop_refs(struct ext4_ext_path *); |
2739 | extern int ext4_ext_check_inode(struct inode *inode); | 2739 | extern int ext4_ext_check_inode(struct inode *inode); |
2740 | extern int ext4_find_delalloc_range(struct inode *inode, | 2740 | extern int ext4_find_delalloc_range(struct inode *inode, |
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 22828e44a70d..3ac1686efff8 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -857,8 +857,8 @@ int ext4_ext_tree_init(handle_t *handle, struct inode *inode) | |||
857 | } | 857 | } |
858 | 858 | ||
859 | struct ext4_ext_path * | 859 | struct ext4_ext_path * |
860 | ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block, | 860 | ext4_find_extent(struct inode *inode, ext4_lblk_t block, |
861 | struct ext4_ext_path **orig_path, int flags) | 861 | struct ext4_ext_path **orig_path, int flags) |
862 | { | 862 | { |
863 | struct ext4_extent_header *eh; | 863 | struct ext4_extent_header *eh; |
864 | struct buffer_head *bh; | 864 | struct buffer_head *bh; |
@@ -1366,7 +1366,7 @@ repeat: | |||
1366 | goto out; | 1366 | goto out; |
1367 | 1367 | ||
1368 | /* refill path */ | 1368 | /* refill path */ |
1369 | path = ext4_ext_find_extent(inode, | 1369 | path = ext4_find_extent(inode, |
1370 | (ext4_lblk_t)le32_to_cpu(newext->ee_block), | 1370 | (ext4_lblk_t)le32_to_cpu(newext->ee_block), |
1371 | ppath, gb_flags); | 1371 | ppath, gb_flags); |
1372 | if (IS_ERR(path)) | 1372 | if (IS_ERR(path)) |
@@ -1378,7 +1378,7 @@ repeat: | |||
1378 | goto out; | 1378 | goto out; |
1379 | 1379 | ||
1380 | /* refill path */ | 1380 | /* refill path */ |
1381 | path = ext4_ext_find_extent(inode, | 1381 | path = ext4_find_extent(inode, |
1382 | (ext4_lblk_t)le32_to_cpu(newext->ee_block), | 1382 | (ext4_lblk_t)le32_to_cpu(newext->ee_block), |
1383 | ppath, gb_flags); | 1383 | ppath, gb_flags); |
1384 | if (IS_ERR(path)) { | 1384 | if (IS_ERR(path)) { |
@@ -1951,7 +1951,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode, | |||
1951 | /* | 1951 | /* |
1952 | * Try to see whether we should rather test the extent on | 1952 | * Try to see whether we should rather test the extent on |
1953 | * right from ex, or from the left of ex. This is because | 1953 | * right from ex, or from the left of ex. This is because |
1954 | * ext4_ext_find_extent() can return either extent on the | 1954 | * ext4_find_extent() can return either extent on the |
1955 | * left, or on the right from the searched position. This | 1955 | * left, or on the right from the searched position. This |
1956 | * will make merging more effective. | 1956 | * will make merging more effective. |
1957 | */ | 1957 | */ |
@@ -2034,7 +2034,7 @@ prepend: | |||
2034 | if (next != EXT_MAX_BLOCKS) { | 2034 | if (next != EXT_MAX_BLOCKS) { |
2035 | ext_debug("next leaf block - %u\n", next); | 2035 | ext_debug("next leaf block - %u\n", next); |
2036 | BUG_ON(npath != NULL); | 2036 | BUG_ON(npath != NULL); |
2037 | npath = ext4_ext_find_extent(inode, next, NULL, 0); | 2037 | npath = ext4_find_extent(inode, next, NULL, 0); |
2038 | if (IS_ERR(npath)) | 2038 | if (IS_ERR(npath)) |
2039 | return PTR_ERR(npath); | 2039 | return PTR_ERR(npath); |
2040 | BUG_ON(npath->p_depth != path->p_depth); | 2040 | BUG_ON(npath->p_depth != path->p_depth); |
@@ -2157,7 +2157,7 @@ static int ext4_fill_fiemap_extents(struct inode *inode, | |||
2157 | /* find extent for this block */ | 2157 | /* find extent for this block */ |
2158 | down_read(&EXT4_I(inode)->i_data_sem); | 2158 | down_read(&EXT4_I(inode)->i_data_sem); |
2159 | 2159 | ||
2160 | path = ext4_ext_find_extent(inode, block, &path, 0); | 2160 | path = ext4_find_extent(inode, block, &path, 0); |
2161 | if (IS_ERR(path)) { | 2161 | if (IS_ERR(path)) { |
2162 | up_read(&EXT4_I(inode)->i_data_sem); | 2162 | up_read(&EXT4_I(inode)->i_data_sem); |
2163 | err = PTR_ERR(path); | 2163 | err = PTR_ERR(path); |
@@ -2840,7 +2840,7 @@ again: | |||
2840 | ext4_lblk_t ee_block; | 2840 | ext4_lblk_t ee_block; |
2841 | 2841 | ||
2842 | /* find extent for this block */ | 2842 | /* find extent for this block */ |
2843 | path = ext4_ext_find_extent(inode, end, NULL, EXT4_EX_NOCACHE); | 2843 | path = ext4_find_extent(inode, end, NULL, EXT4_EX_NOCACHE); |
2844 | if (IS_ERR(path)) { | 2844 | if (IS_ERR(path)) { |
2845 | ext4_journal_stop(handle); | 2845 | ext4_journal_stop(handle); |
2846 | return PTR_ERR(path); | 2846 | return PTR_ERR(path); |
@@ -3314,7 +3314,7 @@ static int ext4_split_extent(handle_t *handle, | |||
3314 | * Update path is required because previous ext4_split_extent_at() may | 3314 | * Update path is required because previous ext4_split_extent_at() may |
3315 | * result in split of original leaf or extent zeroout. | 3315 | * result in split of original leaf or extent zeroout. |
3316 | */ | 3316 | */ |
3317 | path = ext4_ext_find_extent(inode, map->m_lblk, ppath, 0); | 3317 | path = ext4_find_extent(inode, map->m_lblk, ppath, 0); |
3318 | if (IS_ERR(path)) | 3318 | if (IS_ERR(path)) |
3319 | return PTR_ERR(path); | 3319 | return PTR_ERR(path); |
3320 | depth = ext_depth(inode); | 3320 | depth = ext_depth(inode); |
@@ -3712,7 +3712,7 @@ static int ext4_convert_unwritten_extents_endio(handle_t *handle, | |||
3712 | EXT4_GET_BLOCKS_CONVERT); | 3712 | EXT4_GET_BLOCKS_CONVERT); |
3713 | if (err < 0) | 3713 | if (err < 0) |
3714 | return err; | 3714 | return err; |
3715 | path = ext4_ext_find_extent(inode, map->m_lblk, ppath, 0); | 3715 | path = ext4_find_extent(inode, map->m_lblk, ppath, 0); |
3716 | if (IS_ERR(path)) | 3716 | if (IS_ERR(path)) |
3717 | return PTR_ERR(path); | 3717 | return PTR_ERR(path); |
3718 | depth = ext_depth(inode); | 3718 | depth = ext_depth(inode); |
@@ -3940,7 +3940,7 @@ convert_initialized_extent(handle_t *handle, struct inode *inode, | |||
3940 | EXT4_GET_BLOCKS_CONVERT_UNWRITTEN); | 3940 | EXT4_GET_BLOCKS_CONVERT_UNWRITTEN); |
3941 | if (err < 0) | 3941 | if (err < 0) |
3942 | return err; | 3942 | return err; |
3943 | path = ext4_ext_find_extent(inode, map->m_lblk, ppath, 0); | 3943 | path = ext4_find_extent(inode, map->m_lblk, ppath, 0); |
3944 | if (IS_ERR(path)) | 3944 | if (IS_ERR(path)) |
3945 | return PTR_ERR(path); | 3945 | return PTR_ERR(path); |
3946 | depth = ext_depth(inode); | 3946 | depth = ext_depth(inode); |
@@ -4266,7 +4266,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | |||
4266 | trace_ext4_ext_map_blocks_enter(inode, map->m_lblk, map->m_len, flags); | 4266 | trace_ext4_ext_map_blocks_enter(inode, map->m_lblk, map->m_len, flags); |
4267 | 4267 | ||
4268 | /* find extent for this block */ | 4268 | /* find extent for this block */ |
4269 | path = ext4_ext_find_extent(inode, map->m_lblk, NULL, 0); | 4269 | path = ext4_find_extent(inode, map->m_lblk, NULL, 0); |
4270 | if (IS_ERR(path)) { | 4270 | if (IS_ERR(path)) { |
4271 | err = PTR_ERR(path); | 4271 | err = PTR_ERR(path); |
4272 | path = NULL; | 4272 | path = NULL; |
@@ -4278,7 +4278,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | |||
4278 | /* | 4278 | /* |
4279 | * consistent leaf must not be empty; | 4279 | * consistent leaf must not be empty; |
4280 | * this situation is possible, though, _during_ tree modification; | 4280 | * this situation is possible, though, _during_ tree modification; |
4281 | * this is why assert can't be put in ext4_ext_find_extent() | 4281 | * this is why assert can't be put in ext4_find_extent() |
4282 | */ | 4282 | */ |
4283 | if (unlikely(path[depth].p_ext == NULL && depth != 0)) { | 4283 | if (unlikely(path[depth].p_ext == NULL && depth != 0)) { |
4284 | EXT4_ERROR_INODE(inode, "bad extent address " | 4284 | EXT4_ERROR_INODE(inode, "bad extent address " |
@@ -4363,7 +4363,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | |||
4363 | 4363 | ||
4364 | /* | 4364 | /* |
4365 | * If we are doing bigalloc, check to see if the extent returned | 4365 | * If we are doing bigalloc, check to see if the extent returned |
4366 | * by ext4_ext_find_extent() implies a cluster we can use. | 4366 | * by ext4_find_extent() implies a cluster we can use. |
4367 | */ | 4367 | */ |
4368 | if (cluster_offset && ex && | 4368 | if (cluster_offset && ex && |
4369 | get_implied_cluster_alloc(inode->i_sb, map, ex, path)) { | 4369 | get_implied_cluster_alloc(inode->i_sb, map, ex, path)) { |
@@ -5300,7 +5300,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle, | |||
5300 | ext4_lblk_t ex_start, ex_end; | 5300 | ext4_lblk_t ex_start, ex_end; |
5301 | 5301 | ||
5302 | /* Let path point to the last extent */ | 5302 | /* Let path point to the last extent */ |
5303 | path = ext4_ext_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, 0); | 5303 | path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, 0); |
5304 | if (IS_ERR(path)) | 5304 | if (IS_ERR(path)) |
5305 | return PTR_ERR(path); | 5305 | return PTR_ERR(path); |
5306 | 5306 | ||
@@ -5320,7 +5320,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle, | |||
5320 | * Don't start shifting extents until we make sure the hole is big | 5320 | * Don't start shifting extents until we make sure the hole is big |
5321 | * enough to accomodate the shift. | 5321 | * enough to accomodate the shift. |
5322 | */ | 5322 | */ |
5323 | path = ext4_ext_find_extent(inode, start - 1, &path, 0); | 5323 | path = ext4_find_extent(inode, start - 1, &path, 0); |
5324 | if (IS_ERR(path)) | 5324 | if (IS_ERR(path)) |
5325 | return PTR_ERR(path); | 5325 | return PTR_ERR(path); |
5326 | depth = path->p_depth; | 5326 | depth = path->p_depth; |
@@ -5340,7 +5340,7 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle, | |||
5340 | 5340 | ||
5341 | /* Its safe to start updating extents */ | 5341 | /* Its safe to start updating extents */ |
5342 | while (start < stop_block) { | 5342 | while (start < stop_block) { |
5343 | path = ext4_ext_find_extent(inode, start, &path, 0); | 5343 | path = ext4_find_extent(inode, start, &path, 0); |
5344 | if (IS_ERR(path)) | 5344 | if (IS_ERR(path)) |
5345 | return PTR_ERR(path); | 5345 | return PTR_ERR(path); |
5346 | depth = path->p_depth; | 5346 | depth = path->p_depth; |
@@ -5537,7 +5537,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1, | |||
5537 | int e1_len, e2_len, len; | 5537 | int e1_len, e2_len, len; |
5538 | int split = 0; | 5538 | int split = 0; |
5539 | 5539 | ||
5540 | path1 = ext4_ext_find_extent(inode1, lblk1, NULL, EXT4_EX_NOCACHE); | 5540 | path1 = ext4_find_extent(inode1, lblk1, NULL, EXT4_EX_NOCACHE); |
5541 | if (unlikely(IS_ERR(path1))) { | 5541 | if (unlikely(IS_ERR(path1))) { |
5542 | *erp = PTR_ERR(path1); | 5542 | *erp = PTR_ERR(path1); |
5543 | path1 = NULL; | 5543 | path1 = NULL; |
@@ -5545,7 +5545,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1, | |||
5545 | count = 0; | 5545 | count = 0; |
5546 | goto repeat; | 5546 | goto repeat; |
5547 | } | 5547 | } |
5548 | path2 = ext4_ext_find_extent(inode2, lblk2, NULL, EXT4_EX_NOCACHE); | 5548 | path2 = ext4_find_extent(inode2, lblk2, NULL, EXT4_EX_NOCACHE); |
5549 | if (unlikely(IS_ERR(path2))) { | 5549 | if (unlikely(IS_ERR(path2))) { |
5550 | *erp = PTR_ERR(path2); | 5550 | *erp = PTR_ERR(path2); |
5551 | path2 = NULL; | 5551 | path2 = NULL; |
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 8ffff966d594..bdd400c81533 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c | |||
@@ -426,7 +426,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode, | |||
426 | unsigned short ee_len; | 426 | unsigned short ee_len; |
427 | int depth, ee_status, es_status; | 427 | int depth, ee_status, es_status; |
428 | 428 | ||
429 | path = ext4_ext_find_extent(inode, es->es_lblk, NULL, EXT4_EX_NOCACHE); | 429 | path = ext4_find_extent(inode, es->es_lblk, NULL, EXT4_EX_NOCACHE); |
430 | if (IS_ERR(path)) | 430 | if (IS_ERR(path)) |
431 | return; | 431 | return; |
432 | 432 | ||
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 061c300703c7..a432634f2e6a 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
@@ -41,8 +41,7 @@ static int finish_range(handle_t *handle, struct inode *inode, | |||
41 | ext4_ext_store_pblock(&newext, lb->first_pblock); | 41 | ext4_ext_store_pblock(&newext, lb->first_pblock); |
42 | /* Locking only for convinience since we are operating on temp inode */ | 42 | /* Locking only for convinience since we are operating on temp inode */ |
43 | down_write(&EXT4_I(inode)->i_data_sem); | 43 | down_write(&EXT4_I(inode)->i_data_sem); |
44 | path = ext4_ext_find_extent(inode, lb->first_block, NULL, 0); | 44 | path = ext4_find_extent(inode, lb->first_block, NULL, 0); |
45 | |||
46 | if (IS_ERR(path)) { | 45 | if (IS_ERR(path)) { |
47 | retval = PTR_ERR(path); | 46 | retval = PTR_ERR(path); |
48 | path = NULL; | 47 | path = NULL; |
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 7bf970dd61f5..5d7806390102 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -27,7 +27,7 @@ | |||
27 | * @lblock: logical block number to find an extent path | 27 | * @lblock: logical block number to find an extent path |
28 | * @path: pointer to an extent path pointer (for output) | 28 | * @path: pointer to an extent path pointer (for output) |
29 | * | 29 | * |
30 | * ext4_ext_find_extent wrapper. Return 0 on success, or a negative error value | 30 | * ext4_find_extent wrapper. Return 0 on success, or a negative error value |
31 | * on failure. | 31 | * on failure. |
32 | */ | 32 | */ |
33 | static inline int | 33 | static inline int |
@@ -36,7 +36,7 @@ get_ext_path(struct inode *inode, ext4_lblk_t lblock, | |||
36 | { | 36 | { |
37 | struct ext4_ext_path *path; | 37 | struct ext4_ext_path *path; |
38 | 38 | ||
39 | path = ext4_ext_find_extent(inode, lblock, ppath, EXT4_EX_NOCACHE); | 39 | path = ext4_find_extent(inode, lblock, ppath, EXT4_EX_NOCACHE); |
40 | if (IS_ERR(path)) | 40 | if (IS_ERR(path)) |
41 | return PTR_ERR(path); | 41 | return PTR_ERR(path); |
42 | if (path[ext_depth(inode)].p_ext == NULL) { | 42 | if (path[ext_depth(inode)].p_ext == NULL) { |