mbox series

[0/3] Misc refactoring of check_file_extent

Message ID 20180913120507.18197-1-nborisov@suse.com (mailing list archive)
Headers show
Series Misc refactoring of check_file_extent | expand

Message

Nikolay Borisov Sept. 13, 2018, 12:05 p.m. UTC
While looking at check_file_extent I thought that the code might be a bit 
cleaner than it actually is and cleaner as well. The first patch factors out 
the code dealing with inline extents into a separate function aptly named 
check_file_extent_inline. This allows to remove some inline-specific variable 
from check_file_extent. Patch 2 just moves the final check in the new function 
into the already existing branch handling the !compressed case. Finally 
the check which detects unknown extent types is moved first in check_file_extent, 
followed by the code to handle inline extents and finally the existing code to 
handle regular/prealloc extents is left intact. 

This patchset brings no functional changes. 

Nikolay Borisov (3):
  btrfs-progs: check: lowmem: Factor out inline extent checking code in
    its own function
  btrfs-progs: check: lowmem: Refactor extent len test in
    check_file_extent_inline
  btrfs-progs: check: lowmem: Refactor extent type checks in
    check_file_extent

 check/mode-lowmem.c | 151 ++++++++++++++++++++++++++------------------
 1 file changed, 89 insertions(+), 62 deletions(-)

Comments

Lu Fengqi Sept. 13, 2018, 12:23 p.m. UTC | #1
On Thu, Sep 13, 2018 at 03:05:04PM +0300, Nikolay Borisov wrote:
>While looking at check_file_extent I thought that the code might be a bit 
>cleaner than it actually is and cleaner as well. The first patch factors out 
>the code dealing with inline extents into a separate function aptly named 
>check_file_extent_inline. This allows to remove some inline-specific variable 
>from check_file_extent. Patch 2 just moves the final check in the new function 
>into the already existing branch handling the !compressed case. Finally 
>the check which detects unknown extent types is moved first in check_file_extent, 
>followed by the code to handle inline extents and finally the existing code to 
>handle regular/prealloc extents is left intact. 
>
>This patchset brings no functional changes. 

For the series,

Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
David Sterba Oct. 24, 2018, 5:45 p.m. UTC | #2
On Thu, Sep 13, 2018 at 03:05:04PM +0300, Nikolay Borisov wrote:
> While looking at check_file_extent I thought that the code might be a bit 
> cleaner than it actually is and cleaner as well. The first patch factors out 
> the code dealing with inline extents into a separate function aptly named 
> check_file_extent_inline. This allows to remove some inline-specific variable 
> from check_file_extent. Patch 2 just moves the final check in the new function 
> into the already existing branch handling the !compressed case. Finally 
> the check which detects unknown extent types is moved first in check_file_extent, 
> followed by the code to handle inline extents and finally the existing code to 
> handle regular/prealloc extents is left intact. 
> 
> This patchset brings no functional changes. 
> 
> Nikolay Borisov (3):
>   btrfs-progs: check: lowmem: Factor out inline extent checking code in
>     its own function
>   btrfs-progs: check: lowmem: Refactor extent len test in
>     check_file_extent_inline
>   btrfs-progs: check: lowmem: Refactor extent type checks in
>     check_file_extent

Applied, thanks.