summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* libglusterfs: fix GF_FREECsaba Henk2012-02-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Argument-taking macros should be possible to use with same syntax that of C functions. In particular (assuming FOO is a single-argument macro), FOO(bar) should break and if (cond) FOO(bar); else baz(); should compile. Change-Id: If852c128a7317dc0dda1c669be7c6af40501e48d BUG: 762061 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/2816 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* locks: Made dump locks formatting more 'readable'.Krishnan Parthasarathi2012-02-242-18/+39
| | | | | | | | | | | | | | Also, Added inode's path to dump locks. Added basename to entrylk dump output. Added whence field of range locks to dump output. Change-Id: Ifd3f8b585a52de7ff68cd54506619ac3eaedeecc BUG: 789858 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/798 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Change rebalance log file namev3.3.0qa24Shylesh Kumar2012-02-231-1/+5
| | | | | | | | | | | | Log file name for the rebalance process should be <volname>-rebalance.log Change-Id: I1ed169cdc92b11058b80360086b3c1f7618064ef BUG: 795714 Signed-off-by: Shylesh Kumar <shylesh@gluster.com> Reviewed-on: http://review.gluster.com/2805 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
* glusterd: Modified server graph to have index xl above pumpKrishnan Parthasarathi2012-02-231-18/+18
| | | | | | | | | | | | | | Index xlator needs a resolved inode in the incoming xattrop request to perform its indexing. In the case of replace-brick pump xlator doesn't resolve the inode in the (fop) requests it sends 'downwards', leading to null gfid sent to index xlator. Change-Id: I6b6e7af4354670616bf342292df1a25c219dd9e9 BUG: 796171 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2801 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
* Introduce new extended attribute: node-uuidVenky Shankar2012-02-2210-181/+395
| | | | | | | | | | | | | | | | Request for trusted.glusterfs.node-uuid returns pathinfo like string but containing the UUID of glusterd instead of the backend path for the requested file. This info is benificial for tasks like parallel rebalance that will make use of the UUID for data locality. Change-Id: I766a09cc4a5f63aebd11c73107924a1b29242dcf BUG: 772610 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/2614 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* protocol/client: Pass correct dict in client_readdirpshishir gowda2012-02-222-1/+3
| | | | | | | | | | | Also, alloc entry->dict before calling unserialize to it. Change-Id: I8a9db93afd6e95e75307467cd654805780d7b467 BUG: 796534 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2803 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* build: Changes to specfile for correctness and package relevance.Vijay Bellur2012-02-221-6/+13
| | | | | | | | | | | - Removes a stale dependency of glusterfs-client on glusterfs-core - Server specific shared libraries included in glusterfs-server package. Change-Id: I852304e6351a9a7864b2049f603e11f6a5601ffb BUG: 764702 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2797 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/marker: Use loc.inode to obtain parent if loc.parent isn't set.Vijay Bellur2012-02-221-1/+13
| | | | | | | | | Change-Id: I89dddb19168a3ffb269afc9f6bcb2d7e7c9a69cd BUG: 790389 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2802 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
* glusterfsd: give out the error on screen when cmd is given without optionsAmar Tumballi2012-02-221-0/+13
| | | | | | | | | | | | | 'glusterfs' cmd would take default options when no option is given, but sometimes default option may not work, in that case, we need to provide usage output Change-Id: I2ebd342890da11d2afaa0a23ee3a01d87694ff28 BUG: 791198 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/2790 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterfsd: unref the dict and use dict_set_dynstr to avoid memleakRaghavendra Bhat2012-02-223-7/+13
| | | | | | | | | | | | | Unref the new dict and use proper dict api (dict_set_dynstr) to save data for displaying volume status information, which otherwise leads to memory leak in the process. Change-Id: Icb9ceb1a867c5b9759211a67027d983ab9b7e1c2 BUG: 796186 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: print the type of the inode in gluster volume status inode outputRaghavendra Bhat2012-02-221-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | Instead of a number print the type of the inode in the output of gluster volume status inode. This is what the output symbols indicate. R -----> Regular file D -----> Directory L -----> symbolic Link B -----> Block special device C -----> Character special device F -----> FIFO S -----> Socket I -----> Invalid inode type Also supress a warning message displayed at the time of build. Change-Id: I5a2adfe044ce21d9da159652d4b6e25cd0a2fdca BUG: 796078 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2794 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* protocol/client: Print correct error messagePranith Kumar K2012-02-221-1/+1
| | | | | | | | | Change-Id: Ic68626c4a205cd78b60831aa7bd838b6d8824fa1 BUG: 796195 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2800 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mempool: adjustments in pool sizesAmar Tumballi2012-02-2231-56/+61
| | | | | | | | | | | | | | | | | * while creating 'rpc_clnt', the caller knows what would be the ideal load on it, so an extra argument to set some pool sizes * while creating 'rpcsvc', the caller knows what would be the ideal load of it, so an extra argument to set request pool size * cli memory footprint is reduced Change-Id: Ie245216525b450e3373ef55b654b4cd30741347f Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2784 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* mount.glusterfs: multiple fixesAmar Tumballi2012-02-221-2/+3
| | | | | | | | | | | | | | * fix return value in case of proper 'backup-volfile-server' option, and actual default server based mount failed. * fix a syntax error (bug: 796050) Change-Id: I6a530c9b9431e46f45ec9eeb99f6103386dd10dc Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 796101 Reviewed-on: http://review.gluster.com/2798 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/stripe: Readdirp should call lookup on entriesshishir gowda2012-02-222-50/+116
| | | | | | | | | | | | | We were calling stat on each entry. Also, the inode ctx needs to be populated with the stripe_fd_ctx_t. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: Ibaafa360f22b551d1609041f13a4339e22c95645 BUG: 795669 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2795 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cluster/afr: Don't trust the fd returned in open_cbkPranith Kumar K2012-02-221-4/+7
| | | | | | | | | Change-Id: Id7d85a38875e3675904fc134e54e723c6a0c4de2 BUG: 786766 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2792 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/locks: Don't access free'd memoryPranith Kumar K2012-02-221-3/+4
| | | | | | | | | Change-Id: I4e22ede84622f2c9c46cc0bc9f17bef73afa815c BUG: 796069 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2791 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* pump: Fixed undefined reference to fill_loc_info fn.Krishnan Parthasarathi2012-02-222-4/+8
| | | | | | | | | | | | | Changed function to pump_fill_loc_info since its use is relevant only in pump's context. Change-Id: I5be1a908f88328f732dacfd7eac18f0c62f49eb8 BUG: 796066 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2796 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs/options: Cleanup xlator percent_sizet code.Harshavardhana2012-02-213-82/+97
| | | | | | | | | Change-Id: I1a39252d6c26f7e30b77ef682b8b3cdcde8a4a51 BUG: 769691 Signed-off-by: Harshavardhana <fharshav@redhat.com> Reviewed-on: http://review.gluster.com/2619 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* features/index: Set correct ret value in index_addPranith Kumar K2012-02-211-0/+2
| | | | | | | | | Change-Id: I6314ea25ef26920593a3113eb2951d18255db34f BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2786 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* build: More rpmbuild friendly changesv3.3.0qa23Vijay Bellur2012-02-211-3/+3
| | | | | | | | | Change-Id: I7dcd5c6461bbddde3bcc3d2519777e4c8889fe52 BUG: 764702 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2788 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: rpmbuild friendly changesVijay Bellur2012-02-212-2/+2
| | | | | | | | | Change-Id: Ia1299d4404da0bd6787516924ebadcf9d6e021d1 BUG: 764702 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2785 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd/auth: 3.2.x compatibilityRajesh Amaravathi2012-02-214-52/+72
| | | | | | | | | | | | | volumes created with GlusterFS 3.2.x will be compatible with GlusterFS 3.3 w.r.t auth.allow enhancements Change-Id: I615e46d648e1270a7b856cd71fab24cfe791ddb8 BUG: 795634 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2779 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/index: Fix fd leakPranith Kumar K2012-02-211-2/+5
| | | | | | | | | Change-Id: Ib01d03999b099369674495ce500f48d492758f91 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2781 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs: Warn on missing _cbk calls in xlatorPranith Kumar K2012-02-211-0/+6
| | | | | | | | | Change-Id: I44684b5eeca3674ed8d5b7b0120699bb3767e38d BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2782 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli, glusterfsd: Fixes for "volume top {read,write}-perf"Kaushal M2012-02-214-23/+23
| | | | | | | | | | | | | | | Changed variables to use unsigned types, to support larger comninations of block_size * block_count Also increases cli time out for "volume top" ops to 600, to allow more time for glusterd to return the results to cli. Change-Id: I4b953799c78a5a184311f6f8c4a7a99dc9e87a07 BUG: 783980 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2761 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: utilize mempool for frame->local allocationsAmar Tumballi2012-02-2159-375/+407
| | | | | | | | | | | | | | | in each translator, which uses 'frame->local', we are using GF_CALLOC/GF_FREE, which would be costly considering the number of allocation happening in a lifetime of 'fop'. It would be good to utilize the mem pool framework for xlator's local structures, so there is no allocation overhead. Change-Id: Ida6e65039a24d9c219b380aa1c3559f36046dc94 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/distribute: send the right 'dict' for check_is_linkfile()Amar Tumballi2012-02-212-12/+34
| | | | | | | | | | | | earlier we were using 'check_is_linkfile_wo_dict()' for readdirp_cbk(), which is no more required now. Change-Id: I52295e08f8c494b7a081cfc684164a7f72562d0d Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 794641 Reviewed-on: http://review.gluster.com/2763 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/index: Add release, releasedir cbksPranith Kumar K2012-02-211-1/+40
| | | | | | | | | Change-Id: Ice45a0b4e953e270273aa4155a895d6ec033fda8 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2780 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/md-cache: Change strdup to gf_strdupVijay Bellur2012-02-211-1/+1
| | | | | | | | Change-Id: Ic96e7d38b988efab49f723c9d1d46f65037a84ed BUG: 795682 Reviewed-on: http://review.gluster.com/2783 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Honor O_SYNC etc. properly.Jeff Darcy2012-02-211-2/+28
| | | | | | | | | Change-Id: I3dd90fe230386ad5571c5e639f27460e3d003f0e BUG: 773100 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/2626 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc/clnt: handle PARENT_DOWN event appropriatelyAmar Tumballi2012-02-219-41/+168
| | | | | | | | | | Change-Id: I4644e944bad4d240d16de47786b9fa277333dba4 BUG: 767862 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/2735 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* fuse-bridge: Handle graph-switch.Raghavendra G2012-02-219-77/+631
| | | | | | | | | | | | | | | | | The purpose of this patch is to let protocol/client know when its transports can be disconnected, without application running on gluster mount noticing any effects of graph switch. In order to do this, we migrate all fds and blocked locks to new graph. Once this migration is complete and there are no in-transit frames as viewed by fuse-bridge, we send a PARENT_DOWN event to its children. protocol/client on receiving this event, can disconnect up its transports. Change-Id: Idcea4bc43e23fb077ac16538b61335ebad84ba16 BUG: 767862 Reviewed-on: http://review.gluster.com/2734 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* performance/md-cache: Add mem_acct_initPranith Kumar K2012-02-201-0/+8
| | | | | | | | | Change-Id: I1b91ee0bde160762548c39646ceb96c3c778e06c BUG: 795651 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2778 Reviewed-by: Vijay Bellur <vijay@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Add commands to see self-heald opsPranith Kumar K2012-02-2024-387/+1274
| | | | | | | | | Change-Id: Id92d3276e65a6c0fe61ab328b58b3954ae116c74 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/afr: Self-heald, Index integrationPranith Kumar K2012-02-2012-204/+529
| | | | | | | | | Change-Id: Ic68eb00b356a6ee3cb88fe2bde50374be7a64ba3 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2749 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* md-cache: replace stat-prefetch with md-cache in a backward compatible wayAnand Avati2012-02-209-4429/+11
| | | | | | | | | | | - preserve CLI set option key as "performance.stat-prefetch" - create a symlink stat-prefetch.so to point to md-cache.so Change-Id: Ib95e7c30073f13ae04c39e9466967ba1db5a0614 BUG: 765785 Reviewed-on: http://review.gluster.com/2714 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* md-cache: meta-data caching translatorAnand Avati2012-02-206-1/+1815
| | | | | | | | | | | | | | | | | | | | | | | | This is a metadata caching translator which is well integrated with glusterfs core framework and leverages some of the recent protocol changes to do a better job at caching. - It uses the attributes returned along callbacks of all calls to update its attribute cache as frequently as possible without issuing calls on its own (i.e, very low overhead) - It caches attributes returned via readdirp into the inode contexts corresponding to those entries (i.e, well integrated) - It caches and updates xattrs and not just inode attributes (i.e, eliminates the need for a separate xattr-prefetch translator) In its current form it has a timeout based consistency model Change-Id: I891f6225c1a4c08bb111e287571d5f6d326dbe97 BUG: 765785 Reviewed-on: http://review.gluster.com/2713 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: Multi-processor support in syncenvAnand Avati2012-02-202-67/+216
| | | | | | | | | | | | | | | | | | | This patch introduces: - multithreading of syncop processors permitting synctasks to be executed concurrently if the runqueue has many tasks. - Auto scaling of syncop processors based on runqueue length. - Execute a synctask (synctask_new) in a blocking way if callback function is set NULL. The return value of the syncfn will be the return value of synctask_new() Change-Id: Iff369709af9adfd07be3386842876a24e1a5a9b5 BUG: 763820 Reviewed-on: http://review.gluster.com/443 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Add xattr for gfid2pathPranith Kumar K2012-02-202-0/+20
| | | | | | | | | Change-Id: I1fe987d255bf50e8433043749b482b67554a0ac3 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2774 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs/server: Fix compilation warningsVijay Bellur2012-02-201-5/+2
| | | | | | | | | Change-Id: If5c2375adb3769827cf5099cb6b2d19ba75bf238 BUG: 795421 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/2776 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* features/index: Index translator implementationPranith Kumar K2012-02-209-15/+1288
| | | | | | | | | | Change-Id: If8a11ecbdd010f64fb4409add5751080f4b59086 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2722 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* NLM - Network Lock Manger V4Krishna Srinivas2012-02-2031-35/+3298
| | | | | | | | | Change-Id: Ic31b8bb10a28408da2a623f4ecc0c60af01c64af BUG: 795421 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/2711 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs: Implement circular buffer and event historyRaghavendra Bhat2012-02-2013-12/+437
| | | | | | | | | | | | | | | | | Implement circular buffer framework, so that it can be used by other components such as event history management. And event history is implemented which can be used by xlator to dump some information to a file (such as information of some structure etc). Through statedump, history of each xlator can be dumped. An option called history should be given to the statedump command. Change-Id: I7c5e8f6bd1018584eaee856e933e7c4b94c6709c BUG: 795419 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2769 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* protocol/client,server: fcntl lock self healing.Mohammed Junaid2012-02-2025-56/+1484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently(with out this patch), on a disconnect the server cleans up the transport which inturn closes the fd's and releases the locks acquired on those fd's by that client. On a reconnect, client just reopens the fd's but doesn't reacquire the locks. The application that had previously acquired the locks still is under the assumption that it is the owner of those locks which might have been granted to other clients(if they request) by the server leading to data corruption. This patch allows the client to reacquire the fcntl locks (held on the fd's) during client-server handshake. * The server identifies the client via process-uuid-xl (which is a combination of uuid and client-protocol name, it is assumed to be unique) and lk-version number. * The client maintains a list of process-uuid-xl, lk-version pair for each accepted connection. On a connect, the server traverses the list for a matching pair, if a matching pair is not found the the server returns lk-version with value 0, else it returns the lk-version it has in store. * On a disconnect, the server and client enter grace period, and on the completion of the grace period, the client bumps up its lk-version number (which means, it will reacquire the locks the next time) and the server will distroy the connection. If reconnection happens within the grace period, the server will find the matching (process-uuid-xl, lk-version) pair in its list which guarantees that the fd's and there corresponding locks are still valid for this client. Configurable options: To set grace-timeout, the following options are option server.grace-timeout value option client.grace-timeout value To enable or disable the lk-heal, option lk-heal [on|off] gluster volume set command can be used to configurable options Change-Id: Id677ef1087b300d649f278b8b2aa0d94eae85ed2 BUG: 795386 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/2766 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* volgen: give an option to insert trace/error-genAmar Tumballi2012-02-201-6/+65
| | | | | | | | | | | | currently, these translators can be plugged in on the server volfile. Need to enhance on client side too. Change-Id: I8c3696f62f1de646a736d68c4c427c6fffd6bbf4 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 782262 Reviewed-on: http://review.gluster.com/776 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* protocol/client: delete locks only for non-anonymous fdsRajesh Amaravathi2012-02-202-4/+3
| | | | | | | | | | | | | delete_granted_lock_owners () is not called for anonymous fds since they are not involved in locking Change-Id: Icdc7818f98f5371232ba276ed442704ef69e6b0e BUG: 787365 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2754 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* iobuf: use 'iobuf_get2()' to get variable sized buffersAmar Tumballi2012-02-2011-65/+92
| | | | | | | | | | | added 'TODO' in places where it is missing. Change-Id: Ia802c94e3bb76930f7c88c990f078525be5459f5 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 765264 Reviewed-on: http://review.gluster.com/388 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: auth allow enhancementsRajesh Amaravathi2012-02-2019-158/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PROBLEM: When address-based authentication is enabled on a volume, the gNfs server, self-heal daemon (shd), and other operations such as quota, rebalance, replace-brick and geo-replication either stop working or the services are not started if all the peers' ipv{4,6} addresses or hostnames are not added in the "set auth.allow" operation, breaking the functionality of several operations. E.g: volume vol in a cluster of two peers: /mnt/brick1 in 192.168.1.4 /mnt/brick2 in 192.168.1.5 option auth.allow 192.168.1.6 (allow connection requests only from 192.168.1.6) This will disrupt the nfs servers on 192.168.1.{4,5}. brick server processes reject connection requests from both nfs servers (on 4,5), because the peer addresses are not in the auth.allow list. Same holds true for local mounts (on peer machines), self-heal daemon, and other operations which perform a glusterfs mount on one of the peers. * SOLUTION: Login-based authentication (username/password pairs, henceforth referred to as "keys") for gluster services and operations. These *per-volume* keys can be used to by-pass the addr-based authentication, provided none of the peers' addresses are put in the auth.reject list, to enable gluster services like gNfs, self-heal daemon and internal operations on volumes when auth.allow option is exercised. * IMPLEMENTATION: 1. Glusterd generates keys for each volume and stores it in memory as well as in respective volfiles. A new TRUSTED-FUSE volfile is generated which is fuse volfile + keys in protocol/client, and is named trusted-<volname>-fuse.vol. This is used by all local mounts. ANY local mount (on any peer) is granted the trusted-fuse volfile instead of fuse volfile via getspec. non-local mounts are NOT granted the trusted fuse volfile. 2. The keys generated for the volume is written to each server volfile telling servers to allow users with these keys. 3. NFS, self-heal daemon and replace-brick volfiles are updated with the volume's authentication keys. 4. The keys are NOT written to fuse volfiles for obvious reasons. 5. The ownership of volfiles and logfiles is restricted to root users. 6. Merging two identical definitions of peer_info_t in auth/addr and rpc-lib, throwing away the one in auth/addr. 7. Code cleanup in numerous places as appropriate. * IMPORTANT NOTES: 1. One SHOULD NOT put any of the peer addresses in the auth.reject list if one wants any of the glusterd services and features such as gNfs, self-heal, rebalance, geo-rep and quota. 2. If one wants to use username/password based authentication to volumes, one shall append to the server, nfs and shd volfiles, the keys one wants to use for authentication, *while_retaining those_generated_by_glusterd*. See doc/authentication.txt file for details. Change-Id: Ie0331d625ad000d63090e2d622fe1728fbfcc453 BUG: 789942 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2733 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* GlusterFS Hadoop PluginVenky Shankar2012-02-1912-0/+2108
| | | | | | | | | | | | | | | Apache Hadoop plugin to run Map/Reduce (MR) jobs on data stored on GlusterFS. This is a drop in replacement for HDFS requiring the plugin jar and modification to a single conf file to enable MR jobs to process data on GlusterFS. Change-Id: I8862efec30708849fa7c544fed88b8e50e622fed BUG: 790671 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/2751 Reviewed-by: Vijay Bellur <vijay@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>