Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title NFS falsely reports file size
Ref. No. QNX.000001431
Category(ies) Network
Issue We are using a QNX client and QNX server.  Between the two we are using NFS for file transfer and data sharing.

When the server wants the client to read a file, it sends a message telling the client the size of that file. The client  does a seek() to about 7.5MB into the file and read() is notified of an EOF, so the client waits 5 seconds and then tries again.  Why are we getting this error?
Solution There are a number things that could be causing this problem, a few of which could be the cache.  Try the following suggestions to avoid this being a problem.

1. Do a stat() before seek() to confirm file size.

2. Try reading and writing the first byte back to flush the client cache.

3. Have the client sleep for 6 seconds instead, cache can take up to 5 seconds to update.