Merge branch 'nfsd-5.8' of git://linux-nfs.org/~cel/cel-2.6 into for-5.8-incoming
Highlights of this series: * Remove serialization of sending RPC/RDMA Replies * Convert the TCP socket send path to use xdr_buf::bvecs (pre-requisite for RPC-on-TLS) * Fix svcrdma backchannel sendto return code * Convert a number of dprintk call sites to use tracepoints * Fix the "suggest braces around empty body in an 'else' statement" warning
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "netns.h"
|
||||
#include "pnfs.h"
|
||||
#include "filecache.h"
|
||||
#include "trace.h"
|
||||
|
||||
#define NFSDDBG_FACILITY NFSDDBG_PROC
|
||||
|
||||
@@ -167,9 +168,6 @@ renew_client_locked(struct nfs4_client *clp)
|
||||
return;
|
||||
}
|
||||
|
||||
dprintk("renewing client (clientid %08x/%08x)\n",
|
||||
clp->cl_clientid.cl_boot,
|
||||
clp->cl_clientid.cl_id);
|
||||
list_move_tail(&clp->cl_lru, &nn->client_lru);
|
||||
clp->cl_time = ktime_get_boottime_seconds();
|
||||
}
|
||||
@@ -1922,8 +1920,7 @@ STALE_CLIENTID(clientid_t *clid, struct nfsd_net *nn)
|
||||
*/
|
||||
if (clid->cl_boot == (u32)nn->boot_time)
|
||||
return 0;
|
||||
dprintk("NFSD stale clientid (%08x/%08x) boot_time %08llx\n",
|
||||
clid->cl_boot, clid->cl_id, nn->boot_time);
|
||||
trace_nfsd_clid_stale(clid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2872,14 +2869,12 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, struct svc_r
|
||||
conn->cb_prog = se->se_callback_prog;
|
||||
conn->cb_ident = se->se_callback_ident;
|
||||
memcpy(&conn->cb_saddr, &rqstp->rq_daddr, rqstp->rq_daddrlen);
|
||||
trace_nfsd_cb_args(clp, conn);
|
||||
return;
|
||||
out_err:
|
||||
conn->cb_addr.ss_family = AF_UNSPEC;
|
||||
conn->cb_addrlen = 0;
|
||||
dprintk("NFSD: this client (clientid %08x/%08x) "
|
||||
"will not receive delegations\n",
|
||||
clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
|
||||
|
||||
trace_nfsd_cb_nodelegs(clp);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3936,23 +3931,18 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
||||
if (clp_used_exchangeid(conf))
|
||||
goto out;
|
||||
if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {
|
||||
char addr_str[INET6_ADDRSTRLEN];
|
||||
rpc_ntop((struct sockaddr *) &conf->cl_addr, addr_str,
|
||||
sizeof(addr_str));
|
||||
dprintk("NFSD: setclientid: string in use by client "
|
||||
"at %s\n", addr_str);
|
||||
trace_nfsd_clid_inuse_err(conf);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
unconf = find_unconfirmed_client_by_name(&clname, nn);
|
||||
if (unconf)
|
||||
unhash_client_locked(unconf);
|
||||
/* We need to handle only case 1: probable callback update */
|
||||
if (conf && same_verf(&conf->cl_verifier, &clverifier)) {
|
||||
/* case 1: probable callback update */
|
||||
copy_clid(new, conf);
|
||||
gen_confirm(new, nn);
|
||||
} else /* case 4 (new client) or cases 2, 3 (client reboot): */
|
||||
;
|
||||
}
|
||||
new->cl_minorversion = 0;
|
||||
gen_callback(new, setclid, rqstp);
|
||||
add_to_unconfirmed(new);
|
||||
@@ -4133,7 +4123,6 @@ out_free_openowner_slab:
|
||||
out_free_client_slab:
|
||||
kmem_cache_destroy(client_slab);
|
||||
out:
|
||||
dprintk("nfsd4: out of memory while initializing nfsv4\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -4565,6 +4554,8 @@ nfsd_break_deleg_cb(struct file_lock *fl)
|
||||
struct nfs4_delegation *dp = (struct nfs4_delegation *)fl->fl_owner;
|
||||
struct nfs4_file *fp = dp->dl_stid.sc_file;
|
||||
|
||||
trace_nfsd_deleg_break(&dp->dl_stid.sc_stateid);
|
||||
|
||||
/*
|
||||
* We don't want the locks code to timeout the lease for us;
|
||||
* we'll remove it ourself if a delegation isn't returned
|
||||
@@ -5089,8 +5080,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open,
|
||||
|
||||
memcpy(&open->op_delegate_stateid, &dp->dl_stid.sc_stateid, sizeof(dp->dl_stid.sc_stateid));
|
||||
|
||||
dprintk("NFSD: delegation stateid=" STATEID_FMT "\n",
|
||||
STATEID_VAL(&dp->dl_stid.sc_stateid));
|
||||
trace_nfsd_deleg_open(&dp->dl_stid.sc_stateid);
|
||||
open->op_delegate_type = NFS4_OPEN_DELEGATE_READ;
|
||||
nfs4_put_stid(&dp->dl_stid);
|
||||
return;
|
||||
@@ -5207,9 +5197,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
|
||||
nfs4_open_delegation(current_fh, open, stp);
|
||||
nodeleg:
|
||||
status = nfs_ok;
|
||||
|
||||
dprintk("%s: stateid=" STATEID_FMT "\n", __func__,
|
||||
STATEID_VAL(&stp->st_stid.sc_stateid));
|
||||
trace_nfsd_deleg_none(&stp->st_stid.sc_stateid);
|
||||
out:
|
||||
/* 4.1 client trying to upgrade/downgrade delegation? */
|
||||
if (open->op_delegate_type == NFS4_OPEN_DELEGATE_NONE && dp &&
|
||||
@@ -5263,8 +5251,7 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
||||
__be32 status;
|
||||
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
|
||||
|
||||
dprintk("process_renew(%08x/%08x): starting\n",
|
||||
clid->cl_boot, clid->cl_id);
|
||||
trace_nfsd_clid_renew(clid);
|
||||
status = lookup_clientid(clid, cstate, nn, false);
|
||||
if (status)
|
||||
goto out;
|
||||
@@ -5285,6 +5272,7 @@ nfsd4_end_grace(struct nfsd_net *nn)
|
||||
if (nn->grace_ended)
|
||||
return;
|
||||
|
||||
trace_nfsd_grace_complete(nn);
|
||||
nn->grace_ended = true;
|
||||
/*
|
||||
* If the server goes down again right now, an NFSv4
|
||||
@@ -5350,13 +5338,10 @@ nfs4_laundromat(struct nfsd_net *nn)
|
||||
copy_stateid_t *cps_t;
|
||||
int i;
|
||||
|
||||
dprintk("NFSD: laundromat service - starting\n");
|
||||
|
||||
if (clients_still_reclaiming(nn)) {
|
||||
new_timeo = 0;
|
||||
goto out;
|
||||
}
|
||||
dprintk("NFSD: end of grace period\n");
|
||||
nfsd4_end_grace(nn);
|
||||
INIT_LIST_HEAD(&reaplist);
|
||||
|
||||
@@ -5378,8 +5363,7 @@ nfs4_laundromat(struct nfsd_net *nn)
|
||||
break;
|
||||
}
|
||||
if (mark_client_expired_locked(clp)) {
|
||||
dprintk("NFSD: client in use (clientid %08x)\n",
|
||||
clp->cl_clientid.cl_id);
|
||||
trace_nfsd_clid_expired(&clp->cl_clientid);
|
||||
continue;
|
||||
}
|
||||
list_add(&clp->cl_lru, &reaplist);
|
||||
@@ -5387,8 +5371,7 @@ nfs4_laundromat(struct nfsd_net *nn)
|
||||
spin_unlock(&nn->client_lock);
|
||||
list_for_each_safe(pos, next, &reaplist) {
|
||||
clp = list_entry(pos, struct nfs4_client, cl_lru);
|
||||
dprintk("NFSD: purging unused client (clientid %08x)\n",
|
||||
clp->cl_clientid.cl_id);
|
||||
trace_nfsd_clid_purged(&clp->cl_clientid);
|
||||
list_del_init(&clp->cl_lru);
|
||||
expire_client(clp);
|
||||
}
|
||||
@@ -5478,7 +5461,6 @@ laundromat_main(struct work_struct *laundry)
|
||||
laundromat_work);
|
||||
|
||||
t = nfs4_laundromat(nn);
|
||||
dprintk("NFSD: laundromat_main - sleeping for %lld seconds\n", t);
|
||||
queue_delayed_work(laundry_wq, &nn->laundromat_work, t*HZ);
|
||||
}
|
||||
|
||||
@@ -6019,8 +6001,7 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid,
|
||||
struct nfs4_stid *s;
|
||||
struct nfs4_ol_stateid *stp = NULL;
|
||||
|
||||
dprintk("NFSD: %s: seqid=%d stateid = " STATEID_FMT "\n", __func__,
|
||||
seqid, STATEID_VAL(stateid));
|
||||
trace_nfsd_preprocess(seqid, stateid);
|
||||
|
||||
*stpp = NULL;
|
||||
status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn);
|
||||
@@ -6089,9 +6070,7 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
||||
oo->oo_flags |= NFS4_OO_CONFIRMED;
|
||||
nfs4_inc_and_copy_stateid(&oc->oc_resp_stateid, &stp->st_stid);
|
||||
mutex_unlock(&stp->st_mutex);
|
||||
dprintk("NFSD: %s: success, seqid=%d stateid=" STATEID_FMT "\n",
|
||||
__func__, oc->oc_seqid, STATEID_VAL(&stp->st_stid.sc_stateid));
|
||||
|
||||
trace_nfsd_open_confirm(oc->oc_seqid, &stp->st_stid.sc_stateid);
|
||||
nfsd4_client_record_create(oo->oo_owner.so_client);
|
||||
status = nfs_ok;
|
||||
put_stateid:
|
||||
@@ -7143,7 +7122,7 @@ nfs4_client_to_reclaim(struct xdr_netobj name, struct xdr_netobj princhash,
|
||||
unsigned int strhashval;
|
||||
struct nfs4_client_reclaim *crp;
|
||||
|
||||
dprintk("NFSD nfs4_client_to_reclaim NAME: %.*s\n", name.len, name.data);
|
||||
trace_nfsd_clid_reclaim(nn, name.len, name.data);
|
||||
crp = alloc_reclaim();
|
||||
if (crp) {
|
||||
strhashval = clientstr_hashval(name);
|
||||
@@ -7193,7 +7172,7 @@ nfsd4_find_reclaim_client(struct xdr_netobj name, struct nfsd_net *nn)
|
||||
unsigned int strhashval;
|
||||
struct nfs4_client_reclaim *crp = NULL;
|
||||
|
||||
dprintk("NFSD: nfs4_find_reclaim_client for name %.*s\n", name.len, name.data);
|
||||
trace_nfsd_clid_find(nn, name.len, name.data);
|
||||
|
||||
strhashval = clientstr_hashval(name);
|
||||
list_for_each_entry(crp, &nn->reclaim_str_hashtbl[strhashval], cr_strhash) {
|
||||
@@ -7757,6 +7736,9 @@ nfsd_recall_delegations(struct list_head *reaplist)
|
||||
list_for_each_entry_safe(dp, next, reaplist, dl_recall_lru) {
|
||||
list_del_init(&dp->dl_recall_lru);
|
||||
clp = dp->dl_stid.sc_client;
|
||||
|
||||
trace_nfsd_deleg_recall(&dp->dl_stid.sc_stateid);
|
||||
|
||||
/*
|
||||
* We skipped all entries that had a zero dl_time before,
|
||||
* so we can now reset the dl_time back to 0. If a delegation
|
||||
@@ -7939,6 +7921,7 @@ nfs4_state_start_net(struct net *net)
|
||||
goto skip_grace;
|
||||
printk(KERN_INFO "NFSD: starting %lld-second grace period (net %x)\n",
|
||||
nn->nfsd4_grace, net->ns.inum);
|
||||
trace_nfsd_grace_start(nn);
|
||||
queue_delayed_work(laundry_wq, &nn->laundromat_work, nn->nfsd4_grace * HZ);
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user