summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* features/marker: fix race-conditions, memory corruptions and fd-leaks.Raghavendra G2011-07-207-374/+1019
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove xattrs from newpath after rename is complete. - hold inodelk on both parents (if they are different) before doing rename and gather contribution values of oldpath and newpath to their parents while still holding the locks. Use these contribution values to reduce parent sizes. - performance optimization: abort updation process if delta is zero. - libglusterfs/call-stub: Allow unwinding of frames for rename during call_resume_unwind. - fixes in dirty inode healing codepath: - fix fd-leak of fd opened on the directory. - don't add (instead just assign) next offset at which readdir has to be sent to local->d_off. - assign to local->d_off before winding lookup call to get child contribution. - use mutexes while accessing contribution values stored in inode context. - use contribution values from backend instead of in-memory while reducing parent sizes during rename - wipe parent_loc in marker_local_unref. - check for refcount being zero holding lock in quota_local_unref. - hold parent inodelk during creation of xattrs on directory. - use contribution value to reduce parent's size, if the value to be subtracted is not passed as argument to reduce_parent_size. - skip contribution creation on root. Change-Id: I97a9ac7efc5cf82abd3837fa6f9766c35676a908 BUG: 2697 Signed-off-by: Junaid <junaid@gluster.com> Reviewed-on: http://review.gluster.com/31 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* 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>
* glusterd rebalance: use lstat() instead of stat()Amar Tumballi2011-07-191-6/+6
| | | | | | | | | | | | so the symlinks pointing to directories are not considered as directories themself and the control flows outside gluster's scope Change-Id: Iae910ce6c68886d34ae6e5efe46062481b40cd25 BUG: 3191 Reviewed-on: http://review.gluster.com/26 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* fuse: fix inode-leaks in fuse_lookup_and_resume codepath.Raghavendra G2011-07-172-12/+31
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2525 ([glusterfs-3.1.3qa8]: inode leak in rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2525
* io-threads: Initialize mutex and condshishir gowda2011-07-171-0/+12
| | | | | | | | | | Thanks to Emmanuel Dreyfus for sending out the fix. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3170 (Uninitialized mutex and cond in io-threads) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3170
* posix: perform readdir filling in locked regionAnand Avati2011-07-161-82/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two application threads share an open dir fd (DIR *) and issue readdirs, storage/posix will receive separate readdir fops in separate threads in parallel. This has two-fold issues 1. In the following pair of operations - entry = readdir(dir) and strcpy (gf_dirent->name, entry->d_name) @entry is a static buffer in libc which can get reused by another thread to get filled with a longer name. This can cause the second operation to overflow the buffer as the allocation was for the smaller name. 2. In the following pair of operations - seekdir (dir, offset) and entry = readdir(dir) If two threads are executing these sequence in parallel in separate threads, then one of them will end up reading wrong/unexpected entries. It would be sufficient to fix 1. by using readdir_r but that still keeps the second race open. Hence the patch moves all the set of operations to a locked region which solves both races. Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3171 (Crash in server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3171
* features/locks: Avoid using reqlock to prevent racev3.2.2qa8v3.2.2Vijay Bellur2011-07-132-2/+2
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* storage/posix: set all keys present in 'params' dict while creating an entryv3.2.2qa7Amar Tumballi2011-07-121-2/+67
| | | | | | | | | | | so, there is no need to do a 'setxattr()' after entry creation, which could now fail due to ACL on server side. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3164 (set xattr keys while entry creation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3164
* mgmt/glusterd: write complete string contained in value in to the volinfo file.Mohammed Junaid Ahmed2011-07-121-4/+8
| | | | | | | | | | | Currently, we are writing 4096 bytes of value variable to the volinfo file irrespective of its lenght, thus tampering with the volinfo file structure. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3154 (glusterd fails to restart) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3154
* cluster/distribute: send proper 'params' dictionary during linkfile creationAmar Tumballi2011-07-121-4/+13
| | | | | | | | | | | | when the code path enters the 'subvol_filled()' case, local->params is set, which contains the 'gfid-req' value, but the linkfile creation was not checking for its existance. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3159 (mknod (linkfile creation) with no 'gfid-req' key) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3159
* server: Reassociating 'old' conn can lead to chaos.Krishnan P2011-07-121-22/+12
| | | | | | | | | | | | | | | | | Since we moved to a single socket connection b/w client and server, inherting connection state is unnecessary and can sometimes be dangerous when clients reconnect even before the server detects a socket error on the old connection. Dirty detail: This reassociation results in 'ref count' not decreasing in tandem with the connection disconnects. This results in a resource leak. Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3104 (Self-heal does not work in dis-rep!) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3104
* glusterd rebalance: mount with '--acl' option for rebalancing.Amar Tumballi2011-07-121-1/+1
| | | | | | | | | | so posix-acl xattrs gets rebalanced too. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3069 ('gluster rebalance' doesn't preserve any of the extended attributes of the migrated file) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3069
* cluster/dht: fix race between two directory renamesv3.2.2qa5Anand Avati2011-07-121-7/+79
| | | | | | | | | let the race get arbitrated at the dst_hashed subvolume. Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
* storage/posix: detect race in posix_rename()Anand Avati2011-07-121-0/+23
| | | | | | | | | | | | detect a race in rename between two clients by checking for reassigned gfid or presence of dir when not expecting. checks not necessary for rename of files. Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
* glusterd rebalance: bring in feature to migrate extended attributes tooAmar Tumballi2011-07-121-0/+61
| | | | | | | | | | | | | currently when a file gets migrated, the extended attributes of the files are getting lost (which should be treated as data-loss). Change-Id: I7068e6b67e614f2016e6eae92c247990ae01e74a Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3069 ('gluster rebalance' doesn't preserve any of the extended attributes of the migrated file) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3069
* 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
* quota: update limit stored in inode-ctx when limit is removed on a directory.Raghavendra G2011-07-111-2/+7
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2971 (quota remove command doesn't remove quota on directories.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2971
* 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
* posix-acl: perform access checks on read/write/truncate for NFS callsv3.2.2qa3Anand Avati2011-07-081-3/+108
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* access-control: Handle F_OK in perm check, and O_APPEND, O_TRUNC in openshishir gowda2011-07-081-0/+5
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3057 (acl permissions don't work on nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
* DHT access: For nfs calls, op_ret is always 0, and mode is op_errnoshishir gowda2011-07-081-1/+10
| | | | | | | | | | Return the values received from the subvol Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3057 (acl permissions don't work on nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
* client-handshake: skip CHILD_DOWN notifications when client is querying port ↵Raghavendra G2011-07-071-0/+2
| | | | | | | | | | using different volume names in the presence of rdma. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* mnt/fuse: generate uuids in fuse_lookup, not in fuse_lookup_resume.Raghavendra G2011-07-071-1/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041
* cluster/afr: save xattr of all the children in lookup_cbkPranith K2011-07-071-2/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3138 ([release-3.2]: ls shows 2 entries) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3138
* cluster/afr: previous read_child should take precedence over priv->read_childPranith K2011-07-072-2/+9
| | | | | | | | | | | | Lookup uses the sources array to decide if a child is read_child or not. So if afr_mark_sources returns 0 i.e. all children are sources, explicitly mark them as sources. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3138 ([release-3.2]: ls shows 2 entries) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3138
* 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
* access-control: NFS access control expects a return of valid modeshishir gowda2011-07-071-13/+29
| | | | | | | | | | | The permission check is same as that of posix. We break the requests into single checks, aggregate all the valid modes and return in reply. 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
* features/locks: Do not block UNLOCKsVijay Bellur2011-07-072-2/+2
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* access-control: Save group permissions returned from backendv3.2.2qa2shishir gowda2011-07-052-2/+9
| | | | | | | | | | | The backend permissions returned in stat for group is already masked value. Use the xattr value Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 3102 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3102
* access-control: Return mode part of NFS access control requestshishir gowda2011-07-051-8/+18
| | | | | | | | 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
* mount.glusterfs: support -o acl parameterv3.2.2qa1Anand Avati2011-07-011-0/+7
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* access-control: superseded by posix-acl translatorAnand Avati2011-07-014-2377/+9
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* posix-acl: implementation of POSIX ACL as a translatorAnand Avati2011-07-019-1/+2141
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* storage/posix: set ACL keys during new entry/inode creationsAnand Avati2011-07-011-0/+63
| | | | | | | | | | honor "system.posix_acl_access" and "system.posix_acl_default" keys in params dict to setxattr into the backend while creating new entry/inodes Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* fuse: introduce "noacl" option to disable ACL checksAnand Avati2011-07-012-10/+49
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* fuse: fill frame->root->groups with aux gids of the processAnand Avati2011-07-011-0/+53
| | | | | | | | | | Pick the groups in /proc/<pid>/status from the line starting with "Groups: " by parsing the list of integers which follow Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* dht: set linkto xattr with linkfile create (mknod)Anand Avati2011-07-011-75/+13
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2815 (Server-enforced ACLs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2815
* features/marker-quota: call stack destroy when hardlink count is not greater 1.Junaid2011-07-011-0/+6
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* mnt/fuse: Do a pthread_cond_broadcast for both CHILD_UP and CHILD_DOWN events.Raghavendra G2011-07-012-6/+7
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* mount/fuse: wait till CHILD_UP event is recieved to do the first lookup.Raghavendra G2011-07-011-9/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* cluster/afr: set frame local before access windPranith K2011-07-011-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3072 (Crash in afr_access_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3072
* cluster/afr: fix the range of the lock taken in [f]truncatePranith K2011-07-011-4/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3077 (afr [f]truncate locks wrong region in transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3077
* fuse: consider a lookup as revalidate even if the inode is present in new graph.Raghavendra G2011-06-221-10/+12
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041
* performance/quick-read: reset open_in_transit to zero in case of an error.Raghavendra G2011-06-221-0/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3011 (Uninterruptible processes writing(reading ? ) to/from glusterfs share) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3011
* performance/quick-read: Perform error handling only when GF_CALLOC failsVijay Bellur2011-06-221-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3011 (Uninterruptible processes writing(reading ? ) to/from glusterfs share) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3011
* pump: mark pending before notify to children to avoid race in single CPU.Krishnan P2011-06-221-2/+2
| | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3050 ('replace-brick' hangs on vm's) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3050
* afr: bg self-heal must be off if self-heal-count=0.Krishnan P2011-06-221-3/+3
| | | | | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3036 (self-heal problem in replace-brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3036 BUG: 3036 (self-heal problem in replace-brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3036
* mgmt/glusterd: Set the generic options in the graph before merging it with ↵Junaid2011-06-161-8/+8
| | | | | | | | | | the parent graph while building nfs-server volfile. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3003 (Modification of one of the options of volume is reflected in all the volumes in the nfs-server-volfile) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3003
* features/locks:check for inodelk lists and blocked inodelks instead of ↵Raghavendra Bhat2011-06-161-3/+3
| | | | | | | | | | entrylk in inodelk.c Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3032 (entrylks are checked instead of inodelks while checking the blocked inodelks conflict) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3032