summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rfc.sh: set 'Change-Id: ' header on first runAnand Avati2012-08-152-1/+4
| | | | | | | | | | Let first run of rfc.sh include 'Change-Id:' as well Change-Id: I7b45a00d98f8c70ca3658c223a98f412f20cbb6f BUG: 764890 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3785 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Optimize readdirp calls in DHTshishir gowda2012-08-137-2/+71
| | | | | | | | | | | | | | | | | Bring in option which is supported by posix xlator to filter out directory's entries from being returned. DHT would now request non-first subvols to filter out directory entries. dht xlator-option readdir-optimize will enable this optimization Change-Id: I35224bc81c9657f54f952efac02790276c35ded5 BUG: 838199 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NetBSD swapcontext() portability fixEmmanuel Dreyfus2012-08-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Further analysis of the problem reveals some wrong conclusions I made before. NetBSD's swapcontext() preempts no thread. It alters the pthread private pointer, leading to multiple threads with the same pthread pointer. That led me to the wrong conclusion that thread were preempted. I guess this can be called a bug: NetBSD swapcontext() is incompatible with libpthread. Fortunately, there is a workaround, swapcontext() can be told to let the pthread private pointer untouched. This change just does that, fixing the crashes without sacrifying performances. There is just one problem: not all NetBSD ports have the capability to do that: at least ports using sh3, sparc, sparc64 and powerpc are left broken by this change. This problem will be addressed by upcoming fixes in NetBSD. BUG: 764655 Change-Id: I4191cb984176fce7064730ab55bd62c9156846cd Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3794 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: store the wb_inode in local before windingRaghavendra Bhat2012-08-111-1/+3
| | | | | | | | | | | | | | | * Store the write-behind's inode context in the local structure before winding the call so that in callback inode context is found. * Before returning EBADFD check if the inode context (wb_inode) is NULL, along with the inode type. Change-Id: If5a1c667efe6882a6efef1439cee3effc32ff9a7 BUG: 846536 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3796 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* fuse-bridge: fuse_thread_proc: avoid realloc-clobber induced leak upon OOMJim Meyering2012-08-081-3/+4
| | | | | | | | | Change-Id: I835d14b702b875bb07f41e157583592df9b72f36 BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3792 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep: don't leak or segfault upon OOMJim Meyering2012-08-081-2/+4
| | | | | | | | | | | | | | | | In glusterd_urltransform, a failed GF_REALLOC would clobber the would-be-realloc'd buffer, linearr, with a NULL pointer, (thus leaking that memory) and then control would pass to the error-handling code that would attempt to free (via glusterd_urltransform_free) linearr[i], which is almost guaranteed to segfault when linearr is NULL. Change-Id: Ia75bf70fd8ff893a18804d49688048ef96db6037 BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3791 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* logging: do the 'right' check for loglevelAmar Tumballi2012-08-071-6/+6
| | | | | | | | | | | | logging functions should not print anything if loglevel in argument list is lower than what is set for the process. Change-Id: Id61779ffe6b76724243aa222c6889dd51a8f2f9b Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 846201 Reviewed-on: http://review.gluster.com/3786 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: moved back the pthread_key_t specific variables as globalAmar Tumballi2012-08-064-31/+31
| | | | | | | | | | | | | in a patch to move all the global variables inside 'ctx', moved all the pthread_key_t specific globals, which needed to be global, not inside some structures. Change-Id: I5e7107a8a64f5b80e90fd469fb084f62b2312705 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 764890 Reviewed-on: http://review.gluster.com/3783 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: while building graph, set xl->ctxAmar Tumballi2012-08-051-0/+2
| | | | | | | | | | | | | as glusterfs_'ctx'_t is used as reference in many places, it is important to set it right. In many places, xl->ctx is assumed to be present, hence it has to be set right. Change-Id: I37d767f384edb1819277c4ecee97dd94108aedff Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 845715 Reviewed-on: http://review.gluster.com/3779 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: reduce the usage of global variablesAmar Tumballi2012-08-0323-389/+325
| | | | | | | | | | | | | | | | | | | | | | | * move all the 'logging' related global variables into ctx * make gf_fop_list a 'const' global array, hence no init(), no edits. * make sure ctx is allocated without any dependancy on memory-accounting infrastructure, so it can be the first one to get allocated * globals_init() should happen with ctx as argument not yet fixed below in this patchset: * anything with 'THIS' related globals * anything related to compat_errno related globals as its one time init'd and not changed later on. * statedump related globals Change-Id: Iab8fc30d4bfdbded6741d66ff1ed670fdc7b7ad2 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 764890 Reviewed-on: http://review.gluster.com/3767 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: ignore any erros that might've happened while resolving entry in ↵Raghavendra G2012-08-033-25/+117
| | | | | | | | | | | | | | | | | | | resolver. One error we hit was absence of gfid on backend. While the lookup code-path generates a new uuid and sets it on file, resolver code doesn't do that. Since, functionally (atleast after resolving parent inode, we would be resolving the path in new-graph) both resolver and lookup does same work, it would be no harm in ignoring errors during resolving the entry. This would help us to continue with the _extra_ work (like healing gfid as of now) in fuse_lookup_resume. Change-Id: If46d5e07c32e67b5744287a6ef55d0b0fe347689 BUG: 821138 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3344 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Fix a compilation failure when libxml2-dev is not presentVijay Bellur2012-08-031-0/+3
| | | | | | | | | | | Addresses problem introduced by 1e4a2354b57a1eb Change-Id: I7cea76410769c584af6960860260fbd061a6df8a BUG: 844696 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3778 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse-resolve: consider cases where an entry should be resolved even when ↵Raghavendra G2012-08-031-0/+13
| | | | | | | | | | | | | | | parent belongs to active itable. When parent is root, the parent inode returned will always be active_subvol->itable->root and hence there can be cases where we should explicitly resolve the entry in active graph. BUG: 804592 Change-Id: I5829278e27435e06785a923ce8776616cedfb519 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3710 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-cache: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-021-7/+60
| | | | | | | | | | | | Do not use pthread_mutex_lock and gf_log functions while dumping information to statedump, to avoid deadlocks. Change-Id: I2bb4592126c5d1eacf614130815a839c4a90c59a BUG: 843787 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3758 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Made volume set help/help-xml a non-cluster operation.Krishnan Parthasarathi2012-08-028-57/+87
| | | | | | | | | | | | - Retained apparent redundant checks in stage, commit phase of set volume for the help options for backward compatibility Change-Id: Iaefe3805d6b5eeeced2e7e4870830edf3e61dc87 BUG: 844696 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3761 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* performance/quick-read: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-021-3/+16
| | | | | | | | | | | | Do not use pthread_mutex_lock and gf_log functions while dumping information to statedump, to avoid deadlocks. Change-Id: I0d30b04ae322f131b7a42d277ebd4385e83769e6 BUG: 843789 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3764 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glfsxmp extensionAnand Avati2012-08-022-5/+32
| | | | | | | | | Change-Id: I3859621637025e464bc83d748bae7dff9808643f BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3735 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: let glfs_init() return on non-RPC errorsAnand Avati2012-08-021-0/+4
| | | | | | | | | Change-Id: Ic3a15044434926127b8de273b1033b8ad452290c BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3732 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: set errno in glfs_init()Anand Avati2012-08-022-0/+3
| | | | | | | | | | | save errno from glfs_init_done and set it in glfs_init_wait() Change-Id: I1a2f43a7e7b0f07f279c175df987ff94d642b629 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3771 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: missed setting port optionAnand Avati2012-08-021-0/+1
| | | | | | | | | | Change-Id: I72790de10cefaae3d3307b6fbb9899907b019ccc BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3733 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Bharata B Rao <bharata.rao@gmail.com>
* glusterd: Fix glusterd crash resulting from uninitialised pointerKrutika Dhananjay2012-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | PROBLEM: glusterd crashes during replace-brick operation as the pointer old_brickinfo is dereferenced without being initialised. FIX: Have old_brickinfo initialised to point to the brick info of the brick being replaced before dereferencing it. TEST: Ran glusterd in debug mode before and after the fix; process crash ceased in the latter case. Change-Id: I53f21b5424f534bbdba3b3fc407d4501a2c0052f BUG: 844332 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.com/3777 Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Unwind with correct pre/post parent bufsPranith Kumar K2012-08-023-403/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: In case of dir fops create, mknod, mkdir, link, symlink, rename if the fop fails on read-child then unwinds are happening with all-zero pre/post iatt-bufs. The bug occurs because the parent bufs are not saved if the response is not from read-child. Fix: Save the pre/post-bufs for the first response. If the response comes from read-child, overwrite whatever we have cached. Tests: Attached the mount process to gdb. Tested that the unwinds happen with proper pre/post iatt bufs in the following cases: 1) All success case 2) Failure on read-child 3) Failure on non-read-child 4) Failure on all children. Tested soft-link self-heal to test the change made in that. Tested errno ENOTEMPTY for rmdir, rename fops. Change-Id: I82882423d2d766b4f4a3044203bcb5dbcaee1755 BUG: 845242 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: maintain a per-inode request queue instead of ↵Raghavendra G2012-08-022-596/+769
| | | | | | | | | | | | | | | | maintaining per-fd path based operations like stat etc, whose results will be affected by writes have to be ordered with writes. With request queues maintained in inode this can be done naturally, than when they are maintained per open fd. Change-Id: Ibdde3b81366f642d07531632fc9062cb44fad2e7 BUG: 765443 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/712 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/server: use pthread_mutex_trylock while dumping statedumpsRaghavendra Bhat2012-08-022-15/+37
| | | | | | | | | Change-Id: Iec6f539ee7d36c25aca3960abc6d2611707617c8 BUG: 843821 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3774 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-lib: fix rpc_clnt_reconfig log on remote_host changeyinyin2012-08-021-1/+1
| | | | | | | | | Change-Id: I5446d7fb975d4fb8105264e026fef165ae73a925 BUG: 764890 Signed-off-by: yinyin <maillistofyinyin@gmail.com> Reviewed-on: http://review.gluster.com/3773 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Handle child_up & fd not opened case in xactionPranith Kumar K2012-08-011-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: When an fd is opened while a brick is down, after the brick comes back up afr issues open on the other brick. It can fail for a number of reasons (enoent etc). While the system is in that state, inode/entrylks pre-op happen only on the brick that is up and fd is opened for fd-fops. post-op should consider only the bricks where both pre-op and fop succeeded as success, rest of them as failures. Code now marks only the children that are down as failures as opposed to child_down & fd-not-opened. This makes change-log appear as success on the subvolume where we did not do any fop leading to no change-log but differences in data/metadata for reg-files. Fix: Mark non-participants of fop as failure. This is tracked in transaction.pre_op[]. Tests: Simulated the scenario using err-gen on top of one of the client xlator which fails all fops always. Performed fops and the changelog represented pending fops on the brick with err-gen loaded. Tested the case of brick down and perform entry/metadata/data operations to confirm they still work as expected. Change-Id: I41905936126b19abba56ca581c0301a894507e1a BUG: 844987 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3765 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mem-pool: remove 'if' by asserting condition directly.Jules.Wang2012-08-011-22/+11
| | | | | | | | | | | | | | | | | | | before: if (!condition) { GF_ASSERT (0); } after: GF_ASSERT (condition); BUG: 764890 Change-Id: I9894fcc609579f5efd3f98dbff41ca1487ce6dd2 Signed-off-by: Jules Wang <lancelotds@163.com> Reviewed-on: http://review.gluster.com/3762 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: more clear separation of error messagesAmar Tumballi2012-08-011-70/+87
| | | | | | | | | | | | | | | | | the intention is to make CLI output more script friendly. use ':' as field separator per command and each field should be meaningful. this is phase-1 of the change, and hence RFC, once I get review comments, will be doing more changes, if required Change-Id: I11e70084f78a197ac50f9401dd7af312e63647ef Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 815194 Reviewed-on: http://review.gluster.com/3753 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* supportability: print all missing framesAmar Tumballi2012-08-012-8/+8
| | | | | | | | | | | | | | | | | | | earlier, the statedump and backtrace were printing frames only if it matched type GF_FOPs or GF_MGMTs (GF_MGMT is not in use now). This made all the frames from glusterd, or any other frames which got created outside the scope of 'fops' not getting printed. now, made two classifications, one as FOPs (which gets logged with the proper name), and another set is !FOPs (ie, else part), which gets logged with only the op number. Change-Id: Ifa18cdb75f7afefe6bb489d319b589cda8e64c1d Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 845114 Reviewed-on: http://review.gluster.com/3768 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* core: remove libglusterfs/src/scheduler.[ch]Amar Tumballi2012-08-013-116/+1
| | | | | | | | | | | | * as its not part of the build * confuses with some TAGS and 'git greps' Change-Id: I1f97307a8ce486ba56a4a3ad0151276b0a72e096 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 764890 Reviewed-on: http://review.gluster.com/3769 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/read-ahead: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-011-11/+18
| | | | | | | | | | Change-Id: I4491c96fc7d9879ba9040dcda3700c81d99ba184 BUG: 843796 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3766 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* event-history: implement gf_log_eh for saving eventsRaghavendra Bhat2012-08-012-6/+47
| | | | | | | | | | | Change-Id: I2ddf4e7849bda91bb99423e27082c2bae6800a70 BUG: 795419 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3532 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: initialize entry and negative timeouts correctly.Raghavendra G2012-08-011-2/+2
| | | | | | | | | | | | There was a typo which resulted in updation of attribute_timeout for both options. Change-Id: I6e212eaf3570cadde88d2a2c3b44121c893c9427 BUG: 804592 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3763 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* protocol/client: Fix negative return in client_setvolumeKrutika Dhananjay2012-08-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: The function dict_serialized_length could, owing to an error, return a negative integer (-EINVAL) that gets assigned to an unsigned int member 'dict_len' of gf_setvolume_req structure. FIX: Hold the value returned by dict_serialized_length in local variable ret (which is a signed int). Test if ret is negative, in which case the control would anyway branch to the label fail where the function returns. Otherwise dict_len is assigned with ret, in turn giving a more meaningful value to the attribute length. TEST: Attached gdb to glusterfs mount process, set breakpoint at client_setvolume, forced dict_serialized_length to return -EINVAL (indirectly by forcing _dict_serialized_length to return -EINVAL after setting count to -1 within its body) and checked the value of ret (which is now sure to contain a negative value) whose value will be appropriately tested to decide the next course of action within client_setvolume: whether to simply exit due to an error or execute the subsequent statements. Change-Id: Ib22ad8f30d8ae04acaf2ff5bfee9c348a2c47148 BUG: 789278 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.com/3755 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Handle failures in fop_cbk gracefullyPranith Kumar K2012-07-311-31/+46
| | | | | | | | | | | | | | | | | | | | | | | | | RCA: Afr crashes when a last fop response fails and 'fop output' arguments are NULL. Afr does not handle these gracefully. Fix: Changed the fops to not access the 'fop output' arguments in case of failures. Tests: Changed afr wind_cbk code to fail the last response by setting op_ret as -1 and op_errno as ENOMEM and setting all other output variables as NULL to test the change. Removed the code to verify success cases. No crashes or errors seen. Change-Id: Iad9bc54db093a162f85bfb8dbeeda5b95acd21d8 BUG: 844689 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3760 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix issues in make distM S Vishwanath Bhat2012-07-311-2/+2
| | | | | | | | | | Change-Id: I2fb3b0b35e2b5fdb08ee1857bf31ec8f65889306 BUG: 844669 Signed-off-by: M S Vishwanath Bhat <msvbhat@gmail.com> Reviewed-on: http://review.gluster.com/3759 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: update loc inode after inode_linkPranith Kumar K2012-07-311-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | RCA: inode passed to inode_link is not assigned any gfid if the inode with that gfid is already linked, so loc for opendir does not have a valid inode Fix: Use the linked_inode returned by inode_link in the loc to perform further operations on the entry. Tests: Checked that opendir comes with an loc with valid inode. Checked that re-opendir happens successfully. Tested index, full self-heal work fine with the fix. Change-Id: Idf4ced4cc2320133744962059d363e373af0e5ec BUG: 826580 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3748 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc/socket: finish initialization in own threadJeff Darcy2012-07-301-7/+47
| | | | | | | | | | | | ...if we have one, that is. This addresses Avati's review comment on ea7759f1240b1e97684273b9369472695173a66. Change-Id: I71a272f7eeff8279981a75241d60620ca4975c99 BUG: 764731 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3701 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Modifed replace-brick mount cleanup to use lazy umountKrishnan Parthasarathi2012-07-301-94/+135
| | | | | | | | | Change-Id: I83a985967cbaee4927f1b8ca4bc01c9fb0171522 BUG: 806890 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3143 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/stripe: handle short writes and errors in writev callbackBrian Foster2012-07-303-38/+106
| | | | | | | | | | | | | | | | | | | | | | | cluster/stripe write callback handling is broken in the event of server side errors and short writes due to crudely summing up the return values from each node. This can produce incorrect results or cause an application to rewrite the wrong portions of a buffer in an attempt to handle this condition. Modify cluster/stripe writev handling to record the requested size of each write and use this data to return the number of consecutive bytes written from the original request. This allows an application to retry a write at the point of error (and potentially consume said error). BUG: 809975 Change-Id: Ic35cb1e092c29545205aa32e352485c507534ce0 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3700 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <sgowda@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-threads: dump the io-threads specific information in statedumpRaghavendra Bhat2012-07-302-2/+52
| | | | | | | | | Change-Id: Ib9b9eab2d2e90fce21ef32f0f884101938978859 BUG: 843377 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3736 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsycnd: restore the generic signature for sendmark_regularCsaba Henk2012-07-301-3/+3
| | | | | | | | | | | | | | | | | Earlier fixes to 842330 changed the generic (*a, **kw) signature, although that was not related to the issue. We restore the generic signature as it was used for a reason (proxy methods that do none or only algebraic transformations on passed arguments idiomatically have generic signature, both to serve as visual cue and agnosticism wrt. the inner API). Change-Id: Ib609a3a58be53d78b7f1221a3c162c6aec8fd488 BUG: 842330 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3754 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs/statedump: add start and end markers in the statedump fileRaghavendra Bhat2012-07-301-2/+37
| | | | | | | | | | | | | Also do not overwrite the statedump file if statedump is taken on the same process again. Instead add the timestamp to the filename Change-Id: I451a0decf2dad5c398631cab1fc2a69811c69af8 BUG: 843408 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3738 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-threads: Provide option to turn off least-priorityPranith Kumar K2012-07-303-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: In cases when self-heal is in progress, self-heal fops are starved because of least-priority. This affects other fops with conflicting inode, entry locks with self-heal. Fix: This patch provides configuring enable/disable of least-priority. Additional changes: Moved RCHECKSUM fop to low instead of least because it will still affect the performance of other fops if RCHECKSUM is in LEAST priority. Tests: Tested that the enabling/disabling of fops is working fine. Tested that RCHECKSUM fop priority is assigned LOW when least-priority is disabled. Change-Id: I8d72872b33e2ac7e1ad3afb27582682b0eb98a80 BUG: 843704 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3743 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* volgen: add option to add trace/error-gen in client volume fileAmar Tumballi2012-07-291-0/+6
| | | | | | | | | | | | | | | | bash# gluster volume set <VOLNAME> debug.trace client bash# gluster volume set <VOLNAME> debug.error-gen client would add the corresponding translator in client volume file just below io-stats translator. (gets added even in nfs volfile) Change-Id: I698eb9b348c59aaff9967a4e238fabfc40e69a11 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782262 Reviewed-on: http://review.gluster.com/3699 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Persisted hooks friendly user.* keysKrishnan Parthasarathi2012-07-294-48/+51
| | | | | | | | | | | | - Fixed validation of user.* keys in presence of multiple key, value pairs in a single volume set command Change-Id: I5b96de2d009fbc79772121308d9b4c0a552bac52 BUG: 825902 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3715 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: Fix statedump codePranith Kumar K2012-07-294-74/+52
| | | | | | | | | | | | | | | | | | | | | | | | RCA: Taking blocking mutex/spin locks lead to dead locks because of the locking order in statedumps. Also we were asked to remove gf_logs if possible to avoid extra cost in signal handlers. Fix: changed blocking mutes/spin locks to their non-blocking variants. Removed gf_logs in locks xlator statedump code-path. Tests: State-dump success cases are working fine. Triggered try-lock failures by putting statedumps in a while loop. In parallel did chown of the same file in a while loop. Change-Id: I81539a62f8216f267f57bb703ef132c85bfd557d BUG: 843781 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3747 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Prevent creation of volumes with tokens as volnamesPranith Kumar K2012-07-291-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: yyparse confuses volnames with tokens when any of the tokens 'volume', 'type', 'subvolumes', 'option', 'end-volume' are used as volnames. This happens because io-stats xlator name is same as volname in fuse volfile. Both nfs, fuse volfiles are affected by this problem. Fix: We could fix this also by changing io-stats xlator name to something other than 'volname'. But I am worried of the backward compatibility issues it may introduce. Disallowing creation of volumes with tokens as volname seems like a safer fix. Tests: All volume creation operations with tokens as volname give invalid volume name error. Change-Id: Ifc63a5c31375e92541b954ec133aa3c8e6a56a02 BUG: 844030 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3745 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Ensured 'store' data reaches disk.Krishnan Parthasarathi2012-07-291-15/+55
| | | | | | | | | | | | | - Opened temporary file(s) with O_SYNC flag to avoid explicit fsync'ing. - Sync'd directory entry after creation and rename of 'store' files. - Thanks to Jeff Moyer's article on http://lwn.net/Articles/457667/ Change-Id: I68a8672dc6a0b24d128de53f3b60c74dd08d8ab8 BUG: 765434 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3726 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Warnings: Fix set, unused variable warningsPranith Kumar K2012-07-292-5/+0
| | | | | | | | | Change-Id: If7ee85aa0d93f9018a76e7f60fcb7dcaf849dbdc BUG: 839950 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3742 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>