[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: Re: [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32]
From: |
Pádraig Brady |
Subject: |
[Fwd: Re: [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32] |
Date: |
Mon, 21 Sep 2009 10:58:40 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
FYI
-------- Original Message --------
Subject: Re: [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32
Date: Fri, 18 Sep 2009 11:37:57 -0700
From: Joel Becker <address@hidden>
To: Pádraig Brady <address@hidden>
CC: Linus Torvalds <address@hidden>, Linux Kernel Mailing List
<address@hidden>, address@hidden
On Fri, Sep 18, 2009 at 02:34:18PM +0100, Pádraig Brady wrote:
> Joel Becker wrote:
> > On Thu, Sep 17, 2009 at 09:29:14AM -0700, Linus Torvalds wrote:
> >> Why would anybody want to hide it at all? Why even the libc hiding?
> >>
> >> Nobody is going to use this except for special apps. Let them see what
> >> they can do, in all its glory.
> >
> > I expect everyone will use this through cp(1), so that cp(1) can
> > try to get server-side copy on the network filesystms.
>
> For reference, cp(1) has a --reflink option as of
> coreutils-7.5 which currently just does:
>
> ioctl (dest_fd, BTRFS_IOC_CLONE, src_fd);
Note that the btrfs ioctl is not a reflink(), so this probably
wants changing (OCFS2_IOC_REFLINK is the ocfs2 ioctl, sys_reflink() was
going to be the syscall).
> There is a specific option in cp to do this because
> a "reflink copy" was seen to have these disadvantages:
>
> 1. one copy of data blocks so more chances of data loss
> 2. disk head seeking deferred to modification process
> 3. possible fragmentation on write
> 4. possible ENOSPC on write
>
> Now 2. will go away with time, and 3 & 4 may be alleviated
> by the use of fallocate(), but 1. was deemed important
> enough to not enable by default.
1, 2, and 3 are definitely in the category of "it would be nice
to choose the behavior". 4 is the big one, because it breaks default
cp(1) assumptions. The good news is that the current copyfile
idea of copyfile(src, dst, 0) would satisfy 1-4 and be efficient or
return -ENOTSUPP/-ENOSYS if it couldn't be. Then cp(1) falls back to
the read-write loop.
cp --reflink would become copyfile(src, dst, COPYFILE_SNAPSHOT)
Joel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fwd: Re: [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32],
Pádraig Brady <=