From: Benny Halevy <bhalevy@panasas.com>
To: pnfs@linux-nfs.org
Cc: trond.myklebust@fys.uio.no, linux-nfs@vger.kernel.org
Subject: Re: [pnfs] [RFC 13/85] nfs41: use ptr to rpc procedures via struct nfs_client
Date: Mon, 17 Nov 2008 15:40:24 +0200 [thread overview]
Message-ID: <49217448.6020904@panasas.com> (raw)
In-Reply-To: <1226348405-7533-1-git-send-email-bhalevy@panasas.com>
On Nov. 10, 2008, 22:20 +0200, Benny Halevy <bhalevy@panasas.com> wrote:
> To support heterogenuous mount minor version, use the ptr to the effective
> rpc procedures table via nfs_client->cl_rpcclient->cl_procinfo rather than
> a global one.
>
> nfs4_proc() is a static inline helper to get the rpc procedure
> given a struct nfs_client * and the procedure index.
>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
review 11-14: this patch should be dropped since there's no nfs41_prcedures
and no need for nfs_version41 (when we take the minorversion field out of
struct rpc_version)
> ---
> fs/nfs/internal.h | 5 ---
> fs/nfs/nfs4_fs.h | 1 -
> fs/nfs/nfs4proc.c | 88 ++++++++++++++++++++++++++-------------------
> fs/nfs/nfs4xdr.c | 22 +++++++++--
> include/linux/nfs_fs_sb.h | 9 +++++
> include/linux/nfs_xdr.h | 3 ++
> 6 files changed, 81 insertions(+), 47 deletions(-)
>
> diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
> index b423422..8386e99 100644
> --- a/fs/nfs/internal.h
> +++ b/fs/nfs/internal.h
> @@ -134,11 +134,6 @@ extern __be32 *nfs3_decode_dirent(__be32 *, struct nfs_entry *, int);
> extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus);
> #endif
>
> -/* nfs4proc.c */
> -#ifdef CONFIG_NFS_V4
> -extern struct rpc_procinfo nfs4_procedures[];
> -#endif
> -
> /* dir.c */
> extern int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask);
>
> diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
> index ea79064..5fb7382 100644
> --- a/fs/nfs/nfs4_fs.h
> +++ b/fs/nfs/nfs4_fs.h
> @@ -226,7 +226,6 @@ extern const nfs4_stateid zero_stateid;
>
> /* nfs4xdr.c */
> extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus);
> -extern struct rpc_procinfo nfs4_procedures[];
>
> struct nfs4_mount_data;
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 0256c97..ef3370f 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -762,7 +762,8 @@ static int _nfs4_proc_open_confirm(struct nfs4_opendata *data)
> struct nfs_server *server = NFS_SERVER(data->dir->d_inode);
> struct rpc_task *task;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_CONFIRM],
> + .rpc_proc = nfs4_proc(server->nfs_client,
> + NFSPROC4_CLNT_OPEN_CONFIRM),
> .rpc_argp = &data->c_arg,
> .rpc_resp = &data->c_res,
> .rpc_cred = data->owner->so_cred,
> @@ -823,7 +824,8 @@ static void nfs4_open_prepare(struct rpc_task *task, void *calldata)
> data->o_arg.id = sp->so_owner_id.id;
> data->o_arg.clientid = sp->so_client->cl_clientid;
> if (data->o_arg.claim == NFS4_OPEN_CLAIM_PREVIOUS) {
> - task->tk_msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_NOATTR];
> + task->tk_msg.rpc_proc = nfs4_proc(sp->so_client,
> + NFSPROC4_CLNT_OPEN_NOATTR);
> nfs_copy_fh(&data->o_res.fh, data->o_arg.fh);
> }
> data->timestamp = jiffies;
> @@ -899,7 +901,7 @@ static int _nfs4_proc_open(struct nfs4_opendata *data)
> struct nfs_openres *o_res = &data->o_res;
> struct rpc_task *task;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_OPEN),
> .rpc_argp = o_arg,
> .rpc_resp = o_res,
> .rpc_cred = data->owner->so_cred,
> @@ -1153,7 +1155,8 @@ static int _nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
> .server = server,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETATTR],
> + .rpc_proc = nfs4_proc(server->nfs_client,
> + NFSPROC4_CLNT_SETATTR),
> .rpc_argp = &arg,
> .rpc_resp = &res,
> .rpc_cred = cred,
> @@ -1271,10 +1274,12 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
> }
> nfs_fattr_init(calldata->res.fattr);
> if (test_bit(NFS_O_RDONLY_STATE, &state->flags) != 0) {
> - task->tk_msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_DOWNGRADE];
> + task->tk_msg.rpc_proc = nfs4_proc(state->owner->so_client,
> + NFSPROC4_CLNT_OPEN_DOWNGRADE);
> calldata->arg.open_flags = FMODE_READ;
> } else if (test_bit(NFS_O_WRONLY_STATE, &state->flags) != 0) {
> - task->tk_msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_DOWNGRADE];
> + task->tk_msg.rpc_proc = nfs4_proc(state->owner->so_client,
> + NFSPROC4_CLNT_OPEN_DOWNGRADE);
> calldata->arg.open_flags = FMODE_WRITE;
> }
> calldata->timestamp = jiffies;
> @@ -1305,7 +1310,7 @@ int nfs4_do_close(struct path *path, struct nfs4_state *state, int wait)
> struct nfs4_state_owner *sp = state->owner;
> struct rpc_task *task;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CLOSE],
> + .rpc_proc = nfs4_proc(sp->so_client, NFSPROC4_CLNT_CLOSE),
> .rpc_cred = state->owner->so_cred,
> };
> struct rpc_task_setup task_setup_data = {
> @@ -1472,7 +1477,7 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
> {
> struct nfs4_server_caps_res res = {};
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SERVER_CAPS],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_SERVER_CAPS),
> .rpc_argp = fhandle,
> .rpc_resp = &res,
> };
> @@ -1516,7 +1521,7 @@ static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
> .fh = fhandle,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOOKUP_ROOT],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_LOOKUP_ROOT),
> .rpc_argp = &args,
> .rpc_resp = &res,
> };
> @@ -1605,7 +1610,7 @@ static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
> .server = server,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETATTR],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_GETATTR),
> .rpc_argp = &args,
> .rpc_resp = &res,
> };
> @@ -1687,7 +1692,7 @@ static int _nfs4_proc_lookupfh(struct nfs_server *server, const struct nfs_fh *d
> .fh = fhandle,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOOKUP],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_LOOKUP),
> .rpc_argp = &args,
> .rpc_resp = &res,
> };
> @@ -1756,7 +1761,7 @@ static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry
> .fattr = &fattr,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_ACCESS],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_ACCESS),
> .rpc_argp = &args,
> .rpc_resp = &res,
> .rpc_cred = entry->cred,
> @@ -1834,6 +1839,7 @@ static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
> static int _nfs4_proc_readlink(struct inode *inode, struct page *page,
> unsigned int pgbase, unsigned int pglen)
> {
> + struct nfs_server *server = NFS_SERVER(inode);
> struct nfs4_readlink args = {
> .fh = NFS_FH(inode),
> .pgbase = pgbase,
> @@ -1841,7 +1847,7 @@ static int _nfs4_proc_readlink(struct inode *inode, struct page *page,
> .pages = &page,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READLINK],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_READLINK),
> .rpc_argp = &args,
> .rpc_resp = NULL,
> };
> @@ -1932,7 +1938,7 @@ static int _nfs4_proc_remove(struct inode *dir, struct qstr *name)
> .server = server,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_REMOVE),
> .rpc_argp = &args,
> .rpc_resp = &res,
> };
> @@ -1967,7 +1973,7 @@ static void nfs4_proc_unlink_setup(struct rpc_message *msg, struct inode *dir)
>
> args->bitmask = server->attr_bitmask;
> res->server = server;
> - msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVE];
> + msg->rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_REMOVE);
> }
>
> static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir)
> @@ -1999,7 +2005,7 @@ static int _nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name,
> .new_fattr = &new_fattr,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENAME],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_RENAME),
> .rpc_argp = &arg,
> .rpc_resp = &res,
> };
> @@ -2048,7 +2054,7 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *
> .dir_attr = &dir_attr,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LINK],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_LINK),
> .rpc_argp = &arg,
> .rpc_resp = &res,
> };
> @@ -2096,7 +2102,8 @@ static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
> if (data != NULL) {
> struct nfs_server *server = NFS_SERVER(dir);
>
> - data->msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CREATE];
> + data->msg.rpc_proc = nfs4_proc(server->nfs_client,
> + NFSPROC4_CLNT_CREATE);
> data->msg.rpc_argp = &data->arg;
> data->msg.rpc_resp = &data->res;
> data->arg.dir_fh = NFS_FH(dir);
> @@ -2145,7 +2152,8 @@ static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
> if (data == NULL)
> goto out;
>
> - data->msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SYMLINK];
> + data->msg.rpc_proc = nfs4_proc(NFS_SERVER(dir)->nfs_client,
> + NFSPROC4_CLNT_SYMLINK);
> data->arg.u.symlink.pages = &page;
> data->arg.u.symlink.len = len;
>
> @@ -2204,6 +2212,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
> u64 cookie, struct page *page, unsigned int count, int plus)
> {
> struct inode *dir = dentry->d_inode;
> + struct nfs_server *server = NFS_SERVER(dir);
> struct nfs4_readdir_arg args = {
> .fh = NFS_FH(dir),
> .pages = &page,
> @@ -2213,7 +2222,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
> };
> struct nfs4_readdir_res res;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READDIR],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_READDIR),
> .rpc_argp = &args,
> .rpc_resp = &res,
> .rpc_cred = cred,
> @@ -2305,7 +2314,7 @@ static int _nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
> .bitmask = server->attr_bitmask,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_STATFS],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_STATFS),
> .rpc_argp = &args,
> .rpc_resp = fsstat,
> };
> @@ -2334,7 +2343,7 @@ static int _nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
> .bitmask = server->attr_bitmask,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FSINFO],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_FSINFO),
> .rpc_argp = &args,
> .rpc_resp = fsinfo,
> };
> @@ -2369,7 +2378,7 @@ static int _nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle
> .bitmask = server->attr_bitmask,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_PATHCONF],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_PATHCONF),
> .rpc_argp = &args,
> .rpc_resp = pathconf,
> };
> @@ -2415,8 +2424,10 @@ static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data)
>
> static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg)
> {
> + struct nfs_server *server = NFS_SERVER(data->inode);
> +
> data->timestamp = jiffies;
> - msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ];
> + msg->rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_READ);
> }
>
> static int nfs4_write_done(struct rpc_task *task, struct nfs_write_data *data)
> @@ -2442,7 +2453,7 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
> data->res.server = server;
> data->timestamp = jiffies;
>
> - msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_WRITE];
> + msg->rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_WRITE);
> }
>
> static int nfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data)
> @@ -2463,7 +2474,7 @@ static void nfs4_proc_commit_setup(struct nfs_write_data *data, struct rpc_messa
>
> data->args.bitmask = server->attr_bitmask;
> data->res.server = server;
> - msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMMIT];
> + msg->rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_COMMIT);
> }
>
> /*
> @@ -2497,7 +2508,7 @@ static const struct rpc_call_ops nfs4_renew_ops = {
> int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred)
> {
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW],
> + .rpc_proc = nfs4_proc(clp, NFSPROC4_CLNT_RENEW),
> .rpc_argp = clp,
> .rpc_cred = cred,
> };
> @@ -2509,7 +2520,7 @@ int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred)
> int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred)
> {
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW],
> + .rpc_proc = nfs4_proc(clp, NFSPROC4_CLNT_RENEW),
> .rpc_argp = clp,
> .rpc_cred = cred,
> };
> @@ -2629,8 +2640,9 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
> };
> size_t resp_len = buflen;
> void *resp_buf;
> + struct nfs_server *server = NFS_SERVER(inode);
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETACL],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_GETACL),
> .rpc_argp = &args,
> .rpc_resp = &resp_len,
> };
> @@ -2713,7 +2725,7 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
> .acl_len = buflen,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETACL],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_SETACL),
> .rpc_argp = &arg,
> .rpc_resp = NULL,
> };
> @@ -2853,7 +2865,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po
> .sc_prog = program,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID],
> + .rpc_proc = nfs4_proc(clp, NFSPROC4_CLNT_SETCLIENTID),
> .rpc_argp = &setclientid,
> .rpc_resp = clp,
> .rpc_cred = cred,
> @@ -2902,7 +2914,7 @@ static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cre
> {
> struct nfs_fsinfo fsinfo;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID_CONFIRM],
> + .rpc_proc = nfs4_proc(clp, NFSPROC4_CLNT_SETCLIENTID_CONFIRM),
> .rpc_argp = clp,
> .rpc_resp = &fsinfo,
> .rpc_cred = cred,
> @@ -2974,7 +2986,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co
> struct nfs_server *server = NFS_SERVER(inode);
> struct rpc_task *task;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_DELEGRETURN],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_DELEGRETURN),
> .rpc_cred = cred,
> };
> struct rpc_task_setup task_setup_data = {
> @@ -3066,7 +3078,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock
> .denied = request,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOCKT],
> + .rpc_proc = nfs4_proc(clp, NFSPROC4_CLNT_LOCKT),
> .rpc_argp = &arg,
> .rpc_resp = &res,
> .rpc_cred = state->owner->so_cred,
> @@ -3218,7 +3230,8 @@ static struct rpc_task *nfs4_do_unlck(struct file_lock *fl,
> {
> struct nfs4_unlockdata *data;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOCKU],
> + .rpc_proc = nfs4_proc(NFS_SERVER(lsp->ls_state->inode)->nfs_client,
> + NFSPROC4_CLNT_LOCKU),
> .rpc_cred = ctx->cred,
> };
> struct rpc_task_setup task_setup_data = {
> @@ -3405,7 +3418,8 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f
> struct nfs4_lockdata *data;
> struct rpc_task *task;
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOCK],
> + .rpc_proc = nfs4_proc(NFS_SERVER(state->inode)->nfs_client,
> + NFSPROC4_CLNT_LOCK),
> .rpc_cred = state->owner->so_cred,
> };
> struct rpc_task_setup task_setup_data = {
> @@ -3648,7 +3662,7 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
> .bitmask = bitmask,
> };
> struct rpc_message msg = {
> - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS],
> + .rpc_proc = nfs4_proc(server->nfs_client, NFSPROC4_CLNT_FS_LOCATIONS),
> .rpc_argp = &args,
> .rpc_resp = fs_locations,
> };
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index c1ff9c9..30addf4 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -4922,11 +4922,25 @@ struct rpc_procinfo nfs4_procedures[] = {
> PROC(FS_LOCATIONS, enc_fs_locations, dec_fs_locations),
> };
>
> -struct rpc_version nfs_version4 = {
> - .number = 4,
> - .nrprocs = ARRAY_SIZE(nfs4_procedures),
> - .procs = nfs4_procedures
> +#if defined(CONFIG_NFS_V4_1)
> +struct rpc_procinfo nfs41_procedures[] = {
> };
> +#endif /* CONFIG_NFS_V4_1 */
> +
> +struct rpc_version nfs_version4 = {
> + .number = 4,
> + .nrprocs = ARRAY_SIZE(nfs4_procedures),
> + .procs = nfs4_procedures
> +};
> +
> +#ifdef CONFIG_NFS_V4_1
> +struct rpc_version nfs_version41 = {
> + .number = 4,
> + .nrprocs = ARRAY_SIZE(nfs41_procedures),
> + .procs = nfs41_procedures
> +};
> +
> +#endif /* CONFIG_NFS_V4_1 */
>
> /*
> * Local variables:
> diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
> index 8379dd5..c5cb574 100644
> --- a/include/linux/nfs_fs_sb.h
> +++ b/include/linux/nfs_fs_sb.h
> @@ -73,6 +73,15 @@ struct nfs_client {
> #endif /* CONFIG_NFS_V4 */
> };
>
> +#ifdef CONFIG_NFS_V4
> +static inline struct rpc_procinfo *
> +nfs4_proc(struct nfs_client *clp, int idx)
> +{
> + struct rpc_procinfo *procs = clp->cl_rpcclient->cl_procinfo;
> + return &procs[idx];
> +}
> +#endif /* CONFIG_NFS_V4 */
> +
> /*
> * NFS client parameters stored in the superblock.
> */
> diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
> index 1d6f09a..743b5ac 100644
> --- a/include/linux/nfs_xdr.h
> +++ b/include/linux/nfs_xdr.h
> @@ -969,6 +969,9 @@ extern const struct nfs_rpc_ops nfs_v4_clientops;
> extern const struct nfs_rpc_ops nfs_v40_clientops;
> extern const struct nfs_rpc_ops nfs_v41_clientops;
> extern const struct nfs_rpc_ops *nfsv4_minorversion_clientops[];
> +extern struct rpc_version *nfs4_minorversions[];
> +extern struct rpc_procinfo *nfs4_minorversion_procedures[];
> +
> extern struct rpc_version nfs_version2;
> extern struct rpc_version nfs_version3;
> extern struct rpc_version nfs_version4;
next prev parent reply other threads:[~2008-11-17 13:40 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 19:57 [RFC 0/85] nfs41 client patches for review Benny Halevy
2008-11-10 20:05 ` [RFC 03/85] nfs: remove incorrect usage of nfs4 compound response hdr.status Benny Halevy
2008-11-17 13:24 ` [pnfs] " Benny Halevy
2008-11-10 20:18 ` [RFC 04/85] FIXME: NFS: Increment operation number in each encode_* routine Benny Halevy
2008-11-17 13:26 ` [pnfs] " Benny Halevy
2008-11-10 20:18 ` [RFC 05/85] nfs41: Add Kconfig symbols for NFSv4.1 Benny Halevy
2008-11-17 13:27 ` [pnfs] " Benny Halevy
2008-11-10 20:18 ` [RFC 06/85] nfs41: common protocol definitions Benny Halevy
2008-11-17 13:28 ` [pnfs] " Benny Halevy
2008-11-10 20:19 ` [RFC 07/85] nfs41: define NFS4_MAX_MINOR_VERSION based on CONFIG_NFS_V4_1 Benny Halevy
2008-11-10 20:19 ` [RFC 08/85] nfs41: client xdr definitions Benny Halevy
2008-11-17 13:31 ` [pnfs] " Benny Halevy
2008-11-10 20:19 ` [RFC 09/85] nfs41: add mount command option minorvers Benny Halevy
2008-11-17 13:34 ` [pnfs] " Benny Halevy
2008-11-10 20:19 ` [RFC 10/85] nfs41: struct nfs_server minorversion Benny Halevy
2008-11-17 13:34 ` [pnfs] " Benny Halevy
2008-11-10 20:19 ` [RFC 11/85] nfs41: nfs_client.cl_minorversion Benny Halevy
2008-11-17 13:37 ` [pnfs] " Benny Halevy
2008-11-10 20:19 ` [RFC 12/85] nfs41: set nfs_client rpc_ops based on minorversion Benny Halevy
2008-11-10 20:20 ` [RFC 13/85] nfs41: use ptr to rpc procedures via struct nfs_client Benny Halevy
2008-11-17 13:40 ` Benny Halevy [this message]
2008-11-10 20:20 ` [RFC 14/85] nfs41: sunrpc: support minorversion for rpc_clnt version table Benny Halevy
2008-11-17 13:41 ` [pnfs] " Benny Halevy
2008-11-10 20:20 ` [RFC 15/85] nfs41: Proper initialization of nfs_client_initdata.rpc_ops Benny Halevy
2008-11-17 13:41 ` [pnfs] " Benny Halevy
2008-11-10 20:20 ` [RFC 16/85] nfs41: pass recovery status from reclaimer kthread up to nfs4_wait_clnt_recover Benny Halevy
2008-11-17 13:42 ` [pnfs] " Benny Halevy
2008-11-10 20:20 ` [RFC 17/85] nfs41: fallback to lower minorversion if nfs4_create_server fails Benny Halevy
2008-11-17 13:43 ` [pnfs] " Benny Halevy
2008-11-10 20:20 ` [RFC 18/85] nfs41: sessions client infrastructure Benny Halevy
2008-11-17 13:44 ` [pnfs] " Benny Halevy
2008-11-10 20:21 ` [RFC 19/85] nfs41: share client sessions across mounts Benny Halevy
2008-11-17 13:45 ` [pnfs] " Benny Halevy
2008-11-10 20:21 ` [RFC 20/85] nfs41: slot table init and destroy Benny Halevy
2008-11-17 13:46 ` [pnfs] " Benny Halevy
2008-11-10 20:21 ` [RFC 21/85] nfs41: find slot Benny Halevy
2008-11-17 13:46 ` [pnfs] " Benny Halevy
2008-11-10 20:21 ` [RFC 22/85] nfs41: free slot Benny Halevy
2008-11-17 13:47 ` [pnfs] " Benny Halevy
2008-11-10 20:21 ` [RFC 23/85] nfs41: minorversion support for xdr Benny Halevy
2008-11-17 13:48 ` [pnfs] " Benny Halevy
2008-11-10 20:22 ` [RFC 24/85] nfs41: stubs for nfs41 procedures Benny Halevy
2008-11-10 20:22 ` [RFC 25/85] nfs41: make nfs4_wait_bit_killable public Benny Halevy
2008-11-10 20:22 ` [RFC 26/85] nfs41: introduce nfs4_call_sync Benny Halevy
2008-11-17 13:49 ` [pnfs] " Benny Halevy
2008-11-10 20:22 ` [RFC 27/85] nfs41: nfs4_setup_sequence Benny Halevy
2008-11-17 13:49 ` [pnfs] " Benny Halevy
2008-11-10 20:22 ` [RFC 28/85] nfs41: setup_sequence method Benny Halevy
2008-11-10 20:23 ` [RFC 02/85] nfs: return compound hdr.status when there are no op replies Benny Halevy
2008-11-10 20:23 ` [RFC 29/85] nfs41: nfs41_sequence_done Benny Halevy
2008-11-17 13:50 ` [pnfs] " Benny Halevy
2008-11-10 20:23 ` [RFC 30/85] nfs41: nfs41_call_sync_done Benny Halevy
2008-11-10 20:23 ` [RFC 31/85] nfs41: separate free slot from sequence done Benny Halevy
2008-11-10 20:23 ` [RFC 32/85] nfs41: sequence setup/done support Benny Halevy
2008-11-10 20:23 ` [RFC 33/85] nfs41: Support sessions with O_DIRECT Benny Halevy
2008-11-10 20:24 ` [RFC 34/85] nfs41: exchange_id operation Benny Halevy
2008-11-10 20:24 ` [RFC 35/85] nfs41: get_lease_time Benny Halevy
2008-11-10 20:24 ` [RFC 36/85] nfs41: create_session operation Benny Halevy
2008-11-10 20:24 ` [RFC 37/85] nfs41: destroy_session operation Benny Halevy
2008-11-10 20:24 ` [RFC 38/85] nfs41: sequence operation Benny Halevy
2008-11-10 20:25 ` [RFC 39/85] nfs41: session recovery infrastructure Benny Halevy
2008-11-10 20:25 ` [RFC 40/85] nfs41: schedule async session reset Benny Halevy
2008-11-10 20:25 ` [RFC 41/85] nfs41: lease renewal Benny Halevy
2008-11-10 20:25 ` [RFC 42/85] nfs41: sunrpc: Export the call prepare state for session reset Benny Halevy
2008-11-10 20:25 ` [RFC 43/85] nfs41: use rpc prepare call " Benny Halevy
2008-11-11 8:01 ` [pnfs] [RFC 43/85] nfs41: use rpc prepare call state for sessionreset Halevy, Benny
2008-11-10 20:25 ` [RFC 44/85] nfs41: kick start nfs41 session recovery when handling errors Benny Halevy
2008-11-10 20:26 ` [RFC 45/85] nfs41: start session recovery from nfs4_setup_sequence Benny Halevy
2008-11-10 20:26 ` [RFC 46/85] nfs41: introduce get_state_renewal_cred Benny Halevy
2008-11-10 20:26 ` [RFC 47/85] nfs41: get cred in exchange_id when cred arg is NULL Benny Halevy
2008-11-10 20:26 ` [RFC 48/85] nfs41: establish sessions-based clientid Benny Halevy
2008-11-10 20:26 ` [RFC 49/85] nfs41: recover lease in _nfs4_lookup_root Benny Halevy
2008-11-17 13:51 ` [pnfs] " Benny Halevy
2008-11-10 20:27 ` [RFC 50/85] nfs41: schedule state recovery on BAD or DEAD session Benny Halevy
2008-11-10 20:27 ` [RFC 51/85] nfs41: state reclaimer renew lease error handling Benny Halevy
2008-11-10 20:27 ` [RFC 52/85] nfs41: increment_{open,lock}_seqid Benny Halevy
2008-11-10 20:27 ` [RFC 53/85] nfs41: Add ability to read RPC call direction on TCP stream Benny Halevy
2008-11-17 13:52 ` [pnfs] " Benny Halevy
2008-11-10 20:27 ` [RFC 54/85] nfs41: Skip past the RPC call direction Benny Halevy
2008-11-10 20:27 ` [RFC 55/85] nfs41: Refactor NFSv4 callback service Benny Halevy
2008-11-10 20:28 ` [RFC 56/85] nfs41: client callback structures Benny Halevy
2008-11-10 20:28 ` [RFC 57/85] nfs41: Initialize new rpc_xprt callback related fields Benny Halevy
2008-11-10 20:28 ` [RFC 58/85] nfs41: New backchannel helper routines Benny Halevy
2008-11-10 20:28 ` [RFC 59/85] nfs41: New include/linux/sunrpc/bc_xprt.h Benny Halevy
2008-11-10 20:28 ` [RFC 60/85] nfs41: New xs_tcp_read_data() Benny Halevy
2008-11-10 20:29 ` [RFC 61/85] nfs41: Add backchannel processing support to RPC state machine Benny Halevy
2008-11-17 13:53 ` [pnfs] " Benny Halevy
2008-11-10 20:29 ` [RFC 62/85] nfs41: Backchannel callback service helper routines Benny Halevy
2008-11-10 20:29 ` [RFC 63/85] FIXME: nfs41: sunrpc: handle clnt==NULL in call_status Benny Halevy
2008-11-10 20:29 ` [RFC 64/85] nfs41: Refactor svc_process() Benny Halevy
2008-11-17 13:54 ` [pnfs] " Benny Halevy
2008-11-10 20:29 ` [RFC 65/85] nfs41: Backchannel bc_svc_process() Benny Halevy
2008-11-17 13:55 ` [pnfs] " Benny Halevy
2008-11-10 20:30 ` [RFC 66/85] nfs41: Implement NFSv4.1 callback service process Benny Halevy
2008-11-10 20:30 ` [RFC 67/85] nfs41: sunrpc: provide functions to create and destroy a svc_xprt for backchannel use Benny Halevy
2008-11-10 20:30 ` [RFC 68/85] nfs41: sunrpc: add a struct svc_xprt pointer to struct svc_serv " Benny Halevy
2008-11-10 20:30 ` [RFC 69/85] nfs41: create a svc_xprt for nfs41 callback thread and use for incoming callbacks Benny Halevy
2008-11-10 20:30 ` [RFC 70/85] nfs41: save svc_serv in nfs_callback_info Benny Halevy
2008-11-10 20:30 ` [RFC 71/85] nfs41: Add a reference to svc_serv during callback service bring up Benny Halevy
2008-11-10 20:31 ` [RFC 72/85] nfs41: Allow NFSv4 and NFSv4.1 callback services to coexist Benny Halevy
2008-11-10 20:31 ` [RFC 73/85] nfs41: Setup the backchannel Benny Halevy
2008-11-10 20:31 ` [RFC 74/85] nfs41: Client indicates presence of NFSv4.1 callback channel Benny Halevy
2008-11-10 20:31 ` [RFC 75/85] nfs41: Get the rpc_xprt * from the rpc_rqst instead of the rpc_clnt Benny Halevy
2008-11-10 20:31 ` [RFC 76/85] nfs41: Release backchannel resources associated with session Benny Halevy
2008-11-10 20:31 ` [RFC 77/85] nfs41: store minorversion in cb_compound_hdr_arg Benny Halevy
2008-11-10 20:32 ` [RFC 78/85] nfs41: decode minorversion 1 cb_compound header Benny Halevy
2008-11-10 20:32 ` [RFC 79/85] nfs41: callback numbers definitions Benny Halevy
2008-11-10 20:32 ` [RFC 80/85] nfs41: consider minorversion in callback_xdr:process_op Benny Halevy
2008-11-10 20:32 ` [RFC 81/85] nfs41: define CB_NOTIFY_DEVICEID as not supported Benny Halevy
2008-11-10 20:32 ` [RFC 82/85] nfs41: cb_sequence protocol level data structures Benny Halevy
2008-11-10 20:33 ` [RFC 83/85] nfs41: cb_sequence proc implementation Benny Halevy
2008-11-10 20:33 ` [RFC 84/85] nfs41: cb_sequence xdr implementation Benny Halevy
2008-11-10 20:33 ` [RFC 85/85] nfs41: verify CB_SEQUENCE position in callback compound Benny Halevy
2008-11-10 20:37 ` [pnfs] [RFC 0/85] nfs41 client patches for review Benny Halevy
2008-11-10 20:42 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49217448.6020904@panasas.com \
--to=bhalevy@panasas.com \
--cc=linux-nfs@vger.kernel.org \
--cc=pnfs@linux-nfs.org \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox