[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BTRFS file clone support for cp
From: |
Chris Mason |
Subject: |
Re: BTRFS file clone support for cp |
Date: |
Wed, 29 Jul 2009 12:10:14 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Jul 29, 2009 at 03:14:49PM +0100, Pádraig Brady wrote:
> Chris Mason wrote:
> > On Tue, Jul 28, 2009 at 10:06:35PM +0200, Giuseppe Scrivano wrote:
> >>
> >> I can't replicate it now, all tests I am doing report that blocks used
> >> before and after the clone are the same. Probably yesterday the
> >> difference I noticed was in reality the original file flushed to the
> >> disk.
> >
> > The clone will use some additional space for the metadata required to
> > point to the cloned blocks. It isn't exactly O(1) it is O(metadata for
> > the file).
>
> Thanks for the clarification Chris.
> So the just committed change in cp will
> link the destination file to the extents of the source.
>
> We may need to play around with fallocate()
> if we want to get back to the original
> cp semantics of actually allocating space
> on the file system for the new file.
Well, best to just use the original cp code. I was talking with
Giuseppe about this as well, I think we should the option to do regular
cp via a flag.
There will soon be a reflink system call that can be used on ocfs2 and
btrfs as well. Thanks for adding this to glibc!
-chris
- Re: BTRFS file clone support for cp, (continued)
Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/26
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/27
- Re: BTRFS file clone support for cp, Giuseppe Scrivano, 2009/07/27
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/27
- Re: BTRFS file clone support for cp, Giuseppe Scrivano, 2009/07/28
- Re: BTRFS file clone support for cp, Chris Mason, 2009/07/29
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/29
- Re: BTRFS file clone support for cp,
Chris Mason <=
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/29
- Re: BTRFS file clone support for cp, Joel Becker, 2009/07/30
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/30
- Re: BTRFS file clone support for cp, Joel Becker, 2009/07/30
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/30
- Re: BTRFS file clone support for cp, Ric Wheeler, 2009/07/30
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/30
Re: BTRFS file clone support for cp, Andi Kleen, 2009/07/30
Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/30
Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/30