Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#1775 closed defect (fixed)

NFS issues: read/write problems when requested bytes greater than nfsStBlksize. Failure to create files and symlinks.

Reported by: kevin.kirspel Owned by: Chris Johns
Priority: normal Milestone: 4.10
Component: fs Version: 4.10
Severity: major Keywords:
Cc: joel.sherrill@…, strauman@… Blocked By:
Blocking:

Description

In nfs_file_read() and nfs_file_write(), if the requested number of bytes to read/write is greater than nfsStBlksize the fragmented packets could be dropped by the device driver. The nfsStBlksize configuration variable is used to tell NFS the maximum fragmented packet size that the hardware can handle. Anything greater than this value would be dropped by the hardware. However, the nfs_file_read() and nfs_file_write() do not adhere to this limit. Adding a check to make sure the requested buffer size is not greater than nfsStBlksize is required.

There is also a bug in the nfs_do_evalpath() function related to the recent changes for 4.10. A nfs_evalpath_arg union was created to pass data to nfs_do_evalpath(), but was not being used in all instances within the function.

A patch is attached to address these two issues.

Attachments (2)

nfs_patch.diff (1004 bytes) - added by kevin.kirspel on 04/01/11 at 12:05:56.
Adds a check for nfsStBlksize on the buffer size for nfs_file_read() and nfs_file_write(). Corrects usage of nfs_evalpath_arg in nfs_do_evalpath().
nfs_patch_v1.diff (485 bytes) - added by strauman on 07/13/11 at 16:05:40.
Fix bad use of nfs_evalpath_arg union

Download all attachments as: .zip

Change History (7)

Changed on 04/01/11 at 12:05:56 by kevin.kirspel

Attachment: nfs_patch.diff added

Adds a check for nfsStBlksize on the buffer size for nfs_file_read() and nfs_file_write(). Corrects usage of nfs_evalpath_arg in nfs_do_evalpath().

comment:1 Changed on 05/11/11 at 16:40:30 by strauman

Cc: strauman added

comment:2 Changed on 05/11/11 at 16:42:09 by strauman

Summary: NFS read/write issues when requested bytes greater than nfsStBlksize.NFS issues: read/write problems when requested bytes greater than nfsStBlksize. Failure to create files and symlinks.

comment:3 Changed on 07/13/11 at 16:00:03 by strauman

Milestone: 4.114.10
Severity: normalmajor

Changed on 07/13/11 at 16:05:40 by strauman

Attachment: nfs_patch_v1.diff added

Fix bad use of nfs_evalpath_arg union

comment:4 Changed on 07/13/11 at 16:05:40 by strauman

attachments.isobsolete: 01

comment:5 Changed on 07/13/11 at 18:08:08 by Joel Sherrill

Resolution: fixed
Status: newclosed, joel.sherrill@oarcorp.com

Patch committed to 4.10 and head. Closing.

Note: See TracTickets for help on using tickets.