Skip to content

Commit

Permalink
Merge branch 'for-2.6.34' of git://linux-nfs.org/~bfields/linux
Browse files Browse the repository at this point in the history
* 'for-2.6.34' of git://linux-nfs.org/~bfields/linux: (22 commits)
  nfsd4: fix minor memory leak
  svcrpc: treat uid's as unsigned
  nfsd: ensure sockets are closed on error
  Revert "sunrpc: move the close processing after do recvfrom method"
  Revert "sunrpc: fix peername failed on closed listener"
  sunrpc: remove unnecessary svc_xprt_put
  NFSD: NFSv4 callback client should use RPC_TASK_SOFTCONN
  xfs_export_operations.commit_metadata
  commit_metadata export operation replacing nfsd_sync_dir
  lockd: don't clear sm_monitored on nsm_reboot_lookup
  lockd: release reference to nsm_handle in nlm_host_rebooted
  nfsd: Use vfs_fsync_range() in nfsd_commit
  NFSD: Create PF_INET6 listener in write_ports
  SUNRPC: NFS kernel APIs shouldn't return ENOENT for "transport not found"
  SUNRPC: Bury "#ifdef IPV6" in svc_create_xprt()
  NFSD: Support AF_INET6 in svc_addsock() function
  SUNRPC: Use rpc_pton() in ip_map_parse()
  nfsd: 4.1 has an rfc number
  nfsd41: Create the recovery entry for the NFSv4.1 client
  nfsd: use vfs_fsync for non-directories
  ...
  • Loading branch information
torvalds committed Mar 6, 2010
2 parents 4582a30 + 4ea41e2 commit 05c5cb3
Show file tree
Hide file tree
Showing 16 changed files with 174 additions and 145 deletions.
5 changes: 2 additions & 3 deletions Documentation/filesystems/nfs/nfs41-server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ kernels must turn 4.1 on or off *before* turning support for version 4
on or off; rpc.nfsd does this correctly.)

The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based
on the latest NFSv4.1 Internet Draft:
http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-29
on RFC 5661.

From the many new features in NFSv4.1 the current implementation
focuses on the mandatory-to-implement NFSv4.1 Sessions, providing
Expand All @@ -44,7 +43,7 @@ interoperability problems with future clients. Known issues:
trunking, but this is a mandatory feature, and its use is
recommended to clients in a number of places. (E.g. to ensure
timely renewal in case an existing connection's retry timeouts
have gotten too long; see section 8.3 of the draft.)
have gotten too long; see section 8.3 of the RFC.)
Therefore, lack of this feature may cause future clients to
fail.
- Incomplete backchannel support: incomplete backchannel gss
Expand Down
2 changes: 1 addition & 1 deletion fs/lockd/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ again: mutex_lock(&nlm_host_mutex);
}
}
}

mutex_unlock(&nlm_host_mutex);
nsm_release(nsm);
}

/*
Expand Down
12 changes: 3 additions & 9 deletions fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ struct nsm_handle *nsm_get_handle(const struct sockaddr *sap,
* nsm_reboot_lookup - match NLMPROC_SM_NOTIFY arguments to an nsm_handle
* @info: pointer to NLMPROC_SM_NOTIFY arguments
*
* Returns a matching nsm_handle if found in the nsm cache; the returned
* nsm_handle's reference count is bumped and sm_monitored is cleared.
* Otherwise returns NULL if some error occurred.
* Returns a matching nsm_handle if found in the nsm cache. The returned
* nsm_handle's reference count is bumped. Otherwise returns NULL if some
* error occurred.
*/
struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info)
{
Expand All @@ -370,12 +370,6 @@ struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info)
atomic_inc(&cached->sm_count);
spin_unlock(&nsm_lock);

/*
* During subsequent lock activity, force a fresh
* notification to be set up for this host.
*/
cached->sm_monitored = 0;

dprintk("lockd: host %s (%s) rebooted, cnt %d\n",
cached->sm_name, cached->sm_addrbuf,
atomic_read(&cached->sm_count));
Expand Down
2 changes: 0 additions & 2 deletions fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,9 @@ static int make_socks(struct svc_serv *serv)
if (err < 0)
goto out_err;

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
err = create_lockd_family(serv, PF_INET6);
if (err < 0 && err != -EAFNOSUPPORT)
goto out_err;
#endif /* CONFIG_IPV6 || CONFIG_IPV6_MODULE */

warned = 0;
return 0;
Expand Down
2 changes: 0 additions & 2 deletions fs/nfs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ nfs4_callback_up(struct svc_serv *serv)
dprintk("NFS: Callback listener port = %u (af %u)\n",
nfs_callback_tcpport, PF_INET);

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
ret = svc_create_xprt(serv, "tcp", PF_INET6,
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
if (ret > 0) {
Expand All @@ -129,7 +128,6 @@ nfs4_callback_up(struct svc_serv *serv)
ret = 0;
else
goto out_err;
#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */

return svc_prepare_thread(serv, &serv->sv_pools[0]);

Expand Down
5 changes: 4 additions & 1 deletion fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ static struct rpc_cred *callback_cred;

int set_callback_cred(void)
{
if (callback_cred)
return 0;
callback_cred = rpc_lookup_machine_cred();
if (!callback_cred)
return -ENOMEM;
Expand All @@ -542,7 +544,8 @@ void do_probe_callback(struct nfs4_client *clp)
};
int status;

status = rpc_call_async(cb->cb_client, &msg, RPC_TASK_SOFT,
status = rpc_call_async(cb->cb_client, &msg,
RPC_TASK_SOFT | RPC_TASK_SOFTCONN,
&nfsd4_cb_probe_ops, (void *)clp);
if (status) {
warn_no_callback_path(clp, status);
Expand Down
4 changes: 1 addition & 3 deletions fs/nfsd/nfs4recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname)
static void
nfsd4_sync_rec_dir(void)
{
mutex_lock(&rec_dir.dentry->d_inode->i_mutex);
nfsd_sync_dir(rec_dir.dentry);
mutex_unlock(&rec_dir.dentry->d_inode->i_mutex);
vfs_fsync(NULL, rec_dir.dentry, 0);
}

int
Expand Down
4 changes: 3 additions & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2482,8 +2482,10 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
}
memcpy(&open->op_stateid, &stp->st_stateid, sizeof(stateid_t));

if (nfsd4_has_session(&resp->cstate))
if (nfsd4_has_session(&resp->cstate)) {
open->op_stateowner->so_confirmed = 1;
nfsd4_create_clid_dir(open->op_stateowner->so_client);
}

/*
* Attempt to hand out a delegation. No error return, because the
Expand Down
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
}
op->opnum = ntohl(*argp->p++);

if (op->opnum >= OP_ACCESS && op->opnum < ops->nops)
if (op->opnum >= FIRST_NFS4_OP && op->opnum <= LAST_NFS4_OP)
op->status = ops->decoders[op->opnum](argp, &op->u);
else {
op->opnum = OP_ILLEGAL;
Expand Down
24 changes: 18 additions & 6 deletions fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ static ssize_t __write_ports_delfd(char *buf)
static ssize_t __write_ports_addxprt(char *buf)
{
char transport[16];
struct svc_xprt *xprt;
int port, err;

if (sscanf(buf, "%15s %4u", transport, &port) != 2)
Expand All @@ -1002,13 +1003,24 @@ static ssize_t __write_ports_addxprt(char *buf)

err = svc_create_xprt(nfsd_serv, transport,
PF_INET, port, SVC_SOCK_ANONYMOUS);
if (err < 0) {
/* Give a reasonable perror msg for bad transport string */
if (err == -ENOENT)
err = -EPROTONOSUPPORT;
return err;
}
if (err < 0)
goto out_err;

err = svc_create_xprt(nfsd_serv, transport,
PF_INET6, port, SVC_SOCK_ANONYMOUS);
if (err < 0 && err != -EAFNOSUPPORT)
goto out_close;
return 0;
out_close:
xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);
if (xprt != NULL) {
svc_close_xprt(xprt);
svc_xprt_put(xprt);
}
out_err:
/* Decrease the count, but don't shut down the service */
nfsd_serv->sv_nrthreads--;
return err;
}

/*
Expand Down
Loading

0 comments on commit 05c5cb3

Please sign in to comment.