Commit Graph

10613 Commits

Author SHA1 Message Date
Vikas Gorur
7a543c3b45 Fix an incorrect type-cast in libglusterfsclient.c
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 21:49:43 +05:30
Shehjar Tikoo
258da6cd99 io-threads: Cleaner stub destruction
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 21:49:18 +05:30
Shehjar Tikoo
45dab1eefd io-threads: Sanity check worker thread idx
This patch adds sanity check for the ordered worker thread index
returned from the inode's context. If the index is corrupted we
STACK_UNWIND with ECANCELED.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 21:48:27 +05:30
Anand V. Avati
fed1aa318d disabling booster 2009-04-03 22:13:53 +05:30
Amar Tumballi
8a5005ecf0 distribute to take care of available disk space while creating new dirs, and files.
distribute gets awareness about disk-space while creating the files

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 22:02:25 +05:30
Rommer
f235826215 fix broken transport-type unix
fix broken transport-type "unix"
however unix transport not working with defined transport.socket.bind-path

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:29:30 +05:30
Raghavendra G
7a52d4ba1f libglusterfsclient - reimplement glusterfs_fgetxattr and glusterfs_fsetxattr
- glusterfs_fgetxattr and glusterfs_fsetxattr earlier used lookup and setxattr
    fops for implementation. Change it to use fgetxattr and fsetxattr fops
    instead.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:52 +05:30
Raghavendra G
475a5909f3 libglusterfsclient - fix bug in __do_path_resolve
- add argument lookup_basename to __do_path_resolve which indicates whether to
    lookup basename(path). This is necessary for apis like glusterfs_get, which
    dont want basename(path) to be looked up by libgf_client_lookup_path.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:48 +05:30
Raghavendra G
65bd768543 libglusterfsclient - move lookup timeout related code to libgf_client_path_lookup
- this simplifies the resolution of path to inode, the apis which receive
     path as argument just need to call libgf_client_path_lookup for
     path->inode translation.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:44 +05:30
Raghavendra G
ab534d54e4 libglusterfsclient - fix indentation
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:40 +05:30
Raghavendra G
e60d219484 libglusterfsclient - change implementation of glusterfs_get
- remove redundent lookups happening in glusterfs_get.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:35 +05:30
Raghavendra G
8b8448799c mod_glusterfs/lighttpd/1.4 port and memory leak fixes
- port owing to changes in interface of libglusterfsclient.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:27 +05:30
Raghavendra G
38be3fda5c mod_glusterfs/apache/1.3 port
- port owing to changes in interface of libglusterfsclient.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:21 +05:30
Raghavendra G
e600abcb96 mod_glusterfs/apache/2.2 port
- port owing to changes in interface of libglusterfsclient.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 19:24:16 +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
Vikas Gorur
d3d7245970 Made afr inode context a 64-bit packed value instead of a structure.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-03 18:13:05 +05:30
Vikas Gorur
75c70231fe Load balance read operations among subvolumes in afr
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 21:08:00 +05:30
Vikas Gorur
1e7c9fa937 Defined afr_inode_ctx_t structure.
Notification of a split-brain situation, which was earlier signalled
by the mere presence of inode context is now signalled by
the 'split_brain' member in the structure.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 21:07:53 +05:30
Shehjar Tikoo
9f2ef60274 io-threads: Support autoscaling volfile options
This commit finally makes the autoscaling feature visible to the user.
Know that we're now using two separate thread-pools, one for data
requests, called ordered thread-pool in io-threads, and the other
for meta-data requests, called un-ordered thread-pool.
We do not expose this information to the user to keep io-threads
simple. Consequently, when the user specifies a min-threads and
max-threads value, the number of threads assigned to each pool
is equal, i.e. both pools start with their min threads set to half of
the option "min-threads" and both scale up their threads at most up to
half of option "max-threads".

Volfile options will be added to the wiki and user-guide.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:29 +05:30
Shehjar Tikoo
b1bbd77f16 io-threads: Cleanup request queueing,thread firing
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:25 +05:30
Shehjar Tikoo
ae53812b2c io-threads: Allow scaling to be switched off
The default is also to provide no scaling. For both, ordered and
unordered request pools, when scaling is off, we maintain atleast the
minimum number of threads specified in the volfile.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:22 +05:30
Shehjar Tikoo
b64fa35870 io-threads: Add ordered threadpool state and code
Now we have the remaining fops going through the ordered
thread-pool.

To route a request through ordered thread, we use
iot_schedule_ordered(..) and the worker thread for
ordered requests is iot_worker_ordered(..)

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:18 +05:30
Shehjar Tikoo
ee79908d3b io-threads: Add un-ordered thread-pool.
This commit adds everything needed to:

a. Get un-ordered request going through the un-ordered
thread-pool. This happens through, the
iot_schedule_unordered(..). The unordered thread-pool
consists of thread running the iot_worker_unordered(..)
function.

b. Make threads in the un-ordered thread pool start-up
and exit depending on the thread state.

Note that at this point the requests that need
ordering are still going through iot_schedule(..).

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:14 +05:30
Shehjar Tikoo
e27f7f344e io-threads: Classify requests for threadpool type
New io-threads will serve requests through two separate
threadpools.

One thread pool for requests that must be ordered
on a file that is open. so that the server can process the requests
in the order they were entered in the requests queue, and not in the order
the io-thread is able to send a request, which in turn is determined
by how the thread gets scheduled. This can also be called the
data-intensive ops thread pool.

Second thread-pool for requests that dont care about ordering, i.e.
requests like lookup, open, create, mkdir, etc.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:11 +05:30
Shehjar Tikoo
42df79e2ad io-threads: Wire in support for rename fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:07 +05:30
Shehjar Tikoo
369476e93e io-threads: Wire in support for symlink fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:04 +05:30
Shehjar Tikoo
6afeb9dd1b io-threads: Wire in support for rmdir fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:19:01 +05:30
Shehjar Tikoo
21363da293 io-threads: Wire in support for mkdir fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:58 +05:30
Shehjar Tikoo
cbf8858a23 io-threads: Wire in support for mknod fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:54 +05:30
Shehjar Tikoo
ef73c3de60 io-threads: Wire in support for readlink fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:51 +05:30
Shehjar Tikoo
d767455020 io-threads: Wire in support for access fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:47 +05:30
Shehjar Tikoo
eab231f359 io-threads: Wire in support for fchown fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:44 +05:30
Shehjar Tikoo
3ca0a7859f io-threads: Wire in support for chown
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:40 +05:30
Shehjar Tikoo
d56683ccfa io-threads: Wire in support for fchmod fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:37 +05:30
Shehjar Tikoo
f05ca55ef7 io-threads: Wire in support for chmod fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:33 +05:30
Shehjar Tikoo
dffa5a92c7 io-threads: Wire in support for lookup fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 19:18:27 +05:30
Anand V. Avati
b91e83aa0d wb_flush - keep reference on fd for process_frame to perform STACK_WIND of flush.
This patch fixes bug report by Greg <greg@easyflirt.com> on gluster-users@ with subject 'glusterfsd crash'

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:17:27 +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
Harshavardhana
aa0fd06dad Build fixes for ib-verbs compilation on solaris
Build fixes for solaris on ib-verbs with recent OFUV Update 3 release.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:13:06 +05:30
Shehjar Tikoo
63115897fe unify-self-heal: Fix un-ref'ing of incorrect dict
dict_unref'ing of the dict in local
results in a crash due to de-referencing a NULL spinlock.
That is because after a STACK_UNWIND(..), we cannot expect
the frame->local to be allocated still.

Fix by using the other available reference to local->dict.

Ref: https://savannah.nongnu.org/bugs/?26058

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:12:11 +05:30
Vikas Gorur
26af4e1229 Print log message when AFR receives CHILD_UP/DOWN notification
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:12:00 +05:30
Anand V. Avati
522b2bdb54 socket_connect() - if socket is already created, do not fail transport_connect() -- causes spurious CHILD_DOWN events to be sent up when reconnect() thread misinterprets the failure of transport_connect() to be an actual teardown of the transport
the spurious CHILD_DOWN events cause self-heal in replicate to not heal files in that subvolume, writev to not modify that subvolume etc, accounting for a lot of discrepencies in replicate which are being in the mailing lists recently.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:11:39 +05:30
Harshavardhana
3acfb27587 Fixes server goes into infinite loop on Solaris when poll_err is not set.
Server goes into infinite loop when poll_err is not set.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:11:21 +05:30
Basavanagowda Kanur
cda677a98d mount/fuse to silently send fresh lookup for ESTALEd revalidates. log only in DEBUG level.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:09:51 +05:30
Basavanagowda Kanur
8e621bdfff cluster/stripe to propogate ESTALE to parent.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:09:46 +05:30
Basavanagowda Kanur
2b63980c5d cluster/unify propogates ESTALE to parent translator, if any subvolume returns ESTALE during revalidate.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:09:42 +05:30
Basavanagowda Kanur
60615a0a78 cluster/replicate should propogate the ESTALE error to parent, when at least one subvolume returns ESTALE.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:09:32 +05:30
Basavanagowda Kanur
705c7c9bac cluster/{dht,nufa} propogate ESTALE (when at least one subvolume returns ESTALE for revalidate) to parent translator.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-02 18:09:28 +05:30