mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Joel Becker <Joel.Becker@oracle.com>
Cc: 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: [GIT PULL] ocfs2 changes for 2.6.32
Date: Tue, 15 Sep 2009 09:30:54 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0909150923180.4950@localhost.localdomain> (raw)
In-Reply-To: <20090915040601.GE4507@mail.oracle.com>



On Mon, 14 Sep 2009, Joel Becker wrote:
> > 
> > If you're talking about falling back to manually just copying the data, 
> > then nobody is interested in that. User space can do that better with a 
> > simple read-write loop or with splice, or whatever. There's no reaason 
> > what-so-ever to do that.
> 
> 	I'm talking about any facility for copying that isn't just a
> userspace loop.  Like your discussion of network filesystems.

HOW?

We need to have a per-filesystem interface to that. 

Having a '->copyfile()' function would be great.

But don't you see how _idiotic_ it is to then also having a '->reflink()' 
function that does _conceptually_ the exact same thing, except it does it 
by incrementing a usage count instead?

Do you see why I'm so unhappy to add a ->reflink() function? 

> 	Hence I brought this to the filesystem summit and then fsdevel
> rather than just implementing it in ocfs2.  I know NFS folks were in the
> room in April, and they said the call definition was workable.  Can't
> remember if CIFS folks were there, but I think so.

It's not workable if you define the 'reflink()' function to not use any 
disk space on the filesystem. Because SMB _will_ do a copy (and I presume 
the NFS thing will too). So it would not in general be what you call 
reflink, it will not be a "snapshot".

So if you _define_ the semantics of "reflink" to be that it's atomic and 
doesn't use any new diskspace (apart from the new inode/directory entry, 
of course), then it will be almost totally useless to other filesystems.

In fact, it's entirely possible to have filesystems that can avoid copying 
the _data_ blocks, but would need to copy the indirect blocks - maybe the 
data blocks are ref-counted, but the metadata needs to be per-file (I can 
see many reasons to do it that way, even if it's organized as a tree - 
it's how we do page table COW, for example, and it makes some things much 
simpler).

Would that be a 'reflink()' or not? I have no way of knowing, because you 
have decided on reflink on a purely ocfs2-specific implementation basis. 
But I do know that such a filesystem would be perfectly happy to have a 
'copyfile' function.

This is why I want the VFS pointers to be about _semantics_, not about 
some random implementation detail.

			Linus

  reply	other threads:[~2009-09-15 16:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11 20:04 Joel Becker
2009-09-14 21:32 ` Linus Torvalds
2009-09-14 22:14   ` Joel Becker
2009-09-14 23:27     ` Linus Torvalds
2009-09-15  0:04       ` Joel Becker
2009-09-15  0:31         ` Linus Torvalds
2009-09-15  0:54           ` Joel Becker
2009-09-15  2:01             ` Linus Torvalds
2009-09-15  4:05               ` Arjan van de Ven
2009-09-15  4:35                 ` Joel Becker
2009-09-15  4:06               ` Joel Becker
2009-09-15 16:30                 ` Linus Torvalds [this message]
2009-09-15 21:45                   ` Joel Becker
2009-09-16  4:20                     ` Linus Torvalds
2009-09-16  4:40                       ` Joel Becker
2009-09-17 16:29                         ` Linus Torvalds
2009-09-17 16:38                           ` Arjan van de Ven
2009-09-17 20:16                             ` Linus Torvalds
2009-09-17 18:40                           ` Roland Dreier
2009-09-17 20:17                             ` Linus Torvalds
2009-09-17 20:34                               ` Joel Becker
2009-09-18  0:29                                 ` Linus Torvalds
2009-09-17 20:42                               ` Roland Dreier
2009-09-17 20:55                                 ` Linus Torvalds
2009-09-18  1:43                           ` [Ocfs2-devel] " Joel Becker
2009-09-18 13:34                             ` Pádraig Brady
2009-09-18 18:37                               ` Joel Becker
2009-09-18 17:23                             ` Peter W. Morreale
2009-09-18 18:39                               ` Joel Becker
2009-09-15  6:44   ` Miklos Szeredi
2009-09-23 11:02   ` [GIT PULL] ocfs2 changes for 2.6.32 (take 2, no syscall) Joel Becker
2009-09-22  0:51 [GIT PULL] ocfs2 changes for 2.6.32 George Spelvin
2009-09-22  3:28 George Spelvin

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=alpine.LFD.2.01.0909150923180.4950@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=Joel.Becker@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®