Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Copy on write of unmodified data
Date: Wed, 25 May 2016 09:29:58 +0000	[thread overview]
Message-ID: <20160525092958.GH16712@carfax.org.uk> (raw)
In-Reply-To: <ae68a6ae-8184-88b8-05e5-8bb369d906b5@zytor.com>

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

On Wed, May 25, 2016 at 01:58:15AM -0700, H. Peter Anvin wrote:
> Hi,
> 
> I'm looking at using a btrfs with snapshots to implement a generational
> backup capacity.  However, doing it the naïve way would have the side
> effect that for a file that has been partially modified, after
> snapshotting the file would be written with *mostly* the same data.  How
> does btrfs' COW algorithm deal with that?  If necessary I might want to
> write some smarter user space utilities for this.

   Sounds like it might be a job for one of the dedup tools
(deupremove, bedup), or, if you're writing your own, the safe
deduplication ioctl which underlies those tools.

   Hugo.

-- 
Hugo Mills             | Well, sir, the floor is yours. But remember, the
hugo@... carfax.org.uk | roof is ours!
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                             The Goons

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-05-25  9:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25  8:58 Copy on write of unmodified data H. Peter Anvin
2016-05-25  9:29 ` Hugo Mills [this message]
2016-05-25 11:00   ` H. Peter Anvin
2016-05-25 11:07     ` Hugo Mills
2016-05-25 11:32       ` Austin S. Hemmelgarn
2016-05-25 13:06   ` Dmitry Katsubo
2016-05-25 11:45 ` Austin S. Hemmelgarn
2016-05-25 12:28   ` Hugo Mills
2016-05-25 16:16 ` Henk Slager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160525092958.GH16712@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=hpa@zytor.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox