In nfs_dir_read() count used before and after limiting?

Peter Dufault dufault at hda.com
Mon Sep 15 11:45:57 UTC 2014


On Sep 13, 2014, at 11:25 , Joel Sherrill <Joel.Sherrill at oarcorp.com> wrote:

>> If it's a bug for transfers to be larger than 4K when fa->blocksize=4K
>> I can look at that, that's easy to trap when it happens.
> 
> Speaking purely from a defensive programming stance with no knowledge of what is possible in NFS, I would put the trap in. It is a case the codes will do bad things if it happens. So it could be a case of this should never happen or this is an odd configuration the code does not support. Either way, better to detect and report than tromp on memory.

Because there is no buffer cache the transfer size in a read or write call is passed directly to the driver.  In particular, the RTEMS shell cp command uses 8K while the newlib stdio gets the underlying block size.  So in the RTEMS case you will get arbitrary sized reads and write calls to the NFS code.

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering




More information about the devel mailing list