summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nlm4.c
Commit message (Collapse)AuthorAgeFilesLines
* gNFS: Log properly for pmap_getport() fail in NLMSantosh Kumar Pradhan2014-04-261-2/+4
| | | | | | | | | | | | | | | | | | | | In NLM callback path, if pmap_getport() FAILs, it just log the error message saying "Is firewall running on the client". It may happen that RPC services are not running e.g. "rpcbind" is not running or nlockmgr (NLM) is not registered with portmapper which all can be checked using "rpcinfo -p" command. FIX: Modify the log message to include the later case mentioned above. Change-Id: If422275b2ab59d1e974a6caa37132f31e9a34329 BUG: 1090782 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/7544 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* rpcgen: Remove autogenerated files instead build on demandHarshavardhana2014-04-251-23/+22
| | | | | | | | | | | | | Avoid modifying autogenerated files and keeping them in repository - autogenerate them on demand from ".x" files Change-Id: I2cdb1fe9b99768ceb80a8cb100fa00bd1d8fe2c6 BUG: 1090807 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7526 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: MacOSX Porting fixesHarshavardhana2014-04-241-10/+28
| | | | | | | | | | | | | | | | | | | | | git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs Working functionality on MacOSX - GlusterD (management daemon) - GlusterCLI (management cli) - GlusterFS FUSE (using OSXFUSE) - GlusterNFS (without NLM - issues with rpc.statd) Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: Dennis Schafroth <dennis@schafroth.com> Tested-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Dennis Schafroth <dennis@schafroth.com> Reviewed-on: http://review.gluster.org/7503 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc,glusterd: Use rpc_clnt notifyfn to cleanup mydataKaushal M2013-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | rpc: - On a RPC_TRANSPORT_CLEANUP event, rpc_clnt_notify calls the registered notifyfn with a RPC_CLNT_DESTROY event. The notifyfn should properly cleanup the saved mydata on this event. - Break the reconnect chain when an rpc client is disabled. This will prevent new disconnect events which can lead to crashes. glusterd: - Added support for RPC_CLNT_DESTROY in glusterd_brick_rpc_notify - Use a common glusterd_rpc_clnt_unref() function throught glusterd in place of rpc_clnt_unref(). This function correctly gives up the big-lock before performing the unref. Change-Id: I93230441c5089039643fc9f5632477ef1b695348 BUG: 962619 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5512 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gNFS: RFE for NFS connection behaviorSantosh Kumar Pradhan2013-11-141-0/+6
| | | | | | | | | | | | | | | Implement reconfigure() for NFS xlator so that volume set/reset wont restart the NFS server process. But few options can not be reconfigured dynamically e.g. nfs.mem-factor, nfs.port etc which needs NFS to be restarted. Change-Id: Ic586fd55b7933c0a3175708d8c41ed0475d74a1c BUG: 1027409 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6236 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dual license: update remaining files with correct license textKaleb S. KEITHLEY2013-10-241-13/+4
| | | | | | | | | | | | | | | Sayan Saha has previously approved changing everthing to dual license but somehow we have missed changing these files. I am explicitly not updating the copyright dates as nothing else that's copyrightable has changed in these files with the license change Change-Id: Ia965eeb7168447d69e28e939ad95ee388873b6e4 BUG: 951549 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6128 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs: Add monotonic clocking counter for timer threadHarshavardhana2013-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gettimeofday() returns the current wall clock time and timezone. Using these functions in order to measure the passage of time (how long an operation took) therefore seems like a no-brainer. This time suffer's from some limitations: a. They have a low resolution: “High-performance” timing by definition, requires clock resolutions into the microseconds or better. b. They can jump forwards and backwards in time: Computer clocks all tick at slightly different rates, which causes the time to drift. Most systems have NTP enabled which periodically adjusts the system clock to keep them in sync with “actual” time. The adjustment can cause the clock to suddenly jump forward (artificially inflating your timing numbers) or jump backwards (causing your timing calculations to go negative or hugely positive). In such cases timer thread could go into an infinite loop. From 'man gettimeofday': ---------- .. .. The time returned by gettimeofday() is affected by discontinuous jumps in the system time (e.g., if the system administrator manually changes the system time). If you need a monotonically increasing clock, see clock_gettime(2). .. .. ---------- Rationale: For calculating interval timing for Timer thread, all that’s needed should be clock as a simple counter that increments at a stable rate. This is necessary to avoid the jumps which are caused by using "wall time", this counter must be monotonic that can never “tick” backwards, ever. Change-Id: I701d31e71a85a73d21a6c5cd15583e7a5a645eeb BUG: 1017993 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6070 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NFS: showmount timesout on fetching export listRajesh Joseph2013-10-041-7/+21
| | | | | | | | | | | | | | | | | | | | | | Bug: 1015184 Issue: showmount timesout on fetching export list. Socket writev function is failing. Cause: XDR encoding of export list is failing. The calling function without checking the error returned by xdr_serialize_exports function is going ahead and writting into the socket causing the NFS process to hang. xdr_serialize_exports function returns -1 on error and message length on success. Fix: Caller should check if the function is returning -1 (error) or not before proceeding. Change-Id: Ic3a5a9356e47b2ac938dd3e429cf2b71c0a0c715 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/6030 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NFS : Coverity Fix.meghana2013-09-191-5/+7
| | | | | | | | | | | | NFS defects reported by Coverity run are fixed. Change-Id: Ib66847e8e66fb4a06b312c80814f9eafb032eba2 BUG: 996390 Signed-off-by: meghana <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/5660 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Varun Shastry <vshastry@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* nfs: Fix for NFS crash during blocking NLM call.Rajesh Joseph2013-08-011-1/+1
| | | | | | | | | | | | | | | | | | Bug 990887: During a blocking NLM call NFS server is crashing. Cause: When nlm4_establish_callback function is called from nlm4svc_send_granted the cs->req->trans pointer is NULL. Thus using this pointer will result in a crash. Whereas cs->trans points to a valid transport object. NLM should use cs->trans instead of cs->req->trans. Fix: Replaced cs->req->trans with cs->trans. Change-Id: I425e48e0aafc9a6c130912edf2e801d8c4c9472d BUG: 990887 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/5452 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc: duplicate request cache for nfsRajesh Amaravathi2013-06-211-24/+24
| | | | | | | | | | | | | | | Duplicate request cache provides a mechanism for detecting duplicate rpc requests from clients. DRC caches replies and on duplicate requests, sends the cached reply instead of re-processing the request. Change-Id: I3d62a6c4aa86c92bf61f1038ca62a1a46bf1c303 BUG: 847624 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4049 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nlm: use appropriate open flags while lockingRajesh Amaravathi2013-03-051-1/+7
| | | | | | | | | | | | | | | In case of a shared/read lock, open the file in O_RDONLY mode, and in the case of an exclusive lock, open the file in O_WRONLY mode to emulate the behaviour posix fcntl implementation as given in the man pages. Change-Id: Ib9eab6570c3bc65f8bd48a14a9d801616213b295 BUG: 916930 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4603 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: use req's uid and gid for open_and_resumeRajesh Amaravathi2013-02-061-7/+4
| | | | | | | | | | | | | | | | Previously, NLM was setting the frame->root->{uid,gid} to root by default. This causes permission problems with root squashing for lock calls. Now, we obtain the uid and gid from rpc request. And duplicate #defines are removed from rpcsvc.h Change-Id: I5d6c87aed8d04aab2619bb913408048c0a02d1e7 BUG: 906884 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4466 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nlm: use virtual ip of server to connect to clientRajesh Amaravathi2013-01-181-60/+74
| | | | | | | | | | | | | | | | | In cases where the servers use virtual ip's, this commit makes sure we use them and not the physical ip. This change also refactors code around nlm4_establish_callback by sending granted msg only after a connection establishment, and removing the separate thread creation. Change-Id: I087362c547a25aa52ef7fc6653845a3863466ee6 BUG: 888283 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4326 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* nfs: avoid blocking lock calls in statedump codeRajesh Amaravathi2012-11-241-2/+11
| | | | | | | | | | | | This change replaces LOCK () with TRY_LOCK () in nlm statedump code. Change-Id: I28c558b68854cf08c3a8190a00d6e3d507317628 BUG: 843819 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4193 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* nfs: do lookup on getattr after brick-status changeJeff Darcy2012-10-191-21/+38
| | | | | | | | | | | | | By doing a lookup, we get a chance to do all of the self-heal checks that would occur if we were using native protocol, and return proper status if the self-heal fails. Best of all, we don't need to misrepresent times. Change-Id: I76477d1e5fce4d83e4029e02fcdd71e81e23110d BUG: 830134 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4058 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Clean up of typepunning errors ( Strict aliasing warnings )Varun Shastry2012-09-171-20/+15
| | | | | | | | | | | Change-Id: I48733967facc526fb523a8dc9bd068f8c5cc5971 BUG: 764282 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3950 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: remove .vector_actor and related changesAnand Avati2012-08-201-24/+24
| | | | | | | | | | | | | The .vector_actor method of rpcsvc_actor_desc is defunct now after rpc unification. Remove the field and all related usage of it. Change-Id: I53048cebeae78f50259e8c4a7fec3497691fe388 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* remove useless if-before-free (and free-like) functionsJim Meyering2012-07-131-2/+1
| | | | | | | | | | | | See comments in http://bugzilla.redhat.com/839925 for the code to perform this change. Signed-off-by: Jim Meyering <meyering@redhat.com> BUG: 839925 Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a Reviewed-on: http://review.gluster.com/3661 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: when setting nlmclnt->rpc_clnt, do not overwrite old rpc_clntKrishna Srinivas2012-06-011-18/+5
| | | | | | | | | Change-Id: I01a1c0c0c8d3402b8fe061258001eea2c0029e83 BUG: 819518 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3419 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Add server-side aux-GID resolution.Jeff Darcy2012-06-011-0/+5
| | | | | | | | | Change-Id: I09bcbfa41c7c31894ae35f24086bef2d90035ccc BUG: 827457 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3241 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: statedump of locksRajesh Amaravathi2012-05-281-0/+42
| | | | | | | | | | | | | | This change allows statedump of nlm locks giving number of clients, number of locks each client holds and the files on which lock(s) is/are held. Change-Id: I6341c12ec58005ef71b93b316b527e610ff7ee8f BUG: 824804 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3432 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: avoid duplicate replies for nlm proceduresRajesh Amaravathi2012-05-241-102/+76
| | | | | | | | | | | | | | | | | The way NLM handles errors and corresponding response messages has been simplified to avoid duplicate replies in case of failures. Also, unlock_cbk and unlock_fd_resume functions are moved in with other unlock functions. Change-Id: I94100aa3c8de95dabebed4598651bbcd49d95782 BUG: 824316 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3414 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nlm: do not use killall command to kill rpc.statdRaghavendra Bhat2012-05-211-2/+22
| | | | | | | | | | | | | | | | | | | killall command will kill the rpc.statd process only in normal mode. If the process is running in valgrind mode, then killall is not able to kill rpc.statd and several instances of rpc.statd will be running for every restart of the nfs server (graph changes etc). So to avoid that get the pid of rpc.statd using /var/run/rpc.statd.pid and send SIGKILL signal to that pid to accomplish what killall command was doing. Change-Id: I2509bf918ddd0dcdd9a4562ee23f13488c7a5979 BUG: 815756 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3225 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: nlm-unlock call should reply success in case it is not able to find ↵Krishna Srinivas2012-05-211-3/+6
| | | | | | | | | | | the lock in the list. Change-Id: I84b298702c445320082ef03de90c924931f1a1e1 BUG: 822384 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3368 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: procedures for PC clientsRajesh Amaravathi2012-05-171-35/+583
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This change introduces four NLMv4 procedures: NM_LOCK, SHARE, UNSHARE and FREE_ALL. These are used by PC clients (windows/dos) to control access to files. 1. NM_LOCK: this lock is not monitored by statd. 2. SHARE: A share reservation is a lock on the whole file that is taken whenever a file is opened on windows clients. This has ACCESS (N, R, W, RW) and DENY MODE (N, R, W, RW). ACCESS: mode of access requested by the client; DENY MODE: what the requesting client wants to deny other clients. 3. UNSHARE: remove a share reservation obtained by SHARE. Called while closing a file. 4. FREE_ALL: remove all share reservations and locks, both monitored and unmonitored, of the calling client. * lock and nm_lock use a common function with only a flag conveying whether or not to monitor a lock. * NOTES: 1. SHARE reservations are not STACK_WIND'd to subsequent xlators. These are maintained in-memory in the nfs xlator. 2. Consequently, for SHARE reservations to work effectively, all PC clients *must* mount from the same gNfs server. Not doing so will result in different servers maintaining separate SHARE reservations which will not be enforced for obvious reasons. Change-Id: Id4f22670a94ed58691a6a7f4c80aa8c11421a277 BUG: 800287 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3212 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com>
* nlm: use correct subvolume when opening the fileKrishna Srinivas2012-04-261-2/+2
| | | | | | | | | Change-Id: Ia0a482c89f10481184dc8f0f5b27cf6612ac114a BUG: 816476 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3233 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs/nlm: remove /var/run/rpc.statd.pid before starting rpc.statd.Krishna Srinivas2012-04-231-1/+8
| | | | | | | | | | | | Sometimes rpc.statd fails to start if rpc.statd.pid exists. Change-Id: Ic6feb375330fceb8dd6c35330757738fb5cbe16f BUG: 814265 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3206 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Saurabh Jain <saurabh@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nlm: register client name with statd for blocking, nonblocking and reclaim ↵Krishna Srinivas2012-04-201-9/+38
| | | | | | | | | | | lock calls Change-Id: If983f7b2f94703442e0745c5cbd2701edb2a972a BUG: 809362 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3097 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nlm: send sm-notify to clients whenever the nfs server is restarted so that ↵Krishna Srinivas2012-04-171-0/+20
| | | | | | | | | | | clients reclaim the locks. Change-Id: I0a8e291ad0a78e2e68070b1d289d32a786da8da2 BUG: 802885 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3096 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs/nlm: dummy actor for FREE_ALL procedureRajesh Amaravathi2012-04-051-17/+29
| | | | | | | | | | | | | | | | | NLM4_FREE_ALL rpc procedure has been provided nlm's null procedure as actor to facilitate windows Nfs mounts. NOTE: windows Nfs needs several other NLM procedures to work. As a result, this patch only makes it possible to do a working mount of a volume with "nolock" option in windows. *Windows mount WITHOUT "nolock" option does NOT work as expected* Change-Id: Ie163982497871312c5bb15f8c141fef460cadc34 BUG: 800287 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3063 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com>
* nlm: print the reason of failure when clnt_create fails to create the client ↵Raghavendra Bhat2012-04-021-1/+2
| | | | | | | | | | | object Change-Id: Icc271e2166dbccc2cc12029e26c674fdb79fe975 BUG: 808390 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3061 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nlm: do not destroy the NULL client objectRaghavendra Bhat2012-03-301-1/+2
| | | | | | | | | | Change-Id: Ie1946b33353a91a266d2b21727d0c8eaa06af7f9 BUG: 808341 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3046 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: fix all the iobuf related refs and unrefsAmar Tumballi2012-03-291-2/+10
| | | | | | | | | | | | | | reviewed the code against all the possible places where iobuf/iobref ref unref are present, and hopefully fixed most of the issues around memory leaks with respect to iobuf Change-Id: I9aa30326962991f8e23acedd389a0e962e097885 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 797875 Reviewed-on: http://review.gluster.com/2994 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: adding extra data for fopsAmar Tumballi2012-03-221-7/+11
| | | | | | | | | | | | | with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-clnt: separate out connection_cleanup() from destroy()Amar Tumballi2012-03-191-2/+12
| | | | | | | | | | | | | | | | | | noticed that there are possibilities where one would like to do a connection_cleanup() before destroying a RPC connection itself, also current code is such that, rpc_clnt_connection_cleanup() does rpc_clnt_ref() and unref(), creating a race window/double unref possibilities in the code. by separating out the functions, this race window/double fault can be prevented. Change-Id: I7ebd3392efa891232857b6db9108b0b19e40fc12 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 802403 Reviewed-on: http://review.gluster.com/2979 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs/nlm: logging NFS client IP address when FH->volume mapping fails or when ↵krishna2012-03-111-9/+31
| | | | | | | | | | | resolve_and_resume fails. Change-Id: Ia89113f46c1d7c9ed629e9dc0ff0779c41ed947f BUG: 765259 Signed-off-by: krishna <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/2900 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nlm: support ipv4 onlykrishna2012-03-101-1/+21
| | | | | | | | | Change-Id: I0d8381b7d4da0e961677cca63d6d2c82836c1632 BUG: 800735 Signed-off-by: krishna <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/2909 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nlm: call nlm4_cancel_fd_resume instead of nlm4_unlock_fd_resume when CANCEL ↵krishna2012-03-071-2/+2
| | | | | | | | | | | proc is called. Change-Id: Id4c74165f24cccb46ca5de406dd7e47e4a8b99e1 BUG: 798222 Signed-off-by: krishna <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/2877 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs: prevent crash during cthon lock testRajesh Amaravathi2012-02-291-5/+7
| | | | | | | | | | | | | When cthon was invoked to test nlm, the mount point would hang, and crash nfs server, and all the brick processes. This path fixes the crashes. Change-Id: Ide88adb7e25ea722b143bfd62e23361ff7be4b67 BUG: 798194 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2842 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* mempool: adjustments in pool sizesAmar Tumballi2012-02-221-1/+2
| | | | | | | | | | | | | | | | | * while creating 'rpc_clnt', the caller knows what would be the ideal load on it, so an extra argument to set some pool sizes * while creating 'rpcsvc', the caller knows what would be the ideal load of it, so an extra argument to set request pool size * cli memory footprint is reduced Change-Id: Ie245216525b450e3373ef55b654b4cd30741347f Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2784 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs/server: Fix compilation warningsVijay Bellur2012-02-201-5/+2
| | | | | | | | | Change-Id: If5c2375adb3769827cf5099cb6b2d19ba75bf238 BUG: 795421 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2776 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* NLM - Network Lock Manger V4Krishna Srinivas2012-02-201-0/+1760
Change-Id: Ic31b8bb10a28408da2a623f4ecc0c60af01c64af BUG: 795421 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/2711 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>