summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-internal.h
Commit message (Collapse)AuthorAgeFilesLines
* gfapi: apply an upper bound on nested symlink resolutionAnand Avati2013-09-101-0/+2
| | | | | | | | | | | | | | In case of nested symlink resolution, implement an upper bound on the number of such nested levels the resolver will descend. This limit is arbitrary, and set to 2048 nested levels. Change-Id: I264e5bd60d317eda97f4e6f49bd5d8694f8664a9 BUG: 1004100 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5874 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: handle graph switch (cwd, fds, locks)Anand Avati2013-06-081-4/+53
| | | | | | | | | | | | | | - 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: 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: optimistic resolution with ESTALE detectionAnand Avati2013-06-081-2/+2
| | | | | | | | | | | | | | | | | | | Enhance the path resolver to be optimistic. Instead of performing a wasteful ->lookup() fop for every component in every API call, build in speculation logic to consider the previous resolution result temporarily, and if it results in ESTALE either later in the path resolution or in the FOP, then retry resolution with ->lookup() at every level and retry the FOP. This is the same optimistic resolution/retry logic Linux kernel resolver is proposing to use. Change-Id: Iecbc25248754caf0915cd7205910563ff88ce5e7 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5159 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-0/+5
| | | | | | | | | | | | 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>
* gfapi: added more API callsAnand Avati2012-10-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - stat - lstat - access - readlink - mknod - mkdir - rmdir - symlink - rename - link - opendir - closedir - seekdir - telldir - readdir_r - statvfs - chmod - fchmod - chown - lchown - fchown - utimens - lutimens - futimens - getxattr - lgetxattr - fgetxattr - setxattr - lsetxattr - fsetxattr - listxattr - llistxattr - flistxattr - removexattr - lremovexattr - fremovexattr Change-Id: Ic2467293ddfbcefaa9b41c82cec61a5602636833 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4022 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: add symlink (auto resolution) support in resolverAnand Avati2012-09-171-0/+2
| | | | | | | | | | | | - new internal API glfs_lresolve() for usage with APIs like glfs_lXXXX() (e.g. glfs_lstat()) Change-Id: I61c60af6bda3072f189684ad8ac9815d59f455fc BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3866 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/+1
| | | | | | | | | | | 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: unglobalize oldvol{file,len}Anand Avati2012-07-271-0/+3
| | | | | | | | | | | Multiple initialization of volumes works fine now. Change-Id: Ibc16957b39325817bc6f9ab90ebac9cefdafabf8 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3734 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/+74
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>