From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AF38C04AAF for ; Mon, 20 May 2019 09:20:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B614E20675 for ; Mon, 20 May 2019 09:20:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samba.org header.i=@samba.org header.b="VNJ9fGMU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732022AbfETJU3 (ORCPT ); Mon, 20 May 2019 05:20:29 -0400 Received: from hr2.samba.org ([144.76.82.148]:29612 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729598AbfETJU3 (ORCPT ); Mon, 20 May 2019 05:20:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42627210; h=Message-ID:Cc:To:From:Date; bh=61tRybvWVw6jSWyV2+xBCtkqFpMNe0a6dv7/VbKXlt8=; b=VNJ9fGMUUos/HuIjTMUpUNZrRN ECq3mivyx1EKyd6VNpnOLKd132lvz4TuE9MojGl1PsE7ejnBGz+rJC22QoRc+KFFXosJCn2r9QO8r 8t/VEx512JjNMqfjDdL2W9XxUbTm2KcFhC4LxlUyt4/u1+lfAJWaeE2TB3DaZ4ExalmY=; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim) id 1hSeT5-00078F-P2; Mon, 20 May 2019 09:20:27 +0000 Date: Mon, 20 May 2019 11:20:26 +0200 From: David Disseldorp To: Andrei Borzenkov Cc: Newbugreport , "linux-btrfs@vger.kernel.org" Subject: Re: Btrfs send bloat Message-ID: <20190520112026.385537ca@samba.org> In-Reply-To: <275f7add-382c-bf6d-4cf8-f9823cf55daf@gmail.com> References: <275f7add-382c-bf6d-4cf8-f9823cf55daf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Sun, 19 May 2019 23:06:25 +0300, Andrei Borzenkov wrote: > 19.05.2019 11:11, Newbugreport =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > I have 3-4 years worth of snapshots I use for backup purposes. I keep > > R-O live snapshots, two local backups, and AWS Glacier Deep Freeze. I > > use both send | receive and send > file. This works well but I get > > massive deltas when files are moved around in a GUI via samba. =20 >=20 > Did you analyze whether it is client or server problem? If client does > file copy (instead of move as you imply) may be the simplest solution > would be to use different tool on client. If problem is on server side, > it is something to discuss with SAMBA folks. Samba supports copy offload via FSCTL_SRV_COPYCHUNK and FSCTL_DUPLICATE_EXTENTS_TO_FILE, which can be translated to BTRFS_IOC_CLONE_RANGE via the btrfs Samba VFS module. Windows explorer and Linux (cifs.ko) are capable of using these fsctls during copy. See https://wiki.samba.org/index.php/Server-Side_Copy for details. Cheers, David