Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Michał Górny <mgorny@g.o>
From: Nirbheek Chauhan <nirbheek@g.o>
Subject: Re: Re: proj/portage:master commit in: pym/portage/dbapi/
Date: Sat, 26 Nov 2011 22:01:11 +0530
On Sat, Nov 26, 2011 at 9:38 PM, Michał Górny <mgorny@g.o> wrote:
> On Sat, 26 Nov 2011 21:28:51 +0530
> Nirbheek Chauhan <nirbheek@g.o> wrote:
>> There are still a few specific cases in which CoW would indeed be
>> useful. IIRC, reflinking of files works across btrfs *subvolumes*, and
>> such a copy would normally be detected as a cross-device move.
>
> For such a thing, shouldn't rename() work neat anyway?
>

No, because reflink is an ioctl that works directly on the FS level by
sharing data blocks, and should theoretically not bother about the
file hierarchy. On the other hand, rename() is a userland API and must
behave itself.

>> Another use would be an patch-merge which makes use of *ranged
>> reflinks* to only CoW copy those parts of the file that were
>> changed[1]. rsync has support for this, but only while appending to
>> files (--append-verify --no-whole-file).
>
> So, it'd be like:
> 1) CoW-dup old file,
> 2) patch-merge into the duped old file,
> 3) replace.
>
> Am I understanding correctly?
>

You can do that, or perhaps you can just do the patch-merge in-place.
Not sure about the crash guarantees in the latter case. The former
(rename) is documented here:
https://btrfs.wiki.kernel.org/articles/f/a/q/FAQ_1fe9.html#What_are_the_crash_guarantees_of_overwrite-by-rename.3F

But in all this, the hard part is really the "patch-merge" for
anything except appends. ;)

-- 
~Nirbheek Chauhan

Gentoo GNOME+Mozilla Team


References:
Re: proj/portage:master commit in: pym/portage/dbapi/
-- Fabian Groffen
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
-- Nirbheek Chauhan
Re: proj/portage:master commit in: pym/portage/dbapi/
-- Nirbheek Chauhan
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
-- Ciaran McCreesh
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
-- Rich Freeman
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
-- Michał Górny
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
-- Michał Górny
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
Next by thread:
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
Previous by date:
Re: Re: proj/portage:master commit in: pym/portage/dbapi/
Next by date:
Re: Re: proj/portage:master commit in: pym/portage/dbapi/


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.