struct {
struct nfs4_layoutreturn_args arg;
struct nfs4_layoutreturn_res res;
+ struct nfs4_xdr_opaque_data ld_private;
u32 roc_barrier;
bool roc;
} lr;
if (IS_ERR(calldata->arg.seqid))
goto out_free_calldata;
calldata->arg.fmode = 0;
+ calldata->lr.arg.ld_private = &calldata->lr.ld_private;
calldata->res.fattr = &calldata->fattr;
calldata->res.seqid = calldata->arg.seqid;
calldata->res.server = server;
struct {
struct nfs4_layoutreturn_args arg;
struct nfs4_layoutreturn_res res;
+ struct nfs4_xdr_opaque_data ld_private;
u32 roc_barrier;
bool roc;
} lr;
data->res.fattr = &data->fattr;
data->res.server = server;
data->res.lr_ret = -NFS4ERR_NOMATCHING_LAYOUT;
+ data->lr.arg.ld_private = &data->lr.ld_private;
nfs_fattr_init(data->res.fattr);
data->timestamp = jiffies;
data->rpc_status = 0;
nfs4_sequence_free_slot(&lrp->res.seq_res);
pnfs_put_layout_hdr(lrp->args.layout);
nfs_iput_and_deactive(lrp->inode);
+ if (lrp->ld_private.ops && lrp->ld_private.ops->free)
+ lrp->ld_private.ops->free(&lrp->ld_private);
kfree(calldata);
dprintk("<-- %s\n", __func__);
}
spin_lock(&args->inode->i_lock);
encode_nfs4_stateid(xdr, &args->stateid);
spin_unlock(&args->inode->i_lock);
- if (lr_ops->encode_layoutreturn)
+ if (args->ld_private->ops && args->ld_private->ops->encode)
+ args->ld_private->ops->encode(xdr, args, args->ld_private);
+ else if (lr_ops->encode_layoutreturn)
lr_ops->encode_layoutreturn(xdr, args);
else
encode_uint32(xdr, 0);
}
pnfs_init_layoutreturn_args(&lrp->args, lo, stateid, iomode);
+ lrp->args.ld_private = &lrp->ld_private;
lrp->clp = NFS_SERVER(ino)->nfs_client;
lrp->cred = lo->plh_lc_cred;
struct pnfs_layout_range range;
nfs4_stateid stateid;
__u32 layout_type;
+ struct nfs4_xdr_opaque_data *ld_private;
};
struct nfs4_layoutreturn_res {
struct nfs_client *clp;
struct inode *inode;
int rpc_status;
+ struct nfs4_xdr_opaque_data ld_private;
};
#define PNFS_LAYOUTSTATS_MAXSIZE 256