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 
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
  btrfs-progs: check: lowmem: Refactor extent type checks in

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


Reply via email to