40 Commits

Author SHA1 Message Date
Anand V. Avati
2e743ddc4a updated transport interface functions to accommodate IOBUF/IOBREF
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
c723c0dae5 do away with frame->root->{req,rsp}_refs members
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:46 +05:30
Anand V. Avati
4554d82bbe update prototype of writev and readv_cbk to use IOBREF in parameter (step towards elmination of frame->root->{req,rsp}_refs
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:46 +05:30
Anand V. Avati
3524572538 IOBREF support for holding iobuf refs along with fops (replacement for frame->root->{req,rsp}_refs
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:46 +05:30
Anand V. Avati
124fb0c752 IOBUF support (to be used by transports and fuse)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:46 +05:30
Vikas Gorur
d71e722480 Add lock-less versions of fd_ctx_*
Added __fd_ctx_get
      __fd_ctx_set
      __fd_ctx_del which do not hold any lock.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-07 16:01:42 +05:30
Raghavendra G
cf6f21928d libglusterfsclient code changes
- add dentry support to libglusterfsclient.
  - changes related to using array, to store context in inode instead of
    dictionary.
  - code changes related to cleanup of libglusterfsclient interface.
  - added glusterfs_mkdir and glusterfs_rmdir
  - other changes in libglusterfsclient to make it work with code changes
    in other parts of glusterfs.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:09 +05:30
Raghavendra G
6eb419f1ca server-protocol - reimplement connection cleanup to happen in 2 phases
- first phase, which happens when POLLERR is received on transport,
     releases all locks, flushes all open fds.
   - second phase, which happens when both the transports of connection destroyed,
     destroys the containers like lock table, fd table along with the connection.
   - the first phase, clears up any references to transport held by translators
     like posix-locks(in the form of blocked locks) paving way for the second phase.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:09:35 +05:30
Anand V. Avati
f2cdc5d10c change char to int in execute_cmd (based on comment on #26006 from Giorgio Marinelli <gio@reversiva.net>
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:13:49 +05:30
Bharat Shetty Barkur
1e9b5a5a35 Changed few lines to ensure Optimization (lesser code).
Changed few lines to ensure lesser code optimization while checking the EOF for the file pointed to by specfp.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:13:30 +05:30
Anand V. Avati
25d415e191 use (fgetc() != EOF) instaed of feof() in parser
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-01 22:04:03 +05:30
Raghavendra G
db365c30d0 Enable glusterfs client to exit after a configured number of failed connects \ while fetching volume specification file from server
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-01 13:20:06 +05:30
Raghavendra G
aa63a12243 Avoid infinite loop while parsing volume specification files on Linux/ARM.
- patch submitted by anonymous user (ref: bug #26006 on savannah).

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-01 13:18:28 +05:30
Raghavendra G
96b687b9b8 Add new type of option type INTERNET_ADDRESS for validation
- used to validate options like remote-host, bind-address.
  - Also validate options of translators created during fetch of volume
    specification file from remote server.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-01 00:13:53 +05:30
Anand V. Avati
6c28cb81b2 fix duplicate setting of values in inode->ctx and fd->ctx
this patch avoids setting of duplicate key/value pairs in the context.
note that consumers have to explicitly check for previous existance of key
to avoid any kind of resource leak resulting from this overwrite.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 23:40:36 +05:30
Bharat Shetty Barkur
3df266c278 Changed the gf_log warning for return of null via CALLOC from 'old' to 'newdata'
Fixed the warning message to be more clearer for return of the null by CALLOC, by changing old to newdata.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 16:28:28 +05:30
Amar Tumballi
c20359b5b2 fixed sys_<fops> related warnings. (on mac os x and opensolaris)
The fix in posix will fix 'unresolved' symbol errors in Mac/Solaris/FreeBSD

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-19 14:44:33 +05:30
Vikas Gorur
3099d29e8e Add system call abstraction layer
- syscall.c provides platform-independent system calls
- previous code for this from compat.c removed
- posix xlator uses new functions from syscall.c
- solaris_flistxattr added to compat.c

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-17 17:15:07 +05:30
Vikas Gorur
7af8d8edbd Add extra 'volume' parameter to inodelk/entrylk calls
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-12 16:29:45 +05:30
Basavanagowda Kanur
31c817836c xlator.c option validation should check for empty valid options list (for strings).
'if (!opt->value)' always fails as 'value' member is an array of size ZR_OPTION_MAX_ARRAY_SIZE and is always non-null. it should have been 'if (opt->value[0] == NULL)' instead.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-12 16:10:24 +05:30
Bharat Shetty Barkur
6a70225b69 Fixed two more occurrences of poll_out variables used for logging.
Changed the poll_in variable to poll_out variable at two more places in the code.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-10 00:55:20 +05:30
Vikas Gorur
0991858fca added fgetxattr and fsetxattr FOPs
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-07 02:08:41 +05:30
Raghavendra G
762b1f9aef code changes in the usage of inode_ctx_get and inode_ctx_put after their implementation is changed to hold inode->lock.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-05 01:04:34 +05:30
Amar Tumballi
c8340e70f8 Change to fix the build problems with bison 1.28 (in RHEL 4.6)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-04 14:53:10 +05:30
Anand V. Avati
1b51e542b9 inode_ctx_t locks added
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-03 20:30:42 +05:30
Amar Tumballi
130ae0dee7 changes in patchset and repo version
noticed that if anyone pulls from git repo, the version says 'tla' and
patchset also shows tla's patch.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-03 11:45:12 +05:30
Bharat Shetty Barkur
7d7610007a Fixed small error regarding the poll_out variable
Changed the poll_in variable to poll_out variable, so that the logging is relevant to the case of invalid poll_out value.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-03 11:36:57 +05:30
Amar Tumballi
8462dd88ad volumefile modification awareness to make sure there are no inconsistencies.
Complete (including feature to properly umount) in my sense.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-27 16:13:55 +05:30
Basavanagowda Kanur
f097e77ffb moved dht_hashfn_tea() to libglusterfs/hashfn.c as gf_dm_hashfn() (dm - davies-meyer).
moved dht_hashfn_tea() to libglusterfs/src/hashfn.c as gf_dm_hashfn().

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-27 01:37:08 +05:30
Basavanagowda Kanur
3d8bc3cbaf updated copyright header to extend copyright upto 2009
updated copyright header to include 2009.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-26 22:18:46 +05:30
Basavanagowda Kanur
d3a318973c fd->lock added to protect transactions for accessing and modifying fd->_ctx.
fd->_ctx access and modifications are now protected by fd->lock.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-26 20:51:50 +05:30
Basavanagowda Kanur
b537778790 __inode_unlink() should not be sent a NULL inode.
unlink_inode might be NULL in inode_unlink() under the following circumstances:
1. 'inode' got forget() and was unhashed.
2. 'inode' was replaced by a new inode object and the new object got forget() or was pruned out of the inode table.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-26 16:56:54 +05:30
Raghavendra G
ab7fe2987f backtick support enhancement
- text within backtick can span multiple lines
  - check exit status of command after execution

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-25 16:43:39 +05:30
Vikas Gorur
a3ed4474de added lock_notify and lock_fnotify FOPs to everywhere necessary in libglusterfs/*
fixed indentation and resubmitting

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-23 19:31:52 +05:30
Harshavardhana
a2131aeafa attritbute and entry timeout values under volume now support float/double values
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-21 21:14:41 +05:30
Harshavardhana
b5e0ee918f new function gf_string2double for float/double values
fixed warning

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-21 21:14:23 +05:30
Harshavardhana
9679f8db65 new functions dict_{get,set}_double for float/double value
fixed warning

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-02-21 21:07:31 +05:30
Amar Tumballi
e9ac5f5877 fix to remove ''input' defined but not used' warning in building glusterfs
needed to complete the build scripts without warnings

Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
2009-02-20 09:40:09 -08:00
Shehjar Tikoo
1c701badce Fix the order of CALLOC() args
Fix the order of  CALLOC arguments.

Signed-off-by: Shehjar Tikoo <shehjart@zresearch.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
2009-02-19 02:58:14 -08:00
Vikas Gorur
77adf4cd64 Added all files 2009-02-18 17:36:07 +05:30