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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 863ECC77B7A for ; Wed, 7 Jun 2023 20:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235141AbjFGUt2 (ORCPT ); Wed, 7 Jun 2023 16:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235130AbjFGUtE (ORCPT ); Wed, 7 Jun 2023 16:49:04 -0400 Received: from len.romanrm.net (len.romanrm.net [91.121.86.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B418A26AA for ; Wed, 7 Jun 2023 13:48:40 -0700 (PDT) Received: from nvm (nvm.home.romanrm.net [IPv6:fd39::101]) by len.romanrm.net (Postfix) with SMTP id 9521240069; Wed, 7 Jun 2023 20:48:02 +0000 (UTC) Date: Thu, 8 Jun 2023 01:48:02 +0500 From: Roman Mamedov To: Bernd Lentes Cc: "remi@georgianit.com" , "linux-btrfs@vger.kernel.org" Subject: Re: rollback to a snapshot Message-ID: <20230608014802.1dce81a0@nvm> In-Reply-To: References: <26251cfd-f138-a787-f0e8-528c1c5c6778@gmail.com> <8c9b136c-c992-8c0e-a1e6-0e8aec1e89cd@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Wed, 7 Jun 2023 20:14:27 +0000 Bernd Lentes wrote: > I didn't know "--reflink". The help says: > " When --reflink[=always] is specified, perform a lightweight copy, where the > data blocks are copied only when modified. If this is not possible the copy > fails, or if --reflink=auto is specified, fall back to a standard copy. > Use --reflink=never to ensure a standard copy is performed.". > > Is that independent from the fs ? That seems to be a kind of a snapshot. > Am i right ? Not all filesystems support reflinks. Btrfs and XFS support it, but for XFS this has to be enabled at FS creation time (IIRC recent mkfs enables it by default). Ext4, ReiserFS and JFS do not. For XFS it is a way to have the best of the both worlds: have a filesystem that is well regarded for performance, but also gain a degree of the CoW ability that Btrfs is liked for, e.g. allowing instant snapshots of VM images, including running ones with a point-in-time full image consistency -- unthinkable with traditional copying. -- With respect, Roman