[Nfs-ganesha-devel] Change in ffilz/nfs-ganesha[next]: Fix multiple threads trying to free same dupreq!

2016-12-12 Thread GerritHub
>From Malahal :

Malahal has uploaded a new change for review. ( 
https://review.gerrithub.io/305742


Change subject: Fix multiple threads trying to free same dupreq!
..

Fix multiple threads trying to free same dupreq!

commit a2ba2e088ad2d6bd6efecbb93461f0344b5c29f5 dropped drc lock and
continued to work on a dupreq entry retrieved from the drc list earlier.
Make sure that the dupreq entry is valid even after dropping and
reacquiring the drc lock.

Change-Id: I17fbb2ae4698fc4be05cd4d77c53f858c4c6de3a
Signed-off-by: Malahal Naineni 
---
M src/RPCAL/nfs_dupreq.c
1 file changed, 22 insertions(+), 2 deletions(-)



  git pull ssh://review.gerrithub.io:29419/ffilz/nfs-ganesha 
refs/changes/42/305742/1
-- 
To view, visit https://review.gerrithub.io/305742
To unsubscribe, visit https://review.gerrithub.io/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17fbb2ae4698fc4be05cd4d77c53f858c4c6de3a
Gerrit-Change-Number: 305742
Gerrit-PatchSet: 1
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Owner: Malahal 
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


[Nfs-ganesha-devel] Unable to serve request through DRC

2016-12-12 Thread Sachin C Punadikar


Hello All,
I am bit new to Ganesha. Forgive me for long email.

I wanted to make use of DRC code to understand its functionality. I have
instrumented Ganesha code such that response to the initial request (which
can be cached) gets dropped, so that there will be re-transmission of the
request, and the request gets served from the DRC. I code change is as
below:
--- a/src/MainNFSD/nfs_worker_thread.c
+++ b/src/MainNFSD/nfs_worker_thread.c
@@ -1330,8 +1330,10 @@ void nfs_rpc_execute(request_data_t *reqdata)

DISP_SLOCK(xprt);

/* encoding the result on xdr output */
-   if (!svc_sendreply(xprt, >r_u.req.svc,
+   if (!(reqdesc->dispatch_behaviour & CAN_BE_DUP) &&
+   !svc_sendreply(xprt, >r_u.req.svc,
   reqdesc->xdr_encode_func,
   (caddr_t) res_nfs)) {
LogDebug(COMPONENT_DISPATCH,

When I use this code for creating a file from RHEL 7.2 client, via NFSv3
mount, even if I wait for 15-20 minutes, client do not report successful
file creation/nor a failure.
I used "touch" command. Whereas the file gets created at the server side
(as expected). The client keeps on re-transmitting the request and never
reaches the DR cache.
Further code study indicated that the hash-key, was different for every
request, and hence, when it was a re-transmition, then it was not getting
hit from the cache and it was treated as new request (and for new request,
the response was dropped purposely). So in short it was never ending story.
Am I doing something wrong ? It is a code issue or something else ?

struct dupreq_entry {
struct opr_rbtree_node rbt_k;


uint64_t hk;/* hash key */
};
Current code assign the hash-key as below (function - nfs_dupreq_start):
/* TI-RPC computed checksum */
dk->hk = req->rq_cksum;

If I change above code to make use of constant hash value, say 1, it works.
But having hash value 1 is meaningless. As the DRC entries we storing are
as per the client, making use of client address to calculate hash would be
more meaningful (but not sure).
My below code modification works.
--- a/src/RPCAL/nfs_dupreq.c
+++ b/src/RPCAL/nfs_dupreq.c
@@ -974,7 +974,7 @@ dupreq_status_t nfs_dupreq_start(nfs_request_t *reqnfs,
}

/* TI-RPC computed checksum */
-   dk->hk = req->rq_cksum;
+   dk->hk = drc->d_u.tcp.hk; /* we have the hash readily available */

dk->state = DUPREQ_START;
dk->timestamp = time(NULL);

Let me know whether above kind of hash key is correct or I should make use
of xid to get hash value.
Thanks in advance.

with regards,
Sachin Punadikar
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


Re: [Nfs-ganesha-devel] [ntirpc] closed PRs

2016-12-12 Thread Daniel Gryniewicz
Maybe they were auto-closed when Bill re-organized the branches?

Daniel

On Mon, Dec 12, 2016 at 5:00 AM, Swen Schillig  wrote:
> Dan, Matt
>
> Up until recently we had a bunch of PRs for NTIRPC
> being tested/investigated.
>
> A few weeks ago they were all closed without being merged or at least
> commented why they were closed.
>
> Could you please comment on this and maybe provide some info what your
> plans are for those PRs.
>
> Cheers Swen.
>

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


Re: [Nfs-ganesha-devel] [ntirpc] closed PRs

2016-12-12 Thread Matt Benjamin
More to the point, Swen, are you able to re-open any relevant PRs?

Thanks,

Matt

- Original Message -
> From: "Matt Benjamin" 
> To: "Daniel Gryniewicz" 
> Cc: "Swen Schillig" , "NFS Ganesha Developers" 
> 
> Sent: Monday, December 12, 2016 9:47:53 AM
> Subject: Re: [ntirpc] closed PRs
> 
> I did not intentionally close PRs.
> 
> Matt
> 
> - Original Message -
> > From: "Daniel Gryniewicz" 
> > To: "Swen Schillig" 
> > Cc: "Matt Benjamin" , "NFS Ganesha Developers"
> > 
> > Sent: Monday, December 12, 2016 9:25:59 AM
> > Subject: Re: [ntirpc] closed PRs
> > 
> > Maybe they were auto-closed when Bill re-organized the branches?
> > 
> > Daniel
> > 
> > On Mon, Dec 12, 2016 at 5:00 AM, Swen Schillig  wrote:
> > > Dan, Matt
> > >
> > > Up until recently we had a bunch of PRs for NTIRPC
> > > being tested/investigated.
> > >
> > > A few weeks ago they were all closed without being merged or at least
> > > commented why they were closed.
> > >
> > > Could you please comment on this and maybe provide some info what your
> > > plans are for those PRs.
> > >
> > > Cheers Swen.
> > >
> > 
> 
> --
> Matt Benjamin
> Red Hat, Inc.
> 315 West Huron Street, Suite 140A
> Ann Arbor, Michigan 48103
> 
> http://www.redhat.com/en/technologies/storage
> 
> tel.  734-821-5101
> fax.  734-769-8938
> cel.  734-216-5309
> 

-- 
Matt Benjamin
Red Hat, Inc.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103

http://www.redhat.com/en/technologies/storage

tel.  734-821-5101
fax.  734-769-8938
cel.  734-216-5309

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


Re: [Nfs-ganesha-devel] [ntirpc] closed PRs

2016-12-12 Thread Matt Benjamin
I did not intentionally close PRs.

Matt

- Original Message -
> From: "Daniel Gryniewicz" 
> To: "Swen Schillig" 
> Cc: "Matt Benjamin" , "NFS Ganesha Developers" 
> 
> Sent: Monday, December 12, 2016 9:25:59 AM
> Subject: Re: [ntirpc] closed PRs
> 
> Maybe they were auto-closed when Bill re-organized the branches?
> 
> Daniel
> 
> On Mon, Dec 12, 2016 at 5:00 AM, Swen Schillig  wrote:
> > Dan, Matt
> >
> > Up until recently we had a bunch of PRs for NTIRPC
> > being tested/investigated.
> >
> > A few weeks ago they were all closed without being merged or at least
> > commented why they were closed.
> >
> > Could you please comment on this and maybe provide some info what your
> > plans are for those PRs.
> >
> > Cheers Swen.
> >
> 

-- 
Matt Benjamin
Red Hat, Inc.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103

http://www.redhat.com/en/technologies/storage

tel.  734-821-5101
fax.  734-769-8938
cel.  734-216-5309

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


[Nfs-ganesha-devel] [ntirpc] closed PRs

2016-12-12 Thread Swen Schillig
Dan, Matt

Up until recently we had a bunch of PRs for NTIRPC 
being tested/investigated.

A few weeks ago they were all closed without being merged or at least
commented why they were closed.

Could you please comment on this and maybe provide some info what your
plans are for those PRs.

Cheers Swen.


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel