]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: copy: mention the reinstated I/O size constraints
authorPádraig Brady <P@draigBrady.com>
Mon, 2 Jan 2023 23:16:07 +0000 (23:16 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 2 Jan 2023 23:30:09 +0000 (23:30 +0000)
* NEWS: Mention the change in behavior re block size multiples
to support unusual devices with this constraint.
* src/copy.c (copy_reg): Likewise.

NEWS
src/copy.c

diff --git a/NEWS b/NEWS
index 78a429274a5c6fcbada5708ba4c5203da054ae06..04ee933c0e8ee4813272fb9c6be3e713035b0fcc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,10 @@ GNU coreutils NEWS                                    -*- outline -*-
   'cp --reflink=always A B' no longer leaves behind a newly created
   empty file B merely because copy-on-write clones are not supported.
 
+  cp, mv, and install again read in multiples of the reported block size,
+  to support unusual devices that may have this constraint.
+  [behavior inadvertently changed in coreutils-7.2]
+
   'ls -v' and 'sort -V' go back to sorting ".0" before ".A",
   reverting to the behavior in coreutils-9.0 and earlier.
   This behavior is now documented.
index 310c8bf14208bae7618756cc4d5150f63546712f..ec5607188084d85bf5a80e0760fb3ad79238dc8b 100644 (file)
@@ -1341,7 +1341,9 @@ copy_reg (char const *src_name, char const *dst_name,
       if (! make_holes)
         {
           /* Compute the least common multiple of the input and output
-             buffer sizes, adjusting for outlandish values.  */
+             buffer sizes, adjusting for outlandish values.
+             Note we read in multiples of the reported block size
+             to support (unusual) devices that have this constraint.  */
           size_t blcm_max = MIN (SIZE_MAX, SSIZE_MAX);
           size_t blcm = buffer_lcm (io_blksize (src_open_sb), buf_size,
                                     blcm_max);