Skip to content

Misc cleanups of btrfs_get_extent

Nikolay Borisov linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4btrfs: Rename found_type to extent_typefs/btrfs/inode.c+9 -112 replies
2/4btrfs: Consolidate retval checking of core btree functionsfs/btrfs/inode.c+2 -56 replies
3/4btrfs: Refactor retval handling of btrfs_lookup_file_extent in btrfs_get_extentfs/btrfs/inode.c+20 -166 replies
4/4btrfs: Remove not_found_em label from btrfs_get_extentfs/btrfs/inode.c+4 -21 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchJohannes ThumshirnQu Wenruo
1/4R-b R-b
2/4R-b R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Misc cleanups of btrfs_get_extent

Here is a series that hopefully makes the code a bit more obvious. First patch gives a variable a more appropraite name, since it's going to be used only for holding an extent type and not the type of a found item.

Patch 2 simply consolidated separate 'if' statements that check the retval of the same function into a single 'if() {} else if () {}' statement. IMO this is cleaner.

Patch 3 massages the abhorrent code that deals with btrfs_lookup_file_extent retval. It groups everything in a coherent 'if() {} else if () {} else {}' construct and now it's obvious under what conditions specific code is executed.

Finally, Patch 4 removes the not_found_em labelin the same function.

Nikolay Borisov (4):
btrfs: Rename found_type to extent_type
btrfs: Consolidate retval checking of core btree functions
btrfs: Refactor retval handling of btrfs_lookup_file_extent in
btrfs_get_extent
btrfs: Remove not_found_em label from btrfs_get_extent

 fs/btrfs/inode.c | 67 ++++++++++++++++++++++++------------------------
 1 file changed, 34 insertions(+), 33 deletions(-)
Signature · 1 line
2.17.1