On Sat, Apr 10, 2010 at 12:00:10AM +0800, jeff.liu wrote:
> one thing I need to point is, for OCFS2 reflink ioctl(2), it also has an
> attributes preserve option could be specified explictly.
>
> I can implement it only when cp(1) invoked with '-p' option without conflict
> to current `cp`
> preserve functions, then the default attributes will be reflink to the dest
> file (i.e.,
> mode,ownership,timestamps).
That's what I figured.
> currently, my idea is, when invoking cp with '--reflink=[WHEN]', it first
> performing btrfs clone,
> if it failed, try to do ocfs2 reflink, fall back to normal copy if both of
> them failed.
A better approach would be to try the ocfs2 reflink ioctl(2),
then the btrfs one. btrfs will support OCFS2_IOC_REFLINK eventually.
Joel
--
"What no boss of a programmer can ever understand is that a programmer
is working when he's staring out of the window"
- With apologies to Burton Rascoe
Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127