From a1d7469835371ded0ad8e3496bc5a5bebf94ccef Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sat, 1 Aug 2009 19:36:48 +0200 Subject: cp: accept the --reflink option * NEWS: Mention it. * doc/coreutils.texi (cp invocation): Describe it. * src/copy.h (struct cp_options) [reflink]: New member. * src/copy.c (usage): Describe it. (copy_reg): If reflink is true try to clone the file. (main): Check for --reflink. (cp_option_init): Initialize the new member. * src/install.c (cp_option_init): Initialize the new member. * src/mv.c (cp_option_init): Likewise. * tests/cp/sparse: Add a new test case. --- doc/coreutils.texi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 90a54b268..bb1d87a87 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -7543,6 +7543,15 @@ Also, it is not portable to use @option{-R} to copy symbolic links unless you also specify @option{-P}, as @acronym{POSIX} allows implementations that dereference symbolic links by default. +@item --reflink +@opindex --reflink +Perform a lightweight, copy-on-write (COW) copy. +Copying with this option can succeed only on some relatively new file systems. +Once it has succeeded, beware that the source and destination files +share the same disk data blocks as long as they remain unmodified. +Thus, if a disk I/O error affects data blocks of one of the files, +the other suffers the exact same fate. + @item --remove-destination @opindex --remove-destination Remove each existing destination file before attempting to open it -- cgit v1.2.3-70-g09d2