#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 Apr 1, 2011 at 12:05:56 PM.
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 Jul 13, 2011 at 4:05:40 PM.
Fix bad use of nfs_evalpath_arg union

Download all attachments as: .zip

Change History (7)

Changed on Apr 1, 2011 at 12:05:56 PM 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 May 11, 2011 at 4:40:30 PM by strauman

Cc: strauman added

comment:2 Changed on May 11, 2011 at 4:42:09 PM 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 Jul 13, 2011 at 4:00:03 PM by strauman

Milestone: 4.114.10
Severity: normalmajor

Changed on Jul 13, 2011 at 4:05:40 PM by strauman

Attachment: nfs_patch_v1.diff added

Fix bad use of nfs_evalpath_arg union

comment:4 Changed on Jul 13, 2011 at 4:05:40 PM by strauman

attachments.isobsolete: 01

comment:5 Changed on Jul 13, 2011 at 6:08:08 PM 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.