diff options
| author | Siddheshwar Mahesh <Siddheshwar.Mahesh@Sun.COM> | 2009-06-05 15:01:56 -0500 |
|---|---|---|
| committer | Siddheshwar Mahesh <Siddheshwar.Mahesh@Sun.COM> | 2009-06-05 15:01:56 -0500 |
| commit | ed629aef897f4494e9359e52811ca81d4b278489 (patch) | |
| tree | f8a9e6a89bd374c422956352dbd610d9df1b01f7 /usr/src/uts/common/fs/nfs/nfs_xdr.c | |
| parent | b25e2337574c465b86a1b0cc0dbc78f14aa4eb03 (diff) | |
| download | illumos-joyent-ed629aef897f4494e9359e52811ca81d4b278489.tar.gz | |
6844040 NFSv2 WRITEs over RDMA fail to unregister data buffers
6845259 nfsd should honor the '-p proto' and '-t provider'options
6197327 Client mounts should fail gracefully when RDMA is disabled
Diffstat (limited to 'usr/src/uts/common/fs/nfs/nfs_xdr.c')
| -rw-r--r-- | usr/src/uts/common/fs/nfs/nfs_xdr.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs_xdr.c b/usr/src/uts/common/fs/nfs/nfs_xdr.c index 2f461a1d8a..4e37903f5c 100644 --- a/usr/src/uts/common/fs/nfs/nfs_xdr.c +++ b/usr/src/uts/common/fs/nfs/nfs_xdr.c @@ -144,9 +144,30 @@ xdr_writeargs(XDR *xdrs, struct nfswriteargs *wa) wa->wa_begoff = IXDR_GET_U_INT32(ptr); wa->wa_offset = IXDR_GET_U_INT32(ptr); wa->wa_totcount = IXDR_GET_U_INT32(ptr); - if (xdrs->x_ops == &xdrmblk_ops) + wa->wa_mblk = NULL; + wa->wa_data = NULL; + wa->wa_rlist = NULL; + wa->wa_conn = NULL; + if (xdrs->x_ops == &xdrmblk_ops) { return (xdrmblk_getmblk(xdrs, &wa->wa_mblk, &wa->wa_count)); + } else { + if (xdrs->x_ops == &xdrrdmablk_ops) { + if (xdrrdma_getrdmablk(xdrs, + &wa->wa_rlist, + &wa->wa_count, + &wa->wa_conn, + NFS_MAXDATA) == TRUE) + return (xdrrdma_read_from_client( + wa->wa_rlist, + &wa->wa_conn, + wa->wa_count)); + + wa->wa_rlist = NULL; + wa->wa_conn = NULL; + } + } + /* * It is just as efficient to xdr_bytes * an array of unknown length as to inline copy it. |
