Hi all,
I've been going over various libraries and software which
supports copy_file_range / reflinks / file cloning and
noticed Perl doesn't seem to support it natively.
If you're unfamiliar, think of it like `sendfile` on
steroids. For CoW filesystems, it makes a copy lightweight,
and for NFS, it avoids the need for a roundtrip.
I have two questions which I'm wondering about:
1. Does this sound like an idea people are open to for
Perl core's file copying routines?
2. Would File::Copy be the best place for this, given
it currently has no XS? Or would a function need to be
added to Perl itself, and then File::Copy takes advantage of it?
I note that e.g. Sys::Sendfile, IO::SendFile, and File::Copy::clonefile
are varying degrees of prior art in this.
[.Apologies if this isn't the right venue, I asked on #p5p
and it was suggested I ask here if I thought a discussion
might ensue, rather than github issues.]
I'm a long-time Perl writer but first time somewhat-contributor,
so be gentle. Cheers!
best,
sam
I've been going over various libraries and software which
supports copy_file_range / reflinks / file cloning and
noticed Perl doesn't seem to support it natively.
If you're unfamiliar, think of it like `sendfile` on
steroids. For CoW filesystems, it makes a copy lightweight,
and for NFS, it avoids the need for a roundtrip.
I have two questions which I'm wondering about:
1. Does this sound like an idea people are open to for
Perl core's file copying routines?
2. Would File::Copy be the best place for this, given
it currently has no XS? Or would a function need to be
added to Perl itself, and then File::Copy takes advantage of it?
I note that e.g. Sys::Sendfile, IO::SendFile, and File::Copy::clonefile
are varying degrees of prior art in this.
[.Apologies if this isn't the right venue, I asked on #p5p
and it was suggested I ask here if I thought a discussion
might ensue, rather than github issues.]
I'm a long-time Perl writer but first time somewhat-contributor,
so be gentle. Cheers!
best,
sam