tail -F once again notices changes in a currently unavailable
remote directory [bug introduced in coreutils-7.5]
+** Changes in behavior
+
+ cp --attributes-only now completely overrides --reflink.
+ Previously a reflink was needlessly attempted.
+
* Noteworthy changes in release 8.6 (2010-10-15) [stable]
@cindex COW
@cindex clone
@cindex copy on write
-Perform a lightweight, copy-on-write (COW) copy.
-Copying with this option can succeed only on some 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.
+Perform a lightweight, copy-on-write (COW) copy, if supported by the
+file system. 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.
+the other suffers the same fate.
The @var{when} value can be one of the following:
to the standard copy behaviour.
@end table
+This option is overridden by the @option{--link}, @option{--symbolic-link}
+and @option{--attributes-only} options, thus allowing it to be used
+to configure the default data copying behavior for @command{cp}.
+For example, with the following alias, @command{cp} will use the
+minimum amount of space supported by the file system.
+
+@example
+alias cp='cp --reflink=auto --sparse=always'
+@end example
@item --remove-destination
@opindex --remove-destination
goto close_src_and_dst_desc;
}
- if (x->reflink_mode)
+ /* --attributes-only overrides --reflink. */
+ if (data_copy_required && x->reflink_mode)
{
bool clone_ok = clone_file (dest_desc, source_desc) == 0;
if (clone_ok || x->reflink_mode == REFLINK_ALWAYS)
test copy -nt file && fail=1
+# Ensure that --attributes-only overrides --reflink completely
echo > file2 # file with data
cp --reflink=auto --preserve --attributes-only file2 empty_copy || fail=1
test -s empty_copy && fail=1
+cp --reflink=always --preserve --attributes-only file2 empty_copy || fail=1
+test -s empty_copy && fail=1
Exit $fail