Commit 4579d6b8 authored by Peng Tao's avatar Peng Tao Committed by Tom Haynes

nfs41: pass iomode through layoutreturn args

So that it is possible to return a specific iomode layouts.
Signed-off-by: default avatarPeng Tao <tao.peng@primarydata.com>
Signed-off-by: default avatarTom Haynes <Thomas.Haynes@primarydata.com>
parent aabff4dd
...@@ -2012,7 +2012,7 @@ encode_layoutreturn(struct xdr_stream *xdr, ...@@ -2012,7 +2012,7 @@ encode_layoutreturn(struct xdr_stream *xdr,
p = reserve_space(xdr, 16); p = reserve_space(xdr, 16);
*p++ = cpu_to_be32(0); /* reclaim. always 0 for now */ *p++ = cpu_to_be32(0); /* reclaim. always 0 for now */
*p++ = cpu_to_be32(args->layout_type); *p++ = cpu_to_be32(args->layout_type);
*p++ = cpu_to_be32(IOMODE_ANY); *p++ = cpu_to_be32(args->iomode);
*p = cpu_to_be32(RETURN_FILE); *p = cpu_to_be32(RETURN_FILE);
p = reserve_space(xdr, 16); p = reserve_space(xdr, 16);
p = xdr_encode_hyper(p, 0); p = xdr_encode_hyper(p, 0);
......
...@@ -914,6 +914,7 @@ _pnfs_return_layout(struct inode *ino) ...@@ -914,6 +914,7 @@ _pnfs_return_layout(struct inode *ino)
lrp->args.stateid = stateid; lrp->args.stateid = stateid;
lrp->args.layout_type = NFS_SERVER(ino)->pnfs_curr_ld->id; lrp->args.layout_type = NFS_SERVER(ino)->pnfs_curr_ld->id;
lrp->args.inode = ino; lrp->args.inode = ino;
lrp->args.iomode = IOMODE_ANY;
lrp->args.layout = lo; lrp->args.layout = lo;
lrp->clp = NFS_SERVER(ino)->nfs_client; lrp->clp = NFS_SERVER(ino)->nfs_client;
lrp->cred = lo->plh_lc_cred; lrp->cred = lo->plh_lc_cred;
......
...@@ -293,6 +293,7 @@ struct nfs4_layoutreturn_args { ...@@ -293,6 +293,7 @@ struct nfs4_layoutreturn_args {
struct nfs4_sequence_args seq_args; struct nfs4_sequence_args seq_args;
struct pnfs_layout_hdr *layout; struct pnfs_layout_hdr *layout;
struct inode *inode; struct inode *inode;
enum pnfs_iomode iomode;
nfs4_stateid stateid; nfs4_stateid stateid;
__u32 layout_type; __u32 layout_type;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment