summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.c
Commit message (Collapse)AuthorAgeFilesLines
* gfapi: fix return value of glfs_finiKrishnan Parthasarathi2013-10-301-4/+8
| | | | | | | | | Change-Id: I5b90c7602334226a978bbdae2f9516e8701b403f BUG: 1004519 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6093 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: implement a minimial glfs_fini()Anand Avati2013-09-191-4/+44
| | | | | | | | | | | | | At the very least, we should PARENT_DOWN on the currently active graph and disconnect ourselves from glusterd. Further cleanups underway. Change-Id: I9276686a84b0975b5ce272b4cbec1b80920d5c5c BUG: 1004519 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5903 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: handle graph switch (cwd, fds, locks)Anand Avati2013-06-081-49/+26
| | | | | | | | | | | | | | - Migrate open fds to new graph - Migrate locks held in open fd to new fd - Refresh CWD, so resolution of relative paths happens on refreshed inode (on new graph). Change-Id: I4b18083b9b290107ebda1f917fc85b635ab72fb4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5167 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: ignore NULL and -1 parameters in glfs_set_logging()Anand Avati2013-06-081-5/+8
| | | | | | | | | | | | | Permit changing either logfile or level by specifying the other as -1 or NULL respectively. Change-Id: I7df05db7b613c57e0106a5cce846ae26d2a160d4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5166 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: provide stable st_dev in stat structureAnand Avati2013-06-081-0/+2
| | | | | | | | | | | | | | Samba depends on st_dev being unique and stable for different filesystems (it uses st_dev+st_ino as key to store metadata of a file). Change-Id: Ia022fabadfb5ef3fc9724c1b1ca86f1a20f98af9 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5164 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: add new API glfs_set_xlator_option()Anand Avati2013-06-081-1/+41
| | | | | | | | | | | | This is the equivalent of specifying --xlator-option command line argument to glusterfsd. Change-Id: I1171dd518a85db4bd456fa0790f450e889a956cd BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5157 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: POSIX locking supportAnand Avati2013-06-081-0/+1
| | | | | | | | | Change-Id: I37d9e1fb4a715094876be6af3856c1b4cf398021 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5155 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: support for chdir() and familyAnand Avati2013-06-081-1/+17
| | | | | | | | | | | | Add support for chdir, fchdir, getcwd, realpath equivalents in GFAPI. These are required for the Samba VFS plugin. Change-Id: I91d2db9146994403c98961c489c7640c51d5add2 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5151 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Better mechanism to handle memory accountingVijay Bellur2013-03-031-0/+2
| | | | | | | | | | | | | | | Memory accounting will now be enabled if: 1) Any glusterfs process is spawned with argument --mem-accounting. 2) DEBUG is defined. Change-Id: I3345e114127a57ce61916be0e2c4e0049a4c3432 BUG: 834465 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/4527 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* gfapi: Mark fs->init status done in glfs_init_done for the case of ↵Mohammed Junaid2013-02-031-4/+15
| | | | | | | | | | | | | | | | glfs_init_async. This seen when we call glfs_init_async. The glfs_init_done function, calls the call-back function without assigning 1 to fs->init. The problem occurs when we call glfs_read or a similar api next time which checks if fs->init is 1 and will enter into an infinite wait if it is zero. Change-Id: I34a3d1652c80e737f5b05082a3fbb6e5978b14cd BUG: 839950 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4445 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: handle 'dataonly' flag in syncop_fsync()Amar Tumballi2012-08-201-2/+0
| | | | | | | | | | | | * and also in syncop_readv(), don't look at _cbk args if op_ret is < 0. Change-Id: I3ab2982bc6d186e75b6adb74c8981e4ff7058bbe Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 839950 Reviewed-on: http://review.gluster.org/3828 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-031-6/+9
| | | | | | | | | | | | | | | | | | | | | | | * 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>
* glfsxmp extensionAnand Avati2012-08-021-0/+1
| | | | | | | | | 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: set errno in glfs_init()Anand Avati2012-08-021-0/+2
| | | | | | | | | | | 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>
* Warnings: Fix set, unused variable warningsPranith Kumar K2012-07-291-3/+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>
* gfapi: API/library for accessing gluster volumesAnand Avati2012-07-181-0/+546
Change-Id: Ie4cbcf91b58218bebf23cf951c313aceeb29f311 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3664 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Bharata B Rao <bharata.rao@gmail.com>