From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: defrag vs autodefrag
Date: Wed, 23 Dec 2015 02:16:37 +0000 (UTC) [thread overview]
Message-ID: <pan$b661e$77b105fa$ec9a6b6f$a75b850c@cox.net> (raw)
In-Reply-To: 20151222203041.GD1586@carfax.org.uk
Hugo Mills posted on Tue, 22 Dec 2015 20:30:41 +0000 as excerpted:
> On Mon, Dec 21, 2015 at 09:28:37AM +0000, Filipe Manana wrote:
>> On Mon, Dec 21, 2015 at 8:14 AM, Hugo Mills <hugo@carfax.org.uk> wrote:
>> > On Sun, Dec 20, 2015 at 07:26:07PM -0600, Donald Pearson wrote:
>> >> I read an implication in a different thread that defrag and
>> >> autodefrag behave differently in that autodefrag is more snapshot
>> >> friendly for COW data.
>> > Correct.
>> How is that so? Snapshot-aware defrag was disabled almost 2 years ago,
>> and that piece of code is used both by a "manual" defrag (ioctl) and by
>> automatic defrag.
> Then I realised that actually, we're both right. :)
>
> If autodefrag behaves as you say (and I'm sure it does, since you
> know the code), then when you write data to a file, a piece of the file
> around the write(s) can be copied and written elsewhere by autodefrag.
> That's going to be the same as the manual defrag. However,
> it's a relatively small separation effect that's likely lost in the
> noise. If you rewrite the whole file, then it'll separate the file
> completely -- which is what manual defrag does -- but then, you'd expect
> that behaviour without autodefrag, too.
>
> So, ultimately, autodefrag *does* separate reflink copies, but only
> near where writes are made to the file, so the overall effect is very
> similar to the effect you'd have from writing to the file without
> autodefrag.
>
> And I am now better informed than I was before. :)
And now so are we. Thanks, Hugo.
I /knew/ there had to be a good explanation, as what you were saying just
didn't fit in with what I knew. Now I have that explanation, and it
makes perfect sense. =:^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2015-12-23 2:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-21 1:26 defrag vs autodefrag Donald Pearson
2015-12-21 3:22 ` Duncan
2015-12-21 8:14 ` Hugo Mills
2015-12-21 9:28 ` Filipe Manana
2015-12-22 20:16 ` Christoph Anton Mitterer
2015-12-22 20:30 ` Hugo Mills
2015-12-23 2:16 ` Duncan [this message]
2015-12-27 3:03 ` [PATCH] improve documentation of snapshot unaware defrag Christoph Anton Mitterer
2015-12-27 3:10 ` Christoph Anton Mitterer
2015-12-27 7:09 ` Duncan
2015-12-28 0:50 ` Christoph Anton Mitterer
2015-12-28 1:58 ` Hugo Mills
2015-12-28 2:07 ` Christoph Anton Mitterer
2015-12-28 9:12 ` Duncan
2015-12-28 2:51 ` Duncan
2015-12-28 3:03 ` Christoph Anton Mitterer
2015-12-28 6:12 ` Duncan
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='pan$b661e$77b105fa$ec9a6b6f$a75b850c@cox.net' \
--to=1i5t5.duncan@cox.net \
--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;
as well as URLs for NNTP newsgroup(s).