linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Cleanups around compress path
@ 2019-02-13 15:53 Nikolay Borisov
  2019-02-13 15:53 ` [PATCH 1/4] btrfs: Refactor cow_file_range_async Nikolay Borisov
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Nikolay Borisov @ 2019-02-13 15:53 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

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

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [RESEND PATCH 0/4] Cleanups around compress path
@ 2019-02-13 15:55 Nikolay Borisov
  2019-02-13 15:55 ` [PATCH 4/4] btrfs: Replace clear_extent_bit with unlock_extent Nikolay Borisov
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolay Borisov @ 2019-02-13 15:55 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

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

-- 
2.17.1


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

end of thread, other threads:[~2019-02-13 15:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 15:53 [PATCH 0/4] Cleanups around compress path Nikolay Borisov
2019-02-13 15:53 ` [PATCH 1/4] btrfs: Refactor cow_file_range_async Nikolay Borisov
2019-02-13 15:53 ` [PATCH 2/4] btrfs: Remove fs_info from struct async_cow Nikolay Borisov
2019-02-13 15:53 ` [PATCH 3/4] btrfs: Make compress_file_range only " Nikolay Borisov
2019-02-13 15:53 ` [PATCH 4/5] btrfs: Remove unused function btrfs_workqueue_owner Nikolay Borisov
2019-02-13 15:53 ` [PATCH 4/4] btrfs: Replace clear_extent_bit with unlock_extent Nikolay Borisov
2019-02-13 15:53 ` [PATCH 5/5] " Nikolay Borisov
2019-02-13 15:55 ` [PATCH 0/4] Cleanups around compress path Nikolay Borisov
2019-02-13 15:55 [RESEND PATCH " Nikolay Borisov
2019-02-13 15:55 ` [PATCH 4/4] btrfs: Replace clear_extent_bit with unlock_extent Nikolay Borisov

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