Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread David Sterba
On Fri, Jan 29, 2021 at 07:02:41PM +, Michal Rostecki wrote: > On Fri, Jan 29, 2021 at 06:47:53PM +0100, David Sterba wrote: > > On Fri, Jan 29, 2021 at 05:15:21PM +, Michal Rostecki wrote: > > > On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > > > > On 1/27/21 8:57 AM,

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread Michal Rostecki
On Fri, Jan 29, 2021 at 06:47:53PM +0100, David Sterba wrote: > On Fri, Jan 29, 2021 at 05:15:21PM +, Michal Rostecki wrote: > > On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > > > On 1/27/21 8:57 AM, Michal Rostecki wrote: > > > > From: Michal Rostecki > > > > > > > > Before

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread Filipe Manana
On Fri, Jan 29, 2021 at 5:54 PM David Sterba wrote: > > On Fri, Jan 29, 2021 at 05:15:21PM +, Michal Rostecki wrote: > > On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > > > On 1/27/21 8:57 AM, Michal Rostecki wrote: > > > > From: Michal Rostecki > > > > > > > > Before this

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread David Sterba
On Fri, Jan 29, 2021 at 05:15:21PM +, Michal Rostecki wrote: > On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > > On 1/27/21 8:57 AM, Michal Rostecki wrote: > > > From: Michal Rostecki > > > > > > Before this change, the btrfs_get_io_geometry() function was calling > > >

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread Michal Rostecki
On Fri, Jan 29, 2021 at 11:22:48AM -0500, Josef Bacik wrote: > On 1/27/21 8:57 AM, Michal Rostecki wrote: > > From: Michal Rostecki > > > > Before this change, the btrfs_get_io_geometry() function was calling > > btrfs_get_chunk_map() to get the extent mapping, necessary for > > calculating the

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-29 Thread Josef Bacik
On 1/27/21 8:57 AM, Michal Rostecki wrote: From: Michal Rostecki Before this change, the btrfs_get_io_geometry() function was calling btrfs_get_chunk_map() to get the extent mapping, necessary for calculating the I/O geometry. It was using that extent mapping only internally and freeing the

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-28 Thread David Sterba
On Wed, Jan 27, 2021 at 02:57:27PM +0100, Michal Rostecki wrote: > From: Michal Rostecki > > Before this change, the btrfs_get_io_geometry() function was calling > btrfs_get_chunk_map() to get the extent mapping, necessary for > calculating the I/O geometry. It was using that extent mapping only

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-28 Thread David Sterba
On Thu, Jan 28, 2021 at 10:38:45AM +, Filipe Manana wrote: > On Thu, Jan 28, 2021 at 12:01 AM Michal Rostecki wrote: > > > > From: Michal Rostecki > > > > Before this change, the btrfs_get_io_geometry() function was calling > > btrfs_get_chunk_map() to get the extent mapping, necessary for >

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-28 Thread Filipe Manana
On Thu, Jan 28, 2021 at 12:01 AM Michal Rostecki wrote: > > From: Michal Rostecki > > Before this change, the btrfs_get_io_geometry() function was calling > btrfs_get_chunk_map() to get the extent mapping, necessary for > calculating the I/O geometry. It was using that extent mapping only >

Re: [PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-27 Thread Nikolay Borisov
On 27.01.21 г. 15:57 ч., Michal Rostecki wrote: > From: Michal Rostecki > > Before this change, the btrfs_get_io_geometry() function was calling > btrfs_get_chunk_map() to get the extent mapping, necessary for > calculating the I/O geometry. It was using that extent mapping only > internally

[PATCH v2] btrfs: Avoid calling btrfs_get_chunk_map() twice

2021-01-27 Thread Michal Rostecki
From: Michal Rostecki Before this change, the btrfs_get_io_geometry() function was calling btrfs_get_chunk_map() to get the extent mapping, necessary for calculating the I/O geometry. It was using that extent mapping only internally and freeing the pointer after its execution. That resulted in