Re: [PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-22 Thread David Sterba
On Thu, Feb 21, 2019 at 01:57:12PM +0200, Nikolay Borisov wrote: > This commit changes the implementation of cow_file_range_async in order > to get rid of the BUG_ON in the middle of the loop. Additionally it > reworks the inner loop in the hopes of making it more understandable. > > The idea is t

Re: [PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-22 Thread David Sterba
On Thu, Feb 21, 2019 at 05:09:01PM +0200, Nikolay Borisov wrote: > On 21.02.19 г. 17:07 ч., Johannes Thumshirn wrote: > > On 21/02/2019 14:25, Nikolay Borisov wrote: > >> On 21.02.19 г. 15:15 ч., Johannes Thumshirn wrote: > >>> On 21/02/2019 12:57, Nikolay Borisov wrote: > > static int

Re: [PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-21 Thread Nikolay Borisov
On 21.02.19 г. 17:07 ч., Johannes Thumshirn wrote: > On 21/02/2019 14:25, Nikolay Borisov wrote: >> >> >> On 21.02.19 г. 15:15 ч., Johannes Thumshirn wrote: >>> On 21/02/2019 12:57, Nikolay Borisov wrote: static int cow_file_range_async(struct inode *inode, struct page *locked

Re: [PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-21 Thread Johannes Thumshirn
On 21/02/2019 14:25, Nikolay Borisov wrote: > > > On 21.02.19 г. 15:15 ч., Johannes Thumshirn wrote: >> On 21/02/2019 12:57, Nikolay Borisov wrote: >>> >>> static int cow_file_range_async(struct inode *inode, struct page >>> *locked_page, >>> @@ -1190,45 +1201,68 @@ static int cow_file_range_

Re: [PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-21 Thread Nikolay Borisov
On 21.02.19 г. 15:15 ч., Johannes Thumshirn wrote: > On 21/02/2019 12:57, Nikolay Borisov wrote: >> >> static int cow_file_range_async(struct inode *inode, struct page >> *locked_page, >> @@ -1190,45 +1201,68 @@ static int cow_file_range_async(struct inode *inode, >> struct page *locked_pag

Re: [PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-21 Thread Johannes Thumshirn
On 21/02/2019 12:57, Nikolay Borisov wrote: > > static int cow_file_range_async(struct inode *inode, struct page > *locked_page, > @@ -1190,45 +1201,68 @@ static int cow_file_range_async(struct inode *inode, > struct page *locked_page, > unsigned int write_flags)

[PATCH v3 1/6] btrfs: Refactor cow_file_range_async

2019-02-21 Thread Nikolay Borisov
This commit changes the implementation of cow_file_range_async in order to get rid of the BUG_ON in the middle of the loop. Additionally it reworks the inner loop in the hopes of making it more understandable. The idea is to make async_cow be a top-level structured, shared amongst all chunks being