Merge tag 'nfsd-5.4' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields: "Highlights: - Add a new knfsd file cache, so that we don't have to open and close on each (NFSv2/v3) READ or WRITE. This can speed up read and write in some cases. It also replaces our readahead cache. - Prevent silent data loss on write errors, by treating write errors like server reboots for the purposes of write caching, thus forcing clients to resend their writes. - Tweak the code that allocates sessions to be more forgiving, so that NFSv4.1 mounts are less likely to hang when a server already has a lot of clients. - Eliminate an arbitrary limit on NFSv4 ACL sizes; they should now be limited only by the backend filesystem and the maximum RPC size. - Allow the server to enforce use of the correct kerberos credentials when a client reclaims state after a reboot. And some miscellaneous smaller bugfixes and cleanup" * tag 'nfsd-5.4' of git://linux-nfs.org/~bfields/linux: (34 commits) sunrpc: clean up indentation issue nfsd: fix nfs read eof detection nfsd: Make nfsd_reset_boot_verifier_locked static nfsd: degraded slot-count more gracefully as allocation nears exhaustion. nfsd: handle drc over-allocation gracefully. nfsd: add support for upcall version 2 nfsd: add a "GetVersion" upcall for nfsdcld nfsd: Reset the boot verifier on all write I/O errors nfsd: Don't garbage collect files that might contain write errors nfsd: Support the server resetting the boot verifier nfsd: nfsd_file cache entries should be per net namespace nfsd: eliminate an unnecessary acl size limit Deprecate nfsd fault injection nfsd: remove duplicated include from filecache.c nfsd: Fix the documentation for svcxdr_tmpalloc() nfsd: Fix up some unused variable warnings nfsd: close cached files prior to a REMOVE or RENAME that would replace target nfsd: rip out the raparms cache nfsd: have nfsd_test_lock use the nfsd_file cache nfsd: hook up nfs4_preprocess_stateid_op to the nfsd_file cache ...
This commit is contained in:
@@ -73,8 +73,6 @@ atomic_t rdma_stat_rq_prod;
|
||||
atomic_t rdma_stat_sq_poll;
|
||||
atomic_t rdma_stat_sq_prod;
|
||||
|
||||
struct workqueue_struct *svc_rdma_wq;
|
||||
|
||||
/*
|
||||
* This function implements reading and resetting an atomic_t stat
|
||||
* variable through read/write to a proc file. Any write to the file
|
||||
@@ -230,7 +228,6 @@ static struct ctl_table svcrdma_root_table[] = {
|
||||
void svc_rdma_cleanup(void)
|
||||
{
|
||||
dprintk("SVCRDMA Module Removed, deregister RPC RDMA transport\n");
|
||||
destroy_workqueue(svc_rdma_wq);
|
||||
if (svcrdma_table_header) {
|
||||
unregister_sysctl_table(svcrdma_table_header);
|
||||
svcrdma_table_header = NULL;
|
||||
@@ -246,10 +243,6 @@ int svc_rdma_init(void)
|
||||
dprintk("\tmax_bc_requests : %u\n", svcrdma_max_bc_requests);
|
||||
dprintk("\tmax_inline : %d\n", svcrdma_max_req_size);
|
||||
|
||||
svc_rdma_wq = alloc_workqueue("svc_rdma", 0, 0);
|
||||
if (!svc_rdma_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!svcrdma_table_header)
|
||||
svcrdma_table_header =
|
||||
register_sysctl_table(svcrdma_root_table);
|
||||
|
@@ -172,9 +172,10 @@ static void svc_rdma_recv_ctxt_destroy(struct svcxprt_rdma *rdma,
|
||||
void svc_rdma_recv_ctxts_destroy(struct svcxprt_rdma *rdma)
|
||||
{
|
||||
struct svc_rdma_recv_ctxt *ctxt;
|
||||
struct llist_node *node;
|
||||
|
||||
while ((ctxt = svc_rdma_next_recv_ctxt(&rdma->sc_recv_ctxts))) {
|
||||
list_del(&ctxt->rc_list);
|
||||
while ((node = llist_del_first(&rdma->sc_recv_ctxts))) {
|
||||
ctxt = llist_entry(node, struct svc_rdma_recv_ctxt, rc_node);
|
||||
svc_rdma_recv_ctxt_destroy(rdma, ctxt);
|
||||
}
|
||||
}
|
||||
@@ -183,21 +184,18 @@ static struct svc_rdma_recv_ctxt *
|
||||
svc_rdma_recv_ctxt_get(struct svcxprt_rdma *rdma)
|
||||
{
|
||||
struct svc_rdma_recv_ctxt *ctxt;
|
||||
struct llist_node *node;
|
||||
|
||||
spin_lock(&rdma->sc_recv_lock);
|
||||
ctxt = svc_rdma_next_recv_ctxt(&rdma->sc_recv_ctxts);
|
||||
if (!ctxt)
|
||||
node = llist_del_first(&rdma->sc_recv_ctxts);
|
||||
if (!node)
|
||||
goto out_empty;
|
||||
list_del(&ctxt->rc_list);
|
||||
spin_unlock(&rdma->sc_recv_lock);
|
||||
ctxt = llist_entry(node, struct svc_rdma_recv_ctxt, rc_node);
|
||||
|
||||
out:
|
||||
ctxt->rc_page_count = 0;
|
||||
return ctxt;
|
||||
|
||||
out_empty:
|
||||
spin_unlock(&rdma->sc_recv_lock);
|
||||
|
||||
ctxt = svc_rdma_recv_ctxt_alloc(rdma);
|
||||
if (!ctxt)
|
||||
return NULL;
|
||||
@@ -218,11 +216,9 @@ void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma,
|
||||
for (i = 0; i < ctxt->rc_page_count; i++)
|
||||
put_page(ctxt->rc_pages[i]);
|
||||
|
||||
if (!ctxt->rc_temp) {
|
||||
spin_lock(&rdma->sc_recv_lock);
|
||||
list_add(&ctxt->rc_list, &rdma->sc_recv_ctxts);
|
||||
spin_unlock(&rdma->sc_recv_lock);
|
||||
} else
|
||||
if (!ctxt->rc_temp)
|
||||
llist_add(&ctxt->rc_node, &rdma->sc_recv_ctxts);
|
||||
else
|
||||
svc_rdma_recv_ctxt_destroy(rdma, ctxt);
|
||||
}
|
||||
|
||||
|
@@ -140,14 +140,13 @@ static struct svcxprt_rdma *svc_rdma_create_xprt(struct svc_serv *serv,
|
||||
INIT_LIST_HEAD(&cma_xprt->sc_rq_dto_q);
|
||||
INIT_LIST_HEAD(&cma_xprt->sc_read_complete_q);
|
||||
INIT_LIST_HEAD(&cma_xprt->sc_send_ctxts);
|
||||
INIT_LIST_HEAD(&cma_xprt->sc_recv_ctxts);
|
||||
init_llist_head(&cma_xprt->sc_recv_ctxts);
|
||||
INIT_LIST_HEAD(&cma_xprt->sc_rw_ctxts);
|
||||
init_waitqueue_head(&cma_xprt->sc_send_wait);
|
||||
|
||||
spin_lock_init(&cma_xprt->sc_lock);
|
||||
spin_lock_init(&cma_xprt->sc_rq_dto_lock);
|
||||
spin_lock_init(&cma_xprt->sc_send_lock);
|
||||
spin_lock_init(&cma_xprt->sc_recv_lock);
|
||||
spin_lock_init(&cma_xprt->sc_rw_ctxt_lock);
|
||||
|
||||
/*
|
||||
@@ -630,8 +629,9 @@ static void svc_rdma_free(struct svc_xprt *xprt)
|
||||
{
|
||||
struct svcxprt_rdma *rdma =
|
||||
container_of(xprt, struct svcxprt_rdma, sc_xprt);
|
||||
|
||||
INIT_WORK(&rdma->sc_work, __svc_rdma_free);
|
||||
queue_work(svc_rdma_wq, &rdma->sc_work);
|
||||
schedule_work(&rdma->sc_work);
|
||||
}
|
||||
|
||||
static int svc_rdma_has_wspace(struct svc_xprt *xprt)
|
||||
|
Reference in New Issue
Block a user