363 Commits

Author SHA1 Message Date
Amar Tumballi
95a33a5903 gfapi: fix the failure in glfs_open()
* the issue is happening because the resolve_symlink() logic was
  reversed

Change-Id: I10eca14d82e3ebf5a0195d5db1330f9e1a3e2dc4
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 839950
Reviewed-on: http://review.gluster.org/3978
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-09-25 10:53:18 -07:00
Anand Avati
8f9e94c655 gfapi: add symlink (auto resolution) support in resolver
- 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>
2012-09-17 19:25:01 -07:00
Amar Tumballi
2f2e3bfb5e syncop: handle 'dataonly' flag in syncop_fsync()
* 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>
2012-08-20 00:16:01 -07:00
Amar Tumballi
ed4b76ba9c core: reduce the usage of global variables
* 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>
2012-08-03 02:01:52 -07:00
Anand Avati
c8ed0096d5 glfsxmp extension
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>
2012-08-02 13:25:02 -07:00
Anand Avati
1b42c864d6 gfapi: let glfs_init() return on non-RPC errors
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>
2012-08-02 13:24:36 -07:00
Anand Avati
a307249933 gfapi: set errno in glfs_init()
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>
2012-08-02 13:22:28 -07:00
Anand Avati
a9e3e24dd3 gfapi: missed setting port option
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>
2012-08-02 13:21:18 -07:00
Pranith Kumar K
fa0442e001 Warnings: Fix set, unused variable warnings
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>
2012-07-29 11:19:08 -07:00
Anand Avati
07c90f84d3 gfapi: unglobalize oldvol{file,len}
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>
2012-07-27 11:58:21 -07:00
Jeff Darcy
67a85803b5 Example of using libglfs from Python.
Change-Id: I081582c457428d55db8ec1ed6d90f1e439f51f0d
BUG: 839950
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3675
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-18 12:45:10 -07:00
Anand Avati
b324e31731 glfsxmp: libgfapi based example
This is an example application which uses libgfapi. It is
a complete autotools based build system which demonstrates the
required changes in configure.ac, Makefile.am etc to successfuly
detect for and build an application against libgfapi.

There are two approaches to building a libgfapi based application:

1. In the presence of pkg-config in your build system.
This is the recommended approach which is also used in this example.
For this approach to work, you need to build glusterfs by passing
--pkgconfigdir=/usr/lib64/pkgconfig (or the appropriate directory)
in your distro. This already happens if you build RPMs with the
glusterfs.spec provided in glusterfs.git. You will also need to
install glusterfs-api RPM.

2. In the absence of pkg-config in your build system.
Make sure your LDFLAGS includes -L/path/to/lib where libgfapi.so is
installed and -I/path/to/include/glusterfs where the 'api' directory

Change-Id: Ic4eab2df002d7e8d20593a03e643859423048848
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3666
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-07-18 12:12:25 -07:00
Anand Avati
2475e0193c gfapi: API/library for accessing gluster volumes
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>
2012-07-18 12:10:44 -07:00