mbox series

[0/2] btrfs: some optimizations for send

Message ID cover.1708260967.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: some optimizations for send | expand

Message

Filipe Manana Feb. 19, 2024, 11:59 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

The following are two optimizations for send, one to avoid sending
unnecessary holes (writes full of zeros), which can waste a lot of space
at the receiver and increase stream size for cases where sparse files are
used, such as images of thin provisioned filesystems for example as
recently reported by a user. The second is just a small optimization to
avoid repeating a btree search. More details in the respective change logs.

Filipe Manana (2):
  btrfs: send: don't issue unnecessary zero writes for trailing hole
  btrfs: send: avoid duplicated search for last extent when sending hole

 fs/btrfs/send.c | 44 +++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 19 deletions(-)

Comments

Sweet Tea Dorminy Feb. 19, 2024, 7 p.m. UTC | #1
On 2/19/24 06:59, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The following are two optimizations for send, one to avoid sending
> unnecessary holes (writes full of zeros), which can waste a lot of space
> at the receiver and increase stream size for cases where sparse files are
> used, such as images of thin provisioned filesystems for example as
> recently reported by a user. The second is just a small optimization to
> avoid repeating a btree search. More details in the respective change logs.
> 
> Filipe Manana (2):
>    btrfs: send: don't issue unnecessary zero writes for trailing hole
>    btrfs: send: avoid duplicated search for last extent when sending hole
> 
>   fs/btrfs/send.c | 44 +++++++++++++++++++++++++-------------------
>   1 file changed, 25 insertions(+), 19 deletions(-)
> 

For both:
Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
David Sterba Feb. 19, 2024, 7:10 p.m. UTC | #2
On Mon, Feb 19, 2024 at 11:59:29AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The following are two optimizations for send, one to avoid sending
> unnecessary holes (writes full of zeros), which can waste a lot of space
> at the receiver and increase stream size for cases where sparse files are
> used, such as images of thin provisioned filesystems for example as
> recently reported by a user. The second is just a small optimization to
> avoid repeating a btree search. More details in the respective change logs.
> 
> Filipe Manana (2):
>   btrfs: send: don't issue unnecessary zero writes for trailing hole
>   btrfs: send: avoid duplicated search for last extent when sending hole

Reviewed-by: David Sterba <dsterba@suse.com>
Josef Bacik Feb. 20, 2024, 3:21 p.m. UTC | #3
On Mon, Feb 19, 2024 at 11:59:29AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The following are two optimizations for send, one to avoid sending
> unnecessary holes (writes full of zeros), which can waste a lot of space
> at the receiver and increase stream size for cases where sparse files are
> used, such as images of thin provisioned filesystems for example as
> recently reported by a user. The second is just a small optimization to
> avoid repeating a btree search. More details in the respective change logs.
> 

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef