mbox series

[RESEND,0/4] Cleanups around compress path

Message ID 20190213155529.31500-1-nborisov@suse.com (mailing list archive)
Headers show
Series Cleanups around compress path | expand

Message

Nikolay Borisov Feb. 13, 2019, 3:55 p.m. UTC
This series aims to streamline the logic in cow_file_range_async which is 
invoked if extents have to be compressed. The main change is that the logic of 
the loop in the function is now centered around the idea of chunks (in case 
compression is enabled). So it's obvious that we will submit as many chunks as 
necessary. The 2nd improvement is to eliminate the BUG_ON that is dependent on the 
return value of kmalloc. Now, an array of struct async_cow is allocated, preceded 
by an atomic_t, shared by all chunks. This allows to bail out before submitting 
any io whatsoever and mark the page as errored out. 

Rest of the patches are pure quality-of-live improvements - simplifying function
signature, removing unused code/redundant data members. 
 
Needless to say this has survived full xfstest run. 

Nikolay Borisov (4):
  btrfs: Refactor cow_file_range_async
  btrfs: Remove fs_info from struct async_cow
  btrfs: Make compress_file_range only struct async_cow
  btrfs: Replace clear_extent_bit with unlock_extent

 fs/btrfs/inode.c | 105 +++++++++++++++++++++++++++--------------------
 1 file changed, 60 insertions(+), 45 deletions(-)