bugGNU Core Utilities - Bugs: bug #17903, cp/mv only read/write 512 byte...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17903: cp/mv only read/write 512 byte blocks when filesystem blksize > 4MB

Submitted by:  Tony Ernst <tonyernst>
Submitted on:  Mon 02 Oct 2006 08:29:49 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 04 Oct 2006 06:14:03 AM UTC, comment #2:

Fixed as described in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00047.html>.

Paul Eggert <eggert>
Project Administrator
Mon 02 Oct 2006 08:39:29 PM UTC, comment #1:

I am attaching a patch against CVS that reverses the change (described above) that caused this problem.

If you don't want to totally remove it, perhaps it could be special cased somehow to only use the 4MB hack on HP-UX builds?

Tony Ernst <tonyernst>
Mon 02 Oct 2006 08:29:49 PM UTC, original submission:

A user is complaining about serious performance problems after upgrading their system. I found that this was due to the following change in the coreutils source file system.h:

coreutils-4.5.3:

#else /* HAVE_STRUCT_STAT_ST_BLOCKS */
/* Some systems, like Sequents, return st_blksize of 0 on pipes. */
# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \
? (statbuf).st_blksize : DEV_BSIZE)

coreutils-5.2.1:

#else /* HAVE_STRUCT_STAT_ST_BLOCKS */
/* Some systems, like Sequents, return st_blksize of 0 on pipes.
Also, when running `rsh hpux11-system cat any-file', cat would
determine that the output stream had an st_blksize of 2147421096.
So here we arbitrarily limit the `optimal' block size to 4MB.
If anyone knows of a system for which the legitimate value for
st_blksize can exceed 4MB, please report it as a bug in this code. */
# define ST_BLKSIZE(statbuf) ((0 < (statbuf).st_blksize \
&& (statbuf).st_blksize <= (1 << 22)) /* 4MB */ \
? (statbuf).st_blksize : DEV_BSIZE)

XFS filesystems can have legitimate st_blksize values that greatly exceed 4MB.

In the case of the user I referred to above, their st_blksize was 6MB. With coreutils-4.5.3, they saw 6MB reads/writes. With coreutils-5.2.1, the reads/writes were all 512-bytes.

Tony Ernst <tonyernst>

 

Attached Files
file #10887:  coreutils-st_blksize.patch added by tonyernst (1KiB - text/x-patch - Patch to remove artificial 4MB st_blksize limitation.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 04 Oct 2006 06:14:03 AM UTCeggertStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Mon 02 Oct 2006 08:39:29 PM UTCtonyernstAttached File-=>Added coreutils-st_blksize.patch, #10887

Back to the top


Powered by Savane 3.1-cleanup1