From: andros@netapp.com Subject: [PATCH 15/29] nfsd41: obliterate nfsd41_copy_replay_data Date: Thu, 23 Apr 2009 12:42:54 -0400 Message-ID: <1240504988-9572-16-git-send-email-andros@netapp.com> References: <> <1240504988-9572-1-git-send-email-andros@netapp.com> <1240504988-9572-2-git-send-email-andros@netapp.com> <1240504988-9572-3-git-send-email-andros@netapp.com> <1240504988-9572-4-git-send-email-andros@netapp.com> <1240504988-9572-5-git-send-email-andros@netapp.com> <1240504988-9572-6-git-send-email-andros@netapp.com> <1240504988-9572-7-git-send-email-andros@netapp.com> <1240504988-9572-8-git-send-email-andros@netapp.com> <1240504988-9572-9-git-send-email-andros@netapp.com> <1240504988-9572-10-git-send-email-andros@netapp.com> <1240504988-9572-11-git-send-email-andros@netapp.com> <1240504988-9572-12-git-send-email-andros@netapp.com> <1240504988-9572-13-git-send-email-andros@netapp.com> <1240504988-9572-14-git-send-email-andros@netapp.com> <1240504988-9572-15-git-send-email-andros@netapp.com> Cc: linux-nfs@vger.kernel.org, pnfs@linux-nfs.org, Andy Adamson To: bfields@fieldses.org Return-path: Received: from mx2.netapp.com ([216.240.18.37]:46174 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755881AbZDWQnY (ORCPT ); Thu, 23 Apr 2009 12:43:24 -0400 In-Reply-To: <1240504988-9572-15-git-send-email-andros@netapp.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: From: Andy Adamson Replacing page based drc cache with buffer based drc cache. Signed-off-by: Andy Adamson --- fs/nfsd/nfs4state.c | 39 --------------------------------------- 1 files changed, 0 insertions(+), 39 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 334a3f3..baa0e81 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1091,32 +1091,6 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) } /* - * We keep the rpc header, but take the nfs reply from the replycache. - */ -static int -nfsd41_copy_replay_data(struct nfsd4_compoundres *resp, - struct nfsd4_cache_entry *entry) -{ - struct svc_rqst *rqstp = resp->rqstp; - struct kvec *resv = &resp->rqstp->rq_res.head[0]; - int len; - - /* Current request rpc header length*/ - len = (char *)resp->cstate.statp - - (char *)page_address(rqstp->rq_respages[0]); - if (entry->ce_datav.iov_len + len > PAGE_SIZE) { - dprintk("%s v41 cached reply too large (%Zd).\n", __func__, - entry->ce_datav.iov_len); - return 0; - } - /* copy the cached reply nfsd data past the current rpc header */ - memcpy((char *)resv->iov_base + len, entry->ce_datav.iov_base, - entry->ce_datav.iov_len); - resv->iov_len = len + entry->ce_datav.iov_len; - return 1; -} - -/* * Keep the first page of the replay. Copy the NFSv4.1 data from the first * cached page. Replace any futher replay pages from the cache. */ @@ -1148,19 +1122,6 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp, memcpy(resp->cstate.datap, entry->ce_datav.iov_base, entry->ce_datav.iov_len); - if (!nfsd41_copy_replay_data(resp, entry)) { - /* - * Not enough room to use the replay rpc header, send the - * cached header. Release all the allocated result pages. - */ - svc_free_res_pages(resp->rqstp); - } else { - /* Release all but the first allocated result page */ - - resp->rqstp->rq_resused--; - svc_free_res_pages(resp->rqstp); - } - resp->rqstp->rq_resused = entry->ce_resused; resp->opcnt = entry->ce_opcnt; resp->cstate.iovlen = entry->ce_datav.iov_len + entry->ce_rpchdrlen; -- 1.5.4.3