302 Commits

Author SHA1 Message Date
Anand V. Avati
3276e650f8 memory leak (of header) when frame is attempted to be xfer'ed when transport is disconnected
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-28 00:53:11 +05:30
Anand V. Avati
3baa99ebef ping-pong timer: - share last_sent and last_received between channels so that any activity ensures the remote host being alive (useful under heavy loads) - timer expiry disconnects both transports
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-28 00:53:07 +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
Shehjar Tikoo
675e8b4a1f libglusterfsclient: Fix NULL argument bug
inode_ctx_get was being passed a xlator_t type
that was initialized to NULL resulting in a
EINVAL return from glusterfs_fstat.

Reported on gluster-devel

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 23:40:04 +05:30
Anand V. Avati
a59582c3fa posix_unlink - open/unlink/close only regular files
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 17:09:18 +05:30
Anand V. Avati
36e39bf9cb Enhancements to distribute selfheal
- create missing directories instead of creating linkfiles when
  entry missing  on hashed subvol

- detect cases where there are dirs and linkfiles for a name and
  make them all dirs

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 17:09:08 +05:30
Csaba Henk
a2d44f8cd3 make the location of the mount utility tunable at configure time
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 16:31:07 +05:30
Vikas Gorur
ec5a5fa208 Fixed typo in warning string in afr.c
Fixed typo.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-26 16:28:38 +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
Raghavendra G
4e5c297d7c fix to rm of large file blocking other operations on the same directory containing file (ref: rt #779)
posix_unlink follows the below procedure to avoid client noticing delay during
unlink of large file
1. open file
2. unlink file
3. stack_unwind
4. close file

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-24 21:53:31 +05:30
Vikas Gorur
6e8017479f Made self heal logic more precise.
Discard earlier patch sent for the same error. This patch fixes
it more comprehensively.

This solves the spurious split-brain seen by many users.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-24 21:53:19 +05:30
Raghavendra G
8f590ad883 dht memory leak fix
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-24 21:53:12 +05:30
Amar Tumballi
270621b34a fixes crash in write-behind
in wb_flush, there was a chance that wb_process_queue()
was called with NULL frame, which causes crash.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-22 13:14:32 +05:30
Amar Tumballi
617fa25042 when the both channels in client protocol is disconnected, fd's are marked as bad
patch solves the problem of fds being valid even in the case of server
disconnection, which causes operations on wrong fd when server comes back up.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-21 04:05:55 +05:30
Amar Tumballi
cf15c8ab0f fixes issue of hashing to wrong subvolumes in case when a subvolume is down
When a hashed subvolume is down, variable 'subvol' was NULL, but was sent to itransform.
This patch solves this, and readdir is sent to proper subvolume now.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-21 04:05:52 +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
Anand V. Avati
103d827004 dht_layout_dir_cmp - if xattr is missing, it is an error only if cached layout has entry for that subvolume. 2009-03-19 02:22:20 +05:30
Shehjar Tikoo
b9fef00edb Add return after STACK_UNWIND
We must add a 'return' after a STACK_UNWIND due to a stub creation
failure, because if we dont, we'll end up adding a NULL stub to the
worker thread request queue.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-18 11:07:07 +05:30
Amar Tumballi
2d7f44e397 Moving few translators which are not well tested, are in beta stage to 'testing/' directory.
This way, users will be aware which are in 'beta' stage, and we can keep on
adding new translators (if any) seemlessly to stable codebase and once tested
can move them to proper places.

To use these translators, everyone will have to prefix 'testing/' to existing
type of translator (in volumefile)

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-18 08:26:29 +05:30
Amar Tumballi
b947dc7161 ib-verbs recv-size and send-size argument takes SIZET arguments now.
With this patch, to specify recv-size and send-size of ib-verbs to <n>KB, we need not give
the option as integer value of 'n * 1024' value. This is neater to do deployments.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-18 08:23:20 +05:30
Amar Tumballi
0a7f4cfc1c afr data self heal bug fix
fixes the issue of corrupting self-healed copy in AFR

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-18 08:13:01 +05:30
Anand V. Avati
ac8fe9901b Merge branch 'master' of ssh://avati@git.sv.gnu.org/srv/git/gluster 2009-03-17 22:38:26 +05:30
Shehjar Tikoo
8e0453e615 IO-threads Cleanup: Remove useless data structures.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-17 17:17:58 +05:30
Shehjar Tikoo
babf82427c IO-threads Cleanup: Clean-up request scheduling and queueing interface.
This patch does two things:

1. Cleans up the request scheduling and queueing interface so that all
fops only need to call iot_schedule and not iot_queue and in some
cases iot_schedule.

2. Till now, we've had open and create calls go through the main
glusterfsd thread when sending open and create fops. This patch makes
them also go through the worker threads. But since the open and
creates requests would not be called with a valid inode number in the
loc_t, these requests will get assigned to the worker at index 0.
This will be fixed RSN, when we introduce various techniques of
distributing the inodes(..not requests..) over the worker threads.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-17 17:17:53 +05:30
Shehjar Tikoo
8e3e0e776c IO-threads Cleanup: Change workers list to dynamically allocated array
Worker threads were represented as a list in iot_conf_t
which made us traverse the list of workers in order to
decide which thread gets the request. Now we represent the
workers as a dynamically allocated array so that we can just index
into the array to schedule the file.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-17 17:17:49 +05:30
Shehjar Tikoo
3a83fdc459 IO-threads Cleanup: Change request queue into a struct list_head
This patch changes the per-thread request queue from a custom circular
linked list, into the standard list.h list which is easier to
understand and has a cleaner interface.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-17 17:16:46 +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
Raghavendra G
7d61f9d693 write behind preserves order of fops with respect to writes
- the execution order of fops like read, stat, fsync, truncate etc whose results
 are affected by writes, are preserved.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-13 20:36:08 +05:30
Basavanagowda Kanur
473d02d169 implement forget for cluster/unify
inode_ctx_put() would set a list allocated on heap and would not be free()ed anywhere.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-13 11:01:42 +05:30
Basavanagowda Kanur
215a91c472 unify revalidate should propogate the error from any of the subvolume upto the parent, so that parent sends a fresh lookup.
unify revalidate fails if one of the subvolume returns error.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-13 11:01:30 +05:30
Raghavendra G
1601bb69f4 write behind preserves order of fops with respect to writes
- the execution order of fops like read, stat, fsync, truncate etc whose results
 are affected by writes, are preserved.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-12 17:49:21 +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
Amar Tumballi
b1c6a8507d feature to span the export directory across different mountpoints
This feature enables exported directory containing different mountpoints.
With, 'option span-devices <n>' where n is number of different mountpoints
export directories can have, one can enable this feature. By default the
number will be 1, and the inode scaling won't come into picture.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-10 15:41:15 +05:30
Krishna Srinivas
3b45b4c922 ping timer will not timeout if we recently got POLLOUT on the socket i.e if ((cur - (sent|received)) < timeout)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-10 15:38:20 +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
Harshavardhana
d4adb2b0f5 removed word "tla" from last of the remaining files
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-10 00:48:08 +05:30
Anand V. Avati
2323b92d9b failover to any active transport when requested channel is not connected
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-10 00:33:58 +05:30
Harshavardhana
ae378b63c0 Fixed build problems for init script installation.
Fixed build problem for init scripts (Reported by Krishna and Vikas).

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-09 17:45:56 +05:30
Anand V. Avati
fdfdd7cf05 dht_readdir_cbk - retry on same subvol if no entries match the hash
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-09 17:40:35 +05:30
Raghavendra G
5e4e99f4c1 changing the conversion specifier from 'd' to 'o' while printing st_mode
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-07 02:12: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
Vikas Gorur
d092dff9a6 fixed deadlock in io-cache
ioc_create_cbk was holding inode->lock and calling inode_ctx_put,
which also holds the same lock.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-07 02:03:22 +05:30
Krishna Srinivas
cb602a1d7d Changed the default transport-timeout to 600
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-05 02:20:31 +05:30
Anand V. Avati
eab182e8a8 disable building of user-guide
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-05 02:14:23 +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
5ed5ea9bff create fuse thread after setvolume cbk happens, not only in case of success
This patch fixes the 'hang' effect when client protocol fails to authenticate
to servers (it may be problem with volume file, or server process would have
not started yet).

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-03-03 11:58:03 +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