diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-14 15:21:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-15 10:01:42 +0200 |
commit | 53da07e436df21f078de665d90442ee5c7166ab7 (patch) | |
tree | 0249d3ca4e181c677f243907a754dd1e8518bb36 /cpukit/libfs/src/nfsclient/src/nfs.c | |
parent | Filesystem: Add shared device IO support (diff) | |
download | rtems-53da07e436df21f078de665d90442ee5c7166ab7.tar.bz2 |
Filesystem: PR1255: Move offset update to handlers
It is now the responsibility of the read() and write() handler to update
the offset field of the IO descriptor (rtems_libio_t). This change
makes it possible to protect the IO descriptor from concurrent access by
per file locks.
Diffstat (limited to 'cpukit/libfs/src/nfsclient/src/nfs.c')
-rw-r--r-- | cpukit/libfs/src/nfsclient/src/nfs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/libfs/src/nfsclient/src/nfs.c b/cpukit/libfs/src/nfsclient/src/nfs.c index 1e25165bfc..95613c0222 100644 --- a/cpukit/libfs/src/nfsclient/src/nfs.c +++ b/cpukit/libfs/src/nfsclient/src/nfs.c @@ -2311,6 +2311,10 @@ static ssize_t nfs_file_read( } } while (count > 0); + if (rv > 0) { + iop->offset = offset; + } + return rv; } @@ -2419,6 +2423,8 @@ int e; node->age = nowSeconds(); + iop->offset += count; + return count; } |