1163 Commits

Author SHA1 Message Date
Vikas Gorur
add02343dd Cleaned up log messages in spec.y
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-24 20:57:42 +05:30
Vikas Gorur
0651c3a12c Cleaned up log messages in inode.c
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-24 20:57:42 +05:30
Vikas Gorur
c3e4bb1bc8 Changed logging format to remove line number & function name from NORMAL and higher levels.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-24 20:57:42 +05:30
Vikas Gorur
b52a5a408b Introduce new log level GF_LOG_TRACE.
TRACE is the most verbose log level, meant to have a
full trace of operation.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-24 20:57:41 +05:30
Vikas Gorur
174872b364 Remove log level TRACE and the macro GF_TRACE.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-24 20:57:41 +05:30
Shehjar Tikoo
e0c284c6e7 iobuf: Define MAP_ANONYMOUS
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-24 15:36:57 +05:30
Anand V. Avati
7eb63e30f2 iobuf_pool->arenas_cnt should be incremented in iobuf_arena_alloc, and not iobuf_pool_add_arena (to avoid counting of unpruned arenas)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-22 13:07:40 +05:30
Shehjar Tikoo
27e1c9fbd3 call-stub: Check for NULL in the correct variable
It looks like the argument fd was meant to be checked here instead
of the fd in the call stub. This fixes a NULL fd bug that results in
an EINVAL on opendir.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-22 13:06:31 +05:30
Anand V. Avati
aa085b1067 inode.c - NULL check for the extra __inode_search performed, when presented inode is not hashed.
This bug fixes #967
2009-04-20 13:15:12 +05:30
Anand V. Avati
9a4a2e2286 pruning buffer margin - do not destroy if no other non-filled arenas are in the pool 2009-04-18 02:49:03 +05:30
Anand V. Avati
1d6dfe94fb added 2 APIs iobuf_size and iobref_size to return the system memory usage by an iobuf, and by all iobufs in an iobref respectively 2009-04-17 23:12:37 +05:30
Shehjar Tikoo
c1b3deff11 libglusterfsclient: Use macros for argument checks
Having those if {} blocks to check for argument
validity hurts the eye so this patch replaces those checks
with macros. One macro already exists in libglusterfs. The second
macro is introduced by this commit for libglusterfsclient-specific
check for paths.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:18:12 +05:30
Anand V. Avati
7ae141bb05 add NULL check in iobuf_arena_destroy 2009-04-16 17:32:05 +05:30
Anand V. Avati
54c40bbfb4 use MAP_FAILED macro to free mem_base in arena_destroy
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 15:00:38 +05:30
Anand V. Avati
1ce5acccf5 FREE arena->iobufs in iobuf_arena_destory
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 14:52:52 +05:30
Anand V. Avati
451620e0ec introduce page_size in glusterfs_ctx_t to be used by all translators set it to 128KB in main()
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 20:10:49 +05:30
Anand V. Avati
a0bb8a02cd bug fix in iobuf_select_arena - call __iobuf_pool_add_arena (unlocked version)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:55:32 +05:30
Anand V. Avati
3fb7252c5e bug fix - arena destruction now calls munmap and not FREE
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:55:29 +05:30
Anand V. Avati
dc9cdbdc1c add purge list support to make iobuf_pool_purge() in expensive, and actually call it in iobuf_put :-)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:55:25 +05:30
Anand V. Avati
b9a210a419 bug fix in iobuf_select_arena - never created a new arena
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:55:22 +05:30
Anand V. Avati
688db6452b add @filled list in iobuf_pool to keep away filled list from getting searched in iobuf_select_arena
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:55:19 +05:30
Anand V. Avati
00dff3bddc use MAP_FAILED macro to check for mmap failure instead of (void *) -1
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:55:09 +05:30
Anand V. Avati
014cdf3856 fixed sizeof parameter in CALLOC of a new arena
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-13 14:54:58 +05:30
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