Re: defrag vs autodefrag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux