summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe/src/stripe.c
Commit message (Collapse)AuthorAgeFilesLines
...
* core: remove 'ino' variable from 'inode_t' structureAmar Tumballi2011-11-161-1/+0
| | | | | | | | Change-Id: I0f078d1753db65d2f2e0380d1b0450c114cf40dd BUG: 3518 Reviewed-on: http://review.gluster.com/522 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Cluster/stripe setattr: Wind only to first_child for special filesshishir gowda2011-11-161-1/+9
| | | | | | | | Change-Id: Ib055578477461a24562d5da139809cf0965b931e BUG: 3807 Reviewed-on: http://review.gluster.com/724 Reviewed-by: Amar Tumballi <amar@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* stripe readv_cbk: Fix stat return valuesshishir gowda2011-11-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Workaround - If the read request, does not fall to the subvolume with the largest file size set, then we never return the correct size. This leads to clients seeing a truncated file error. The work around is to wipe stat being returned as part of read call. Problem - We were passing the stbuf returned by the first child/index, which can be different to the size/blocks returned by stat. This led to applications viewing the file as being truncated. The stbuf size needs to be the largest of all results, and blocks the aggregation from all subvolumes. (similar to stat) BUG: 3774 Change-Id: I46c53c18b2b42b1f5b86b05555bbab73bf993476 Reviewed-on: http://review.gluster.com/666 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* Stripe mknod: Always call mknod if REGULAR file on first child.shishir gowda2011-10-211-46/+137
| | | | | | | | | | | | This prevents a possible race between mknod(REGULUAR files) and remove. mknod first creates on the first_child, and only if successful, on other subvolumes. Change-Id: I0ddaeb92c1884c771c966bb151db052ab5735367 BUG: 3727 Reviewed-on: http://review.gluster.com/608 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* build: warning suppression (round n)Amar Tumballi2011-10-201-6/+3
| | | | | | | | | | with this patch, there are no more warnings with gcc (GCC) 4.6.1 20110908 Change-Id: Ice0d52d304b9846395f8a4a191c98eb53125f792 BUG: 2550 Reviewed-on: http://review.gluster.com/607 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Stripe: Prevent dir gfid mismatch and ENOTEMPTY errorsshishir gowda2011-10-051-103/+333
| | | | | | | | | | | | | | | | | | | | gfid mismatch issue- rmdir- first remove from non first child (FC), and then last from FC. If one fails, FC entry is not removed and op is failed. mkdir- first create dir from FC, followed by other childs. If FC is success then, we succeed, banking on entry self heal ENOTEMPTY issue- unlink: remove from non FC and then on success remove from FC. If non FC remove fails, fail unlink create- Create first on FC, and on success create on non FC. Change-Id: Ia8b9e92cd2aba891d249d1995e383fea0581ffca BUG: 3663 Reviewed-on: http://review.gluster.com/557 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* statedump: do not print the inode number in the statedumpRaghavendra Bhat2011-10-011-22/+8
| | | | | | | | | | | | | Since gfid is used to uniquely identify a inode, in the statedump printing inode number is not necessary. Its suffecient if the gfid of the inode is printed. And do not print the the inodelks, entrylks and posixlks if the lock count is 0. Change-Id: Idac115fbce3a5684a0f02f8f5f20b194df8fb27f BUG: 3476 Reviewed-on: http://review.gluster.com/530 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* xlator options: revamp xlator option validation/reconfigure codeAnand Avati2011-08-181-97/+6
| | | | | | | | | | | | | | | | | - move option handling to options.c (new file) - remove duplication of option validation code - remove duplication of gf_log / sprintf - get rid of xlator_t->validate_options - get rid of option validation in rpc-transport - get rid of validate_options() in every xlator - use xlator_volume_option_get to clean up many functions - introduce primitives to init/reconfigure option types Change-Id: I51798af72c8dc0a2b9e017424036eb3667dfc7ff BUG: 3415 Reviewed-on: http://review.gluster.com/235 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: I2d10f2be44f518f496427f257988f1858e888084 BUG: 3348 Reviewed-on: http://review.gluster.com/200 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* LICENSE: s/GNU Affero General Public/GNU General Public/Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: I3914467611e573cccee0d22df93920cf1b2eb79f BUG: 3348 Reviewed-on: http://review.gluster.com/182 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Stripe_readdirp: Fix race in wind/unwind which led to crashshishir2011-07-281-9/+17
| | | | | | | | | | | | | | | | | | Scenario - The race window exists when before we wind to a stat call in readdirp_cbk, whereas stats have returned to cbk. We would free up local, which leads to a crash. Fix - We assume all entries to be regular files, and set the wind_count as a multiple of entries * subvol (stat calls). When we encounter a non regular file, we decrement the windcount accordingly (subvol times). If the last entry happens to be a non-regular file, and all stat calls have wound back, we unwind from here itself. Change-Id: Ia8e225ef557cbe1fedb9b72de9bd9fa61f371a24 BUG: 3257 Reviewed-on: http://review.gluster.com/115 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* cluster/stripe: send the xattr keys with create/mknod itself.Amar Tumballi2011-07-141-189/+177
| | | | | | | | | | so stripe is more acl friendly Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3160 ([818f8c87d56bc46d0d0903275699351b66f17e57] Posix compliance test hangs during link tests in distributed-stripe.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3160
* stripe: changes in volume_options to assist volume set help/help-xmlKaushik BV2011-07-121-5/+47
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* afr/stripe: collect pathinfo xattrs from all childsVenky Shankar2011-07-121-0/+178
| | | | | | | | Signed-off-by: Venky Shankar <venky@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3046 (getxattr for afr should returns realpath from all childs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3046
* cluster/stripe: quick-read friendly behavior in lookupAmar Tumballi2011-07-121-5/+22
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3140 (contents of files are invalid after apply patch 7573) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3140
* cluster/stripe: cleanup and memory leak fixesAmar Tumballi2011-07-121-118/+56
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3140 (contents of files are invalid after apply patch 7573) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3140
* Stripe selfheal: Prevent spurious STACK_DESTROY callshishir gowda2011-06-221-0/+4
| | | | | | | | | | The stack is destroyed in the cbk Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3056 ([4597929cc527f8abaf9ef9e1d5499ea416e5c7ff] Crash in client at client3_1_mknod_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3056
* Stripe lookup: aggregate xattrsshishir gowda2011-06-221-0/+4
| | | | | | | | | | | stripe default setxattr works on first child. If the first cbk is not the first child, then we were loosing the xattrs. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3066 (aggregate xattrs in stripe lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3066
* cluster/stripe: check if key is a valid ptr. before dereferncingKaushik BV2011-06-081-1/+1
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2978 (Geo-replication fails on stripe(Master) setup.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2978
* stripe: changes to print stripe information in statedumpRaghavendra Bhat2011-05-311-0/+63
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2958 (stripe information is not printed in statedump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2958
* cluster/stripe: Fix a typo in strncmp.Junaid2011-05-301-1/+1
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2760 (Quota: stripe volume not showing the quota size properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2760
* cluster/stripe: make sure gfid is checked with valid dataAmar Tumballi2011-05-111-3/+6
| | | | | | | | | | | | | earlier logic of determining if different subvolumes have different gfid for same file had a flaw. It could have checked with a empty gfid field in case a reply comes from other subvolumes before first subvolume Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2773 ([glusterfs-3.2.0qa12]: stripe lookup says gfid different) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2773
* Validate stripe-block-size optionshishir gowda2011-05-111-0/+12
| | | | | | | | | | Minimum size is 512 bytes and should be a multiple of 512 bytes. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2861 (Stripe block-size has no check for valid option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2861
* cluster/stripe: aggregate xattrs holding quota-size in lookup and getxattr ↵Raghavendra G2011-04-151-1/+121
| | | | | | | | | | calls. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2760 (Quota: stripe volume not showing the quota size properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2760
* log gfid mismatches for the same file in cluster xlator lookupAmar Tumballi2011-04-061-0/+7
| | | | | | | | | | | | This can help in pin pointing some of the issues resulted in gfid mismatch for the same file, which is harder to find through basic debugging/logging of current codebase. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2346 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* Implement stripe readdirp fopsshishir gowda2011-03-251-0/+216
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2159
* CLI : Validate options farmework.Gaurav2011-03-231-31/+18
| | | | | | | | 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
* Solaris build fixesshishir gowda2011-02-221-1/+1
| | | | | | | | | | | | | | Disable geosync build for non-linux platforms. And fix solaris related build failures.The symbol getxattr was not available on solaris. The build on linux passed as getxattr symbol was available in the library. The argument was not being used, hence removed it. Make 64 bit build default in CFLAGS option by passing -m64 option Signed-off-by: Shishir Gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2440 (Fix solaris build issues seen on latest git) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2440
* adding libxlator, to ensure proper client side aggregation of marks by ↵Kaushik BV2011-01-271-0/+108
| | | | | | | | | | | clustering translators Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2310 (georeplication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2310
* stripe: fix memory leakAnand Avati2010-12-291-0/+4
| | | | | | | | | | | destroy the frame copied and clean the local structure in stripe to avoid memory leak Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2253 (Memory leak in glusterfs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2253
* Make STRIPE_STACK_UNWIND and STRIPE_STACK_DESTROY default calls in stripeshishir gowda2010-12-271-74/+54
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2134 (inode leaks on stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2134
* Remove check for path in stripe_local_wipeshishir gowda2010-12-271-4/+2
| | | | | | | | | | | The check for path is done in loc_wipe. During loc_copy, inode ref is taken before path set succeeds or fails. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2134 (inode leaks on stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2134
* Stripe I/O exits when graph changesshishir gowda2010-11-151-0/+1
| | | | | | | | | | Adding event CONNECTING to be handled like CHILDUP in notify. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2111 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2111
* stripe: allow lookup on an entry if other than first subvolume is downAmar Tumballi2010-11-131-1/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2099 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2099
* Copyright changesVijay Bellur2010-10-111-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* Possible race condition between cleanup and dereferencingshishir gowda2010-10-081-0/+1
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1760 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1760
* Reply back to CLI on error, by validating each xlator's optsKaushik BV2010-10-051-0/+43
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
* Change GNU GPL to GNU AGPLPranith K2010-10-041-3/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1388 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1388
* rmdir: introduce extra flags parameter in FOP prototypeAnand V. Avati2010-10-021-3/+5
| | | | | | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* Changes to replace flock with gf_flock across GlusterFS.Pavan Sondur2010-10-011-2/+2
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 865 (Add locks recovery support in GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=865
* Glusterd: gluster volume set <volume> <option> <value>Kaushik BV2010-09-181-3/+33
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
* stripe: fixed create issues after gfid changesAmar Tumballi2010-09-091-4/+18
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1581 (stripe create is broken) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1581
* gfid: changes in mkdir() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-4/+7
| | | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* gfid: changes in mknod() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-5/+7
| | | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* gfid: change in create() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-2/+3
| | | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* remove dead assignments in stripe.cAmar Tumballi2010-07-141-11/+28
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1071 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1071
* NULL dereference fixes in code base after running with 'clang'Amar Tumballi2010-07-021-4/+7
| | | | | | | | | | | | * 212 logical (NULL deref/divide by zero) errors reduced to 28 (27 of them in contrib/ and lex part of codebase, 1 is invalid) * 11 API errors reduced to 0 Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* cluster/stripe: NULL pointer dereference checks addedAmar Tumballi2010-05-281-152/+359
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* cluster/stripe: added STACK_UNWIND_STRICT macroAmar Tumballi2010-05-281-664/+717
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* Fix for crash in stripe_entry_self_healAnush Shetty2010-05-081-1/+1
| | | | | | | | | Signed-off-by: Anush Shetty <anush@gluster.com> Signed-off-by: Anush Shetty <anush@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 887 (Crash in stripe_entry_self_heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=887