On Tue, May 12, 2009 at 08:04:21AM -0700, Sage Weil wrote: > To me, a simple 'cp' type operation (assuming it gets wired up the way it > could) seems like at least as common a use case than a 'snapshot' > operation. I know that's not what your main goal here, but I don't > understand the resistance to two syscalls. Mixing the two might give you > the right answer in many cases, but certainly not all, and it makes for > confusing application interface semantics that we won't be able to change > down the line. I'm not against two syscalls, but I'm not writing copyfile() here, just reflink(). Someone clearly could write copyfile() later and link into some of the same underlying mechanisms. It's important to distinguish the semantics, though, and that's why I'm doing one thing. For example, reflink() is a snapshot (a "reference-counted link") and has behaviors based on that. libc should never fake it, because the callers expect those behaviors. Whereas copyfile() would be fakeable in libc with a read/write cycle on filesystems that don't support it. Things like that. Heck, I think you could use reflink() to create a copyfile() in libc that uses no additional syscall. But you couldn't use copyfile() to create reflink(). Joel -- "Lately I've been talking in my sleep. Can't imagine what I'd have to say. Except my world will be right When love comes back my way." Joel Becker Principal Software Developer Oracle E-mail: joel.becker@xxxxxxxxxx Phone: (650) 506-8127 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html