aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/filelayout/filelayout.c
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-06-13 11:02:25 -0400
committerTom Haynes <loghyr@primarydata.com>2015-02-03 14:06:37 -0500
commit46a5ab4754cad6aeefd96feae8ba65db8655e1af (patch)
tree3f9c1ea1e51c00a50fa33d033766abe32bc031ef /fs/nfs/filelayout/filelayout.c
parent2c4b131dea469e4df5bd59ccb490063b69e06155 (diff)
nfs: allow to specify cred in nfs_initiate_pgio
so that flexfile layout client can pass in DS credential instead of using user cred, which will be done in the next patch. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
Diffstat (limited to 'fs/nfs/filelayout/filelayout.c')
-rw-r--r--fs/nfs/filelayout/filelayout.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index e5a3c5b1398f..bfa8547eb2d6 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -501,8 +501,9 @@ filelayout_read_pagelist(struct nfs_pgio_header *hdr)
501 hdr->mds_offset = offset; 501 hdr->mds_offset = offset;
502 502
503 /* Perform an asynchronous read to ds */ 503 /* Perform an asynchronous read to ds */
504 nfs_initiate_pgio(ds_clnt, hdr, NFS_PROTO(hdr->inode), 504 nfs_initiate_pgio(ds_clnt, hdr, hdr->cred,
505 &filelayout_read_call_ops, 0, RPC_TASK_SOFTCONN); 505 NFS_PROTO(hdr->inode), &filelayout_read_call_ops,
506 0, RPC_TASK_SOFTCONN);
506 return PNFS_ATTEMPTED; 507 return PNFS_ATTEMPTED;
507} 508}
508 509
@@ -542,9 +543,9 @@ filelayout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
542 hdr->args.offset = filelayout_get_dserver_offset(lseg, offset); 543 hdr->args.offset = filelayout_get_dserver_offset(lseg, offset);
543 544
544 /* Perform an asynchronous write */ 545 /* Perform an asynchronous write */
545 nfs_initiate_pgio(ds_clnt, hdr, NFS_PROTO(hdr->inode), 546 nfs_initiate_pgio(ds_clnt, hdr, hdr->cred,
546 &filelayout_write_call_ops, sync, 547 NFS_PROTO(hdr->inode), &filelayout_write_call_ops,
547 RPC_TASK_SOFTCONN); 548 sync, RPC_TASK_SOFTCONN);
548 return PNFS_ATTEMPTED; 549 return PNFS_ATTEMPTED;
549} 550}
550 551