summaryrefslogtreecommitdiffstats
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>
* 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>
* s/Patchwork/Gerrit/Anand Avati2011-07-183-64/+104
| | | | Change-Id: Ib6718da3ecdb4e0fdad0d6855f46c18d8287af41
* 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
* cli: 'QUOTA' Display the limit-set and size of the directory in KB, MB, etcJunaid2011-07-141-4/+13
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2829 (Display the quota limit as it is configured) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2829
* libglusterfs/common-utils: Added gf_uint64_2human_readable function.Junaid2011-07-142-0/+38
| | | | | | | | | | | This function converts the given number to its corresponding representation in KB, MB, etc. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2829 (Display the quota limit as it is configured) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2829
* 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
* add 'logrotate' config file to the packageAmar Tumballi2011-07-122-1/+31
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2053 (We need to support the standard *nix 'logrotate' for server and client log files.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2053
* 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
* glusterfs: add --acl command line option to load ACLs on the client sideAnand Avati2011-07-014-0/+40
| | | | | | | | | also set the turn off filtering of ACL keys in FUSE xattr FOPs. 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-015-2379/+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-0110-1/+2144
| | | | | | | 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
* byte-order: htole*/letoh* and htobe*/betoh* for forced endian conversionsAnand Avati2011-07-011-6/+166
| | | | | | | 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
* rpc-transport/rdma: call ibv_fork_init to make rdma work with fork.Raghavendra G2011-07-011-0/+1
| | | | | | | | 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