summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd.c
Commit message (Collapse)AuthorAgeFilesLines
...
* fuse: enable kernel read-only modeKaushal M2011-11-221-0/+9
| | | | | | | | | | | | | Enables kernel read-only mode on mounting with '-oro' and disables the gluster read-only translator from being loaded. As a result, '-oro' is reported correctly in the mount options. Change-Id: If94d97836b13668974cfac61b6e5d52e19880e10 BUG: 3742 Reviewed-on: http://review.gluster.com/655 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Csaba Henk <csaba@gluster.com>
* glusterfs: An effort to fix all the spell mistakes and typoHarshavardhana2011-11-161-3/+3
| | | | | | | | | | | | | | | in the entire glusterfs codebase. This patch fixes many of spell mistakes and typo in the entire glusterfs codebase and all supported modules. Change-Id: I83238a41aa08118df3cf4d1d605505dd3cda35a1 BUG: 3809 Signed-off-by: Harshavardhana <fharshav@redhat.com> Reviewed-on: http://review.gluster.com/731 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Fix a typo in log message.Sachidananda Urs2011-10-061-1/+1
| | | | | | | | Change-Id: I5c2b170977f21c9a83d36f60d9a145c6cc221358 BUG: 2346 Reviewed-on: http://review.gluster.com/562 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Proactive self heal process implementationPranith Kumar K2011-09-141-2/+8
| | | | | | | | Change-Id: I96db0d94566ceabf1649f890318363f738c06553 BUG: 2458 Reviewed-on: http://review.gluster.com/403 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterfsd: log the package version just after log initAmar Tumballi2011-09-141-0/+5
| | | | | | | | | | | helps getting output of 'glusterfs --version' from the users while debugging any issues/bugs. Change-Id: I4f15aca143c1e403c70409378afc9ed7a678b286 BUG: 2346 Reviewed-on: http://review.gluster.com/415 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* add --user-map-root optionCsaba Henk2011-09-121-0/+24
| | | | | | | | | | | | | | | | | | This makes client fake that given user is a superuser, by changing FUSE requests coming with uid of user so that uid is set to 0. User can be given in numeric form, in which case it's treated as an uid directly, or else it's tried to be resolved to an uid with getpwnam(3). Implies --acl. Change-Id: I2d5a3d3e178be7ffdf22b46a56f33a7eeaaa7fe1 BUG: 3242 Reviewed-on: http://review.gluster.com/127 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: fix for volume stop causing inconsistent volume statusKaushal M2011-08-171-6/+6
| | | | | | | | | | | | | This fixes problem caused by race between glusterd and glusterfsd occuring when they try to unlink pidfile during volume stop, which led to the volume being stopped, but the status of the volume remained in started state. Change-Id: Ia99bb1a1fc6c78db138211538dfd10c577e82917 BUG: 3147 Reviewed-on: http://review.gluster.com/206 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* WORM: Write Once Read Many times xlator supportshishir2011-08-101-0/+6
| | | | | | | | | | | | This xlator will allow files to be opened for write in append mode only. Mount with --worm(glusterfs) or -o worm (mount) option to enable worm xlator Change-Id: I1be02fcf2aee2182ea2c66b514357918136fabeb BUG: 3166 Reviewed-on: http://review.gluster.com/23 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-101-2/+2
| | | | | | | | 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-4/+4
| | | | | | | | 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>
* glusterfsd: initialize sigset_t in sigwaiterAnand Avati2011-07-311-0/+1
| | | | | | | | | | Thanks to kkeithle@redhat.com for pointing out. Change-Id: I8167ffffddbdbc3dc09f7474bd834dbf4a49db9b BUG: 3280 Reviewed-on: http://review.gluster.com/129 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* glusterfsd: check for process mode before performing mountKaushal M2011-07-211-3/+11
| | | | | | | | | | | | | create_fuse_mount() now checks if it is a client process before performing mount. If not a client process, it returns an error. Added changes suggested Change-Id: If8548ad60d345bb8cd09686ceed0d83522799761 BUG: 2469 Reviewed-on: http://review.gluster.com/5 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterfs: add --acl command line option to load ACLs on the client sideAnand Avati2011-07-081-0/+15
| | | | | | | | | 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
* fixing some build issues in Mac OS XAmar Tumballi2011-06-161-2/+7
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2966 (MacOSX compile failure: duplicate symbol _k) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2966
* fix multiple transport portmap issues in client handshakeAmar Tumballi2011-06-081-1/+13
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2294 (Currently there is no way through cli to make a volume listen on both the transports (socket/rdma)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2294
* glusterfsd: prevent giving '-s' option without '--volfile-id' optionAmar Tumballi2011-05-311-3/+16
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2934 (for glusterfs binary, -s option without --volfile-id will fail without any notice to user) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2934
* upon daemonizing, wait on mtab update to terminate in parentCsaba Henk2011-05-191-6/+27
| | | | | | | | | | | | | | This fixes the race in between the mtab update attempts of mount and umount when we do a lazy umount right after mounting, in order to hide the given fs instance; yet this way we still avoid the deadlock of the fs and mount which we can hit if we wait unconditionally for the mtab update to terminate (cf. bz #511). Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2690 (race between mtab updates of mount and umount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
* removed reference to GF_LOG_NORMALAmar Tumballi2011-04-071-4/+4
| | | | | | | | | | instead used GF_LOG_INFO, which is more standard log level. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2669 (RuntimeError: cannot recognize log level "normal") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2669
* glusterfsd: log enhancementAmar Tumballi2011-03-171-85/+103
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* glusterfsd: whitespace cleanupAmar Tumballi2011-03-171-5/+5
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* glusterfsd: translator info event handling implementationPranith K2011-03-101-0/+16
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1965 (need a cmd to get io-stat details) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965
* Fix getcwd size arg to make it work in solaris.shishir gowda2011-02-221-1/+7
| | | | | | | | | | | | | glusterfs/d -f path failed if the path was not absolute. If the BUF argument is NULL, then on solaris the size argument has to be passed. On linux, if the size argument passed is 0, then it dynmically allocates a buffer of the required size. The fix is to pass PATH_MAX as the size for consistency. Signed-off-by: Shishir Gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2443 (starting glusterfs/d -f with relative path crashes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2443
* implement "--client-pid" option which can forcibly set the pid value in ↵Csaba Henk2011-01-271-0/+22
| | | | | | | | | | messages to a predefined value 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
* glusterfsd.c: cleanup_and_exit() doesn't call all the 'fini()'Amar Tumballi2010-11-091-11/+14
| | | | | | | | | | | calling 'fini()' of each xlator needs more synchronization work to be done. We will be doing a direct 'exit()' as of now. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1879 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1879
* fuse: init entry timeoutVijay Bellur2010-11-071-0/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2059 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2059
* Solaris build: Fix linux only featuresshishir gowda2010-10-211-1/+1
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1990 (Gluster mainline build on solaris fails with errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1990
* 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
* protocol/rpc/transport: bring in one more event for 'TRANSPORT-DESTROY'Amar Tumballi2010-10-071-1/+1
| | | | | | | | | | | | needed because, a RPC disconnect doesn't mean that a RPC transport/listener is dead. With this, the race in server protocol cleaning up the lock table / fd table when some frames are in transit will be handled properly. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1843 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1843
* glusterfsd: '-f' option help updateAmar Tumballi2010-10-051-4/+2
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1809 (glusterd help text for -f is wrong) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1809
* Change GNU GPL to GNU AGPLPranith K2010-10-041-4/+4
| | | | | | | | 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
* mgmt/glusterd: remove debug messages in cleanup_and_exitPranith K2010-09-301-2/+0
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1746 (volume delete fails after volume stop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1746
* mgmt/glusterd: prevent cleanup_and_exit if its already startedPranith K2010-09-281-1/+7
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1706 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1706
* glusterfsd: handle relative path for '--volfile/-f' optionAmar Tumballi2010-09-241-5/+15
| | | | | | | | Signed-off-by: Amar Tumballi <amar@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
* mgmt/glusterd: Misc fixes to pump / cli / glusterd wrt replace brick.Pavan Sondur2010-09-231-0/+3
| | | | | | | | | | Patches from Vijay and Shishir have been pulled in into this one big patch. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
* glusterfsd: destroy mgmt in cleanupPranith Kumar K2010-09-221-0/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1517 (gluster volume stop - starts a new nfs server.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1517
* mount/fuse: By default enable direct-io only for fds not openened with O_RDONLY.Raghavendra G2010-09-211-1/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 801 (Direct io-mode support and related changes in caching translators.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
* cli, mgmt/glusterd: volume sync commandPranith Kumar K2010-09-201-1/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1310 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1310
* Deadlock in state dumping while holding the logging lockKaushik BV2010-09-151-10/+3
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 976 (Deadlock in state dumping while holding the logging lock) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=976
* glusterfsd: exit process instead of starting fuse in case of failuresAmar Tumballi2010-09-101-1/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1586 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1586
* glusterfsd: first time errors in volume file should exit the processAmar Tumballi2010-09-091-0/+6
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1551 (glusterfs process doesn't exit when init fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1551
* dont destroy the mempools in cleanup and exit as some other thread may be ↵Raghavendra Bhat2010-09-041-6/+0
| | | | | | | | | | refering to it Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1523 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1523
* Revert "fuse: introduce pre-test micro-framework, check for ↵Vijay Bellur2010-09-031-1/+5
| | | | | | execve-over-direct-IO" This reverts commit 588d807bdcbf5ed4df4d903428ab701479e9f8ac.
* fuse: introduce pre-test micro-framework, check for execve-over-direct-IOCsaba Henk2010-09-021-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The presence of some potential FUSE features in the actual kernel-side FUSE implementation we run on is not always straightforward. More precisely, it is straightforward only if there is a dedicated feature flag or protocol revision number. In the other cases we are left to clumsy and platform specific hacks which wire in 3rd-party software revision numbers into our source... at least, if we insist on sticking to (the otherwise venerable) KISS principle. However, here we go for another route, loosely inspired by the way autotools provide an abstraction layer for our build system over the gory details of platform specific build environments. At start time, we use a preliminary set of FUSE operations which overlay the standard ones such that apart from the "usual stuff", they also present some synthetic files to the FUSE client (kernel). Then we spawn some test programs which perform the needed tests on these synthetic files to evaulate the FUSE implementation in terms of the features in question. According to the result of the test programs, we set the respective parameters of the fuse xlator; when the testing phase is over, the FUSE operation set is replaced by the standard one. As of now, we use this approach to test whether execve(2) works with direct I/O. If yes, and if glusterfs is used with --enable-direct-io-mode, then we let direct I/O for files opened for reading; if no, then we restrict direct I/O only to writing files. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 801 (Direct io-mode support and related changes in caching translators.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
* fix a crash in cleanup_and_exit ()Amar Tumballi2010-08-311-8/+12
| | | | | | | | | | | | * fini() was being called without proper 'THIS' being set. * in protocol/client, a frame was getting created after frame pool was destroyed Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1030 (mount directory is not unmounted after killing glusterfs process) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1030
* fix typo in commandline help messageCsaba Henk2010-08-311-3/+2
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1482 (typo in help message) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1482
* glusterfsd: call fini of fuse and all active xlators in cleanup_and_exit()Amar Tumballi2010-08-301-1/+17
| | | | | | | | | | * handles the case of stale mount point in case of killing glusterfs process Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1030 (mount directory is not unmounted after killing glusterfs process) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1030
* gluster{d,fs,fsd}: add logrorate functionality to SIGHUPAmar Tumballi2010-08-291-3/+13
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1472 (SIGHUP should do 'logrotate') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1472
* dump the volume file details in log file if graph init succeedsAmar Tumballi2010-08-281-0/+2
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1468 (after dvm changes, volfile info is not dumped in logfile) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1468
* glusterfsd: don't call pmap-signout in 'cleanup_and_exit()'Amar Tumballi2010-08-261-1/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1434 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1434
* glusterfsd: Clang error fixes.Sachidananda2010-08-261-5/+54
| | | | | | | | Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1077 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1077