Re: [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()

2015-10-26 Thread J. Bruce Fields
On Mon, Oct 26, 2015 at 12:19:33PM +, Pádraig Brady wrote: > On 26/10/15 03:39, Christoph Hellwig wrote: > > On Sat, Oct 24, 2015 at 01:02:21PM +0100, P??draig Brady wrote: > >> I'm a bit worried about the sparse expansion and default reflinking > >> which might preclude cp(1) from using this

Re: [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()

2015-10-26 Thread Pádraig Brady
On 26/10/15 03:39, Christoph Hellwig wrote: > On Sat, Oct 24, 2015 at 01:02:21PM +0100, P??draig Brady wrote: >> I'm a bit worried about the sparse expansion and default reflinking >> which might preclude cp(1) from using this call in most cases, but I will >> test and try to use it. coreutils has

Re: [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()

2015-10-25 Thread Christoph Hellwig
On Sat, Oct 24, 2015 at 01:02:21PM +0100, P??draig Brady wrote: > I'm a bit worried about the sparse expansion and default reflinking > which might preclude cp(1) from using this call in most cases, but I will > test and try to use it. coreutils has heuristics for determining if files > are

Re: [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()

2015-10-24 Thread Pádraig Brady
On 23/10/15 20:32, Anna Schumaker wrote: > +len = stat.st_size; > + > +fd_out = open(argv[2], O_CREAT|O_WRONLY|O_TRUNC, 0644); > +if (fd_out == \-1) { > +perror("open (argv[2])"); > +exit(EXIT_FAILURE); > +} > + > +do { > +ret = copy_file_range(fd_in,

[PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()

2015-10-23 Thread Anna Schumaker
copy_file_range() is a new system call for copying ranges of data completely in the kernel. This gives filesystems an opportunity to implement some kind of "copy acceleration", such as reflinks or server-side-copy (in the case of NFS). Signed-off-by: Anna Schumaker