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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 D74F4FA372C for ; Fri, 8 Nov 2019 15:53:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BA1C21924 for ; Fri, 8 Nov 2019 15:53:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=georgianit.com header.i=@georgianit.com header.b="ZGJsq0Xg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="O4hTpqvN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726307AbfKHPxQ (ORCPT ); Fri, 8 Nov 2019 10:53:16 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55107 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbfKHPxQ (ORCPT ); Fri, 8 Nov 2019 10:53:16 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 1AE8B218BB; Fri, 8 Nov 2019 10:53:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 08 Nov 2019 10:53:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=georgianit.com; h=subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=fm1; bh=q4u2lG9EbiJ1h3sdzCmmpqMCOz6 JPABUseOzhrq8VII=; b=ZGJsq0Xg5ALJ7FGLFdqekr7fRXRFXZ1ucESHamA9rZ5 ahsY9ovLpz+Tjl9TTcI/rbKWcF0MuvVlN7GLShJm3DzHOvF9GGH0AjQZ0arhLihR D24k5gZZ8H+4nA3Y6G/eHXZRUQQYnKV0Ohu1Zbcj3+mdrvI5klAk4Sl8mVpJbJhu jNoJ0XESwfxrzoa9Sit6PglKXNZF0lXzL3fRhUYrjHUP0Mvx0B5QdXQk5bTNZ+ER EKdmomZ2t5xa70yMtSdjalQykG0Y9eULiDsvnlcVukBiabrSAlLC+dgGBrhFaLjL LYbfeJm3K2Q9eMC4dTz1hDrzw1A/2ZwrF8D8oPDK16w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=q4u2lG 9EbiJ1h3sdzCmmpqMCOz6JPABUseOzhrq8VII=; b=O4hTpqvNLFS+x4zO5ii7t6 32fpugLQQk/2DLfWMZep8yTD2qKYqSpfRHGMEuNDXtjGjowSthdLl02t1fISz55E LQVve3clBj2DtbLBSCOxrWOj3yvLlwjLXGmnKIfHnGRLC5l+yLQSOgB3qHdNEtIr 77ctWmBCzfzSyeCUxtcbl8kZyIYMfvWTcbWNJ/0IvA/6BBITy+7tO4oOgadWHgGL 2kKPO+xki/axZsT4PGp06EJIP9gS8A7AgG8kXSbDWedflwSp/l738JncVStFkaua 50Ny/YK6tTN2AlHkePpViRrd3kQYUacJVVLFAmxw30GflVQcaAm6UqvZjEj8U08Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvuddgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtsehgtderofdtfeejnecuhfhrohhmpeftvghmihcu ifgruhhvihhnuceorhgvmhhisehgvghorhhgihgrnhhithdrtghomheqnecukfhppedufe ehrddvfedrvdegiedrudefudenucfrrghrrghmpehmrghilhhfrhhomheprhgvmhhisehg vghorhhgihgrnhhithdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [10.0.0.6] (135-23-246-131.cpe.pppoe.ca [135.23.246.131]) by mail.messagingengine.com (Postfix) with ESMTPA id 82CB0306005C; Fri, 8 Nov 2019 10:53:14 -0500 (EST) Subject: Re: Defragmenting to recover wasted space To: Nate Eldredge References: Cc: linux-btrfs From: Remi Gauvin Openpgp: url=http://www.georgianit.com/pgp/Remi%20Gauvin%20remi%40georgianit.com%20(0xEF539FF247456A6D)%20pub.asc Autocrypt: addr=remi@georgianit.com; prefer-encrypt=mutual; keydata= mQENBFogjcYBCADvI0pxdYyVkEUAIzT6HwYnZ5CAy2czT87Si5mqk4wL4Ulupwfv9TLzaj3R CUgHPNpFsp1n/nKKyOq1ZmE6w5YKx4I8/o9tRl+vjnJr2otfS7XizBaVV7UwziODikOimmT+ sGNfYGcjdJ+CC567g9aAECbvnyxNlncTyUPUdmazOKhmzB4IvG8+M2u+C4c9nVkX2ucf3OuF t/qmeRaF8+nlkCMtAdIVh0F7HBYJzvYG3EPiKbGmbOody3OM55113uEzyw39k8WHRhhaKhi6 8QY9nKCPVhRFzk6wUHJa2EKbKxqeFcFzZ1ok7l7vrX3/OBk2dGOAoOJ4UX+ozAtrMqCBABEB AAG0IVJlbWkgR2F1dmluIDxyZW1pQGdlb3JnaWFuaXQuY29tPokBPgQTAQIAKAUCWiCNxgIb IwUJCWYBgAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ71Of8kdFam2V1Qf9Fs6LSx1i OoVgOzjWwiI06vJrZznjmtbJkcm/Of5onITZnB4h+tbqEyaM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500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LsTgW1cJ53xXyuHKnWCcwll2dq3ZvcgHb" Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LsTgW1cJ53xXyuHKnWCcwll2dq3ZvcgHb Content-Type: multipart/mixed; boundary="evLlTdE4DTl3Ju0UzrYgBwWgKrEedeXtb"; protected-headers="v1" From: Remi Gauvin To: Nate Eldredge Cc: linux-btrfs Message-ID: Subject: Re: Defragmenting to recover wasted space References: In-Reply-To: --evLlTdE4DTl3Ju0UzrYgBwWgKrEedeXtb Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2019-11-08 10:24 a.m., Nate Eldredge wrote: > On Fri, 8 Nov 2019, Qu Wenruo wrote: >=20 >> In fact, you can just go nodatacow. >> Furthermore, nodatacow attr can be applied to a directory so that any >> newer file will just inherit the nodatacow attr. >> >> In that case, any overwrite will not be COWed (as long as there is no >> snapshot for it), thus no space wasted. >=20 > Aha, I didn't know about that feature.=C2=A0 Thanks, that is exactly wh= at I > want. >=20 I would advise caution with this approach.. with nodatacow you give up all of the features that would make you want to use BTRFS in the first place. (No Checksum verification, for example.) And if using in conjunction with BTRFS Raid, BTRFS behavior, is,, in terms of RAID, outright psychotic. In case of unclean shutdown while data was being written, the RAID copies will be inconsistent, and BTRFS will never synchronize them, (short of a full re-balance.).. What data gets read will just randomnly depend on what device BTRFS is reading from= =2E If you would rather forgo the benefits of BTRFS for better performance or fragmentation issues, why not carve out an XFS / EXT4 partition? --evLlTdE4DTl3Ju0UzrYgBwWgKrEedeXtb-- --LsTgW1cJ53xXyuHKnWCcwll2dq3ZvcgHb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJdxY9pAAoJEO9Tn/JHRWptS9cH/0/n92MCASIYyDaC9oAlkAeN kFvPZy0JIe8t4WPSDDZEPvfRarX7WZyQ7wB8OgvsWRDCMRHfx/eK7kUNuZVWwu5Y D7FXUXBxooRmE9pVugTsYKZdUZS5zIv4JJxnnhTuFecgnHCaWBKywd02s+oDhzAI i2XF3+v0ya+ilVeg++L4+7W2OTinw3lByla+Ud48to6HYzA0AS+Oi7hr9RY5cWxi FVo/7D2y0cxU4CA+m1kKjE82W/guR9ZXDIb0NdPcl8QClcxHl/z9gQtDzeiB45N7 HURU36yF/JJ3pYRvQ+hT0YA5F0rBnR6p3RpfGPnzJwvQp0rKbdj5GSqw6QYcFWo= =/Hew -----END PGP SIGNATURE----- --LsTgW1cJ53xXyuHKnWCcwll2dq3ZvcgHb--