linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Misc cleanups of btrfs_get_extent
@ 2018-12-17  8:35 Nikolay Borisov
  2018-12-17  8:35 ` [PATCH 1/4] btrfs: Rename found_type to extent_type Nikolay Borisov
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Nikolay Borisov @ 2018-12-17  8:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

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(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-01-08  7:44 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17  8:35 [PATCH 0/4] Misc cleanups of btrfs_get_extent Nikolay Borisov
2018-12-17  8:35 ` [PATCH 1/4] btrfs: Rename found_type to extent_type Nikolay Borisov
2018-12-17  8:54   ` Johannes Thumshirn
2018-12-17  9:05   ` Qu Wenruo
2018-12-17  8:36 ` [PATCH 2/4] btrfs: Consolidate retval checking of core btree functions Nikolay Borisov
2018-12-17  8:55   ` Johannes Thumshirn
2018-12-17  8:57     ` Nikolay Borisov
2018-12-17  9:09   ` Qu Wenruo
2018-12-17  9:23     ` Nikolay Borisov
2018-12-17  9:49   ` [PATCH v2 " Nikolay Borisov
2018-12-17 11:00     ` Qu Wenruo
2018-12-17  8:36 ` [PATCH 3/4] btrfs: Refactor retval handling of btrfs_lookup_file_extent in btrfs_get_extent Nikolay Borisov
2018-12-17  9:07   ` Johannes Thumshirn
2019-01-02 17:05   ` David Sterba
2019-01-02 17:43     ` Nikolay Borisov
2019-01-07 15:22       ` Johannes Thumshirn
2019-01-07 18:46         ` David Sterba
2019-01-08  7:43           ` Nikolay Borisov
2018-12-17  8:36 ` [PATCH 4/4] btrfs: Remove not_found_em label from btrfs_get_extent Nikolay Borisov
2018-12-17  9:08   ` Johannes Thumshirn
2019-01-02 17:08 ` [PATCH 0/4] Misc cleanups of btrfs_get_extent David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).