From: Joel Becker <Joel.Becker@oracle.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Mark Fasheh <mfasheh@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32
Date: Fri, 18 Sep 2009 11:37:57 -0700 [thread overview]
Message-ID: <20090918183757.GA8551@mail.oracle.com> (raw)
In-Reply-To: <4AB38C5A.4070506@draigBrady.com>
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
--
Life's Little Instruction Book #451
"Don't be afraid to say, 'I'm sorry.'"
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
WARNING: multiple messages have this Message-ID (diff)
From: Joel Becker <Joel.Becker@oracle.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Mark Fasheh <mfasheh@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32
Date: Fri, 18 Sep 2009 11:37:57 -0700 [thread overview]
Message-ID: <20090918183757.GA8551@mail.oracle.com> (raw)
In-Reply-To: <4AB38C5A.4070506@draigBrady.com>
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
--
Life's Little Instruction Book #451
"Don't be afraid to say, 'I'm sorry.'"
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2009-09-18 18:37 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 20:04 [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32 Joel Becker
2009-09-11 20:04 ` Joel Becker
2009-09-14 21:32 ` [Ocfs2-devel] " Linus Torvalds
2009-09-14 21:32 ` Linus Torvalds
2009-09-14 22:14 ` [Ocfs2-devel] " Joel Becker
2009-09-14 22:14 ` Joel Becker
2009-09-14 23:27 ` [Ocfs2-devel] " Linus Torvalds
2009-09-14 23:27 ` Linus Torvalds
2009-09-15 0:04 ` [Ocfs2-devel] " Joel Becker
2009-09-15 0:04 ` Joel Becker
2009-09-15 0:31 ` [Ocfs2-devel] " Linus Torvalds
2009-09-15 0:31 ` Linus Torvalds
2009-09-15 0:54 ` [Ocfs2-devel] " Joel Becker
2009-09-15 0:54 ` Joel Becker
2009-09-15 2:01 ` [Ocfs2-devel] " Linus Torvalds
2009-09-15 2:01 ` Linus Torvalds
2009-09-15 4:05 ` [Ocfs2-devel] " Arjan van de Ven
2009-09-15 4:05 ` Arjan van de Ven
2009-09-15 4:35 ` [Ocfs2-devel] " Joel Becker
2009-09-15 4:35 ` Joel Becker
2009-09-15 4:06 ` [Ocfs2-devel] " Joel Becker
2009-09-15 4:06 ` Joel Becker
2009-09-15 16:30 ` [Ocfs2-devel] " Linus Torvalds
2009-09-15 16:30 ` Linus Torvalds
2009-09-15 21:45 ` [Ocfs2-devel] " Joel Becker
2009-09-15 21:45 ` Joel Becker
2009-09-16 4:20 ` [Ocfs2-devel] " Linus Torvalds
2009-09-16 4:20 ` Linus Torvalds
2009-09-16 4:40 ` [Ocfs2-devel] " Joel Becker
2009-09-16 4:40 ` Joel Becker
2009-09-17 16:29 ` [Ocfs2-devel] " Linus Torvalds
2009-09-17 16:29 ` Linus Torvalds
2009-09-17 16:38 ` [Ocfs2-devel] " Arjan van de Ven
2009-09-17 16:38 ` Arjan van de Ven
2009-09-17 20:16 ` [Ocfs2-devel] " Linus Torvalds
2009-09-17 20:16 ` Linus Torvalds
2009-09-17 18:40 ` [Ocfs2-devel] " Roland Dreier
2009-09-17 18:40 ` Roland Dreier
2009-09-17 20:17 ` [Ocfs2-devel] " Linus Torvalds
2009-09-17 20:17 ` Linus Torvalds
2009-09-17 20:34 ` [Ocfs2-devel] " Joel Becker
2009-09-17 20:34 ` Joel Becker
2009-09-18 0:29 ` [Ocfs2-devel] " Linus Torvalds
2009-09-18 0:29 ` Linus Torvalds
2009-09-17 20:42 ` [Ocfs2-devel] " Roland Dreier
2009-09-17 20:42 ` Roland Dreier
2009-09-17 20:55 ` [Ocfs2-devel] " Linus Torvalds
2009-09-17 20:55 ` Linus Torvalds
2009-09-18 1:43 ` [Ocfs2-devel] " Joel Becker
2009-09-18 1:43 ` Joel Becker
2009-09-18 13:34 ` Pádraig Brady
2009-09-18 13:34 ` Pádraig Brady
2009-09-18 18:37 ` Joel Becker [this message]
2009-09-18 18:37 ` Joel Becker
2009-09-18 17:23 ` Peter W. Morreale
2009-09-18 17:23 ` Peter W. Morreale
2009-09-18 18:39 ` Joel Becker
2009-09-18 18:39 ` Joel Becker
2009-09-15 6:44 ` Miklos Szeredi
2009-09-15 6:44 ` Miklos Szeredi
2009-09-23 11:02 ` [Ocfs2-devel] [GIT PULL] ocfs2 changes for 2.6.32 (take 2, no syscall) Joel Becker
2009-09-23 11:02 ` Joel Becker
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=20090918183757.GA8551@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=P@draigBrady.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.