summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
Commit message (Collapse)AuthorAgeFilesLines
* nfs: do not free the constant stringv3.3beta1Raghavendra Bhat2011-07-191-0/+3
| | | | | | | | Change-Id: Iea3838e09efad5cac789f93148fb941d2f7109b1 BUG: 3039 Reviewed-on: http://review.gluster.com/10 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* nfs-rpc: Use mempool for allocating connection objectShehjar Tikoo2011-07-112-3/+19
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3039 (NFS RPC leaks memory in client connection creation on showmount -e) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3039
* nfsrpc: Re-order NFS auth array contentsv3.2.2qa4Pavan T C2011-07-111-6/+6
| | | | | | | | | | | | Some NFS client implementations can default to AUTH_NULL given a certain order of auth_array in MOUNT reply. We re-order it here to make sure that such clients (Example - 2.6.26), do not have such security loop holes. Signed-off-by: Pavan T C <tcp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3144 (permissions given in fuse mount don't have effect in nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3144
* NFS access control list: Decode the NFS requests into mode formatshishir gowda2011-07-073-2/+22
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3057 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
* nfs: Change NFS3 access op to use access fopShehjar Tikoo2011-07-057-174/+84
| | | | | | | | | | | This change is needed so that we have a uniform dependence on posix-acl for permission checks as well as ACL checks. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3057 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
* NFS : Don't set setattr_valid for exclusive create call.Gaurav2011-06-081-2/+5
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2553 (NFS file create with Mac client and UNCHECKED mode returns "Operation not permitted") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2553
* NFS : Handle buffer overflow in nfs3_create_exclusive.Gaurav2011-06-011-2/+4
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2972 (Buffer overflow in nfs3_create_exclusive.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2972
* build fixesVenky Shankar2011-04-111-8/+34
| | | | | | | | Signed-off-by: Venky Shankar <venky@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2550 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
* NFS : Exclusive create storing verifier.Gaurav2011-04-081-2/+2
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2553 (NFS file create with Mac client and UNCHECKED mode returns "Operation not permitted") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2553
* nfs: convert errno EDQUOT into appropriate nfs-errno.Raghavendra G2011-04-061-0/+4
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2607 (Fileop fails when quota is enabled) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2607
* NFS : Store verifier for exlusive mode craete.Gaurav2011-04-061-6/+17
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2553 (NFS file create with Mac client and UNCHECKED mode returns "Operation not permitted") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2553
* nfs: capture attrs of create request in cs->stbuf for later useAnand Avati2011-04-011-1/+1
| | | | | | | | | | | | | | | | | | when attrs coming in as part of create request contain modes other than mode, they were getting discarded previously and a setattr was getting performed on a 0-filled iatt structure. This would result in EPERM at the access control translator as non-root users cannot chown a file to uid 0. Not seen with Linux NFS client as it (very likely) relies upon auth-unix to set the ownership of the file or sends an explicit setattr after the create. Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2553 (NFS file create with Mac client and UNCHECKED mode returns "Operation not permitted") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2553
* nfs-rpc: Append replies to end of connection's txlistShehjar Tikoo2011-03-311-2/+2
| | | | | | | | | | ..instead of prepending. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2491 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2491
* nfs-rpc: Exit txbuf transmission loop on EAGAINShehjar Tikoo2011-03-313-6/+19
| | | | | | | | | | ..instead of looping till the buffer is completely transmitted. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2491 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2491
* nfs: more fixes to capture sattr for further usageAnand Avati2011-03-301-3/+3
| | | | | | | | | | | | | in - mkdir - mknod Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2553 (NFS file create with Mac client and UNCHECKED mode returns "Operation not permitted") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2553
* NFS : Volume access option accepts only valid values.Gaurav2011-03-291-0/+1
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2598 (Volume access option suceeds with any string value) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2598
* nfs3: Flush file I/O call states on open failureShehjar Tikoo2011-03-251-8/+22
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2566 (NFS read hangs when arequal-checksum script is run) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2566
* nfs: Remove redundant and erroneous check for create mode EXCLUSIVE.Vikas Gorur2011-03-251-1/+1
| | | | | | | | | | | | | | nfs3.c/nfs3_create_common: The if condition checks for create mode being EXCLUSIVE. However, when create mode is EXCLUSIVE, this function never gets called (nfs3_create_exclusive is called). Also, instead of checking, it actually sets the value of createmode (= instead of ==). Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2553 (NFS file create with Mac client and UNCHECKED mode returns "Operation not permitted") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2553
* CLI : Validate options farmework.Gaurav2011-03-231-35/+19
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2064 (NFS options are removed upon glusterd restart) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2064
* spelling errors fixed across the code baseAmar Tumballi2011-03-221-1/+1
| | | | | | | | | | | | | recieve -> receive maintainence -> maintenance verison -> version commited -> committed Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2262 (Spelling errors in source) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2262
* Change NFS_PATH_MAX value to 4096shishir gowda2011-03-181-1/+3
| | | | | | | | | | | | This is tmp fix for crash seen on solaris gnfs server is received path is longer than PATH_MAX. On solaris default PATH_MAX is 1024, and linux default PATH_MAX is 4096. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2476 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2476
* Revert "Eliminate syscall tight loop when handling EAGAIN in NFS."Vijay Bellur2011-03-141-14/+1
| | | | This reverts commit 689c1b5044e701e1b695a6e6c80647b9471ba454.
* Revert "Make sure we are looking at the right errno in the fix for bug 2452."Vijay Bellur2011-03-141-4/+1
| | | | This reverts commit dae57d72a58ff61fe6eda800d386bf83574ef5c2.
* nfs-rpc: Fix order of freeing request and connection objectsShehjar Tikoo2011-03-121-7/+20
| | | | | | | | | | | ..to prevent segfaults due to double frees and dereferencing of freed up memory. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2504 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2504
* Make sure we are looking at the right errno in the fix for bug 2452.Pavan T C2011-03-031-1/+4
| | | | | | | | Signed-off-by: Pavan T C <tcp@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2452 (Excessive CPU usage /very low throughput while using NFS mounts) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2452
* Eliminate syscall tight loop when handling EAGAIN in NFS.Pavan T C2011-03-031-1/+14
| | | | | | | | Signed-off-by: Pavan T C <tcp@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2452 (Excessive CPU usage /very low throughput while using NFS mounts) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2452
* NFS : Check for duplicate entries while filling up child_up array.Gaurav2011-03-021-0/+7
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2483 (Showmount output is not consistent with exported volumes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2483
* CLI : NFS disable option through volume set.Gaurav2011-03-011-0/+5
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2094 (Need option to turn off NFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2094
* rpcsvc: safe mem_put of req in nfs_rpcsvc_submit_vectorsAnand Avati2011-03-011-1/+4
| | | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2481 (Crash in NFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2481
* rpcsvc: perform mem_put at the very end for safe unrefsAnand Avati2011-03-011-1/+2
| | | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2481 (Crash in NFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2481
* NFS : Send error reply on rpc decoding failure.Gaurav2011-03-011-0/+1
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2436 (Not able to send error reply in nfs_rpcsvc) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2436
* NFS : Fail Nfs init if volume-id not found.Gaurav2011-02-101-3/+2
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2124 (NFS crashes when volume-id option is not given with dynamic-volume option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2124
* mount3: Do not return error when mount list is emptyShehjar Tikoo2011-02-041-0/+4
| | | | | | | | | | | An exports list can be empty when no subvolumes have come up. No point returning error and confusing the user. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2345 (Taking distribute brick down returns 10006 error on mount command) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2345
* nfs: Set volume started after root lookup succeedsShehjar Tikoo2011-02-041-1/+1
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2345 (Taking distribute brick down returns 10006 error on mount command) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2345
* Logging : Use of uuid_utoa and uuid_utoa_r.Gaurav2011-02-043-29/+20
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2308 (Threadsafe uuid to string conversion function) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2308
* features/access-control: skip access-tests if the call is from fusePranith K2011-01-261-0/+1
| | | | | | | | | | | | | | Fuse cant send aux gids. So access-control checks treat non-primary-group membership of user as "other". So skip access-control checks if the call is from fuse. We added a hack to treat all calls with pid set to 1 as calls from nfs. So for calls with pid not 1 we skip the access-control checks on all fops. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2296 (svn / subversion fails on gluster volume (replicated and non-replicated)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2296
* nfs3: Handle root resolution failuresv3.1.2Shehjar Tikoo2011-01-131-9/+9
| | | | | | | | | | | ..to prevent a second reply to the client which results in accessing a call state structure that gets freed on the first reply. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2286 ([glusterfs 3.1.2qa3]: Crash due to corruption in gf_dirent_free) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2286
* mgmt/Glusterd: make nfs.mem-factor settable through CLIKaushik BV2011-01-111-3/+18
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2277 (Regression in Gluster NFS re-read performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2277
* nfs: Introduce tunable for memory consumptionShehjar Tikoo2011-01-111-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NFS has used a common define called the mem-factor to determine how much memory is allocated for the following items: o inode table o local structures used by nfs for storing fop state o local structures used by nfs3 for storing nfs op state These are all allocated through the mem-pool. The factor is multiplied by a multiple that is specific to each data structure. For eg. define GF_NFS_CONCURRENT_OPS_MULT 15 define GF_NFS_INODE_LRU_MULT 6000 The first value is used for allocating a mem-pool for storing state for each fop or nfs op that is currently being handled. Knowing that linux allows at most 128 in-flight requests, this multiple combined with the default mem-factor of 15 gives us 225 slots in the mem-pool for the local structures. Similarly, 6000*15 gives us a space of 90k inodes in the lru. That means, increasing the common mem-factor will allow increasing the perf under some conditions. This patch introduces the mem-factor as a configurable option. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2277 (Regression in Gluster NFS re-read performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2277
* nfs3: Ignore requests for volumes without a single CHILD-UPShehjar Tikoo2011-01-073-42/+78
| | | | | | | | | | | NFS ignores the requests for subvolumes on which child-up has never been received. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2200 (cp dies with "Invalid argument" after failover) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2200
* nfs3: Force root lookup before starting fh resolutionv3.1.2qa3Shehjar Tikoo2010-12-293-7/+127
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2200 (cp dies with "Invalid argument" after failover) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2200
* nfs/server: unrefing inodes on error in nfs_loc_copy ().Mohammed Junaid Ahmed2010-12-291-0/+8
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2252 (unreffing of inodes not done when memory allocation fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2252
* nfs: Support subdirectory exportsShehjar Tikoo2010-12-293-17/+183
| | | | | | | | | | | | | | | | | | Enable exporting directories as separate exports. Even though the directories wont show up in showmount output, they'll still be mount'able. The new option: nfs.export-dirs <on|off> is enabled by default so that users dont have to wait till this option is incorporated into the gluster command line. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1743 (XenServer is not compatible with GlusterNFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1743
* nfs3: Access cbk must account for auxgids on group access checksShehjar Tikoo2010-12-273-6/+23
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2045 (Write permission denied for non-primary group membership) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2045
* nfs: Do not touch iatt on failed fopsShehjar Tikoo2010-12-271-20/+30
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2169 (NFS crash in nfs-fops due to failed fop from subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2169
* nfs: fix warnings due to format string mismatches during invocation of gf_log.Raghavendra G2010-12-142-4/+4
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2211 ((re)introduce warnings for format string/parameter mismatch) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2211
* nfs: cleanup inode_ref/inode_unref to fix inode leaks and extra unrefsv3.1.2qa1Anand Avati2010-12-073-16/+66
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2195 (Crash in __inode_retire on NFS failover) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2195
* nfs: Start nfs process even if portmap registration failsShehjar Tikoo2010-12-031-4/+7
| | | | | | | | | | | | It helps to have the process be listed in ps ax|grep output so that user can get the path to the log from the listed command line and check what the problem is. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2093 (volumes cannot start when one node in a replicated setup is down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2093
* nfs3: Prevent second lookup on a fresh entry lookupv3.1.1qa10Shehjar Tikoo2010-11-253-3/+11
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756
* nfsrpc: Add new macro nfs_rpcsvc_request_procnumShehjar Tikoo2010-11-251-0/+1
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1756 (NFS must revalidate inode on first ESTALE on lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1756