summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Erase xattr during self-heal based on original dict.Vikas Gorur2009-04-095-10/+27
| | | | | | | | Decrement xattr during self-heal based on the original dict instead of pending_matrix, as the pending_matrix might have been altered later. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* niftify mount(8) output for glusterfs mountsCsaba Henk2009-04-081-32/+79
| | | | | | | | | | | | Originally, mount(8) shows a glusterfs mount like this: glusterfs on <mp> type fuse With this patch, mount(8) will show a glusterfs mount like this: <volfile> on <mp> type fuse.glusterfs Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Commit package making files for FreeBSD and Solaris platform.Harshavardhana2009-04-089-0/+487
| | | | | | | | | Commit for package making related files for FreeBSD and Solaris. These files are supposed to be in repository to not loose track and update them as needed. I will update them soon for upcoming release where we support Solaris on ib fabric also. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Complete support for rmdir fopShehjar Tikoo2009-04-081-4/+36
| | | | | | | glusterfs_rmdir code path wasnt implemented completely. Here is an attempt to complete it. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Create new directory inodeShehjar Tikoo2009-04-081-0/+1
| | | | | | | | Make sure we give an allocated inode in the loc so that the underlying callbacks are able to fill it with the relevant information about the directory being created. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Return ENOENT on missing ancestor componentShehjar Tikoo2009-04-081-0/+6
| | | | | | | | If any of the path's components, except the basename, are missing from the dentry cache and the corresponding lookup from the server also fails, return an ENOENT. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Return EEXIST on lookup success in glusterfs_mkdirShehjar Tikoo2009-04-081-4/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Perform explicit createShehjar Tikoo2009-04-081-4/+3
| | | | | | | | | | | We must create the file based on the O_CREATE in the flags instead of depending on the return status of the lookup. This works because we've already handled O_EXCL earlier and also handled a missing file(ENOENT) in case this was actually an open and not create. Adapted from Raghu's original patch. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Handle O_CREAT on lookup failureShehjar Tikoo2009-04-081-0/+15
| | | | | | | | | | | | | | | | | On lookup failure, if O_CREAT is required, then we must: 1. explicitly lookup the parent directory. 2. create a new inode for the new file being opened. This special case is required for file creation because: 1. We cannot depend on the previous lookup to have reliably looked up the parent inode. 2. inode for the new file does not exist in the itable. Patch adapted from Raghu's original fix. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Dont depend on ENOENTShehjar Tikoo2009-04-081-2/+2
| | | | | | | | | | Dont depend on the dentry and explicit lookup function, i.e. libgf_client_path_lookup(..), to return ENOENT on not finding a dentry. Just use op_ret = -1 as a lookup failure status. Patch adapted from Raghu's original fix. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Remove spurious strcmpShehjar Tikoo2009-04-081-6/+0
| | | | | | | | | | | This strcmp existed because of assumptions that do not hold true since the change in libglusterfsclient internals recently. This is another step in fixing the seg-fault on glusterfs_create. Patch adapted from Raghu's original fix to the problem. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Resolve path on empty cachesShehjar Tikoo2009-04-081-17/+11
| | | | | | | | | | | | | | | | | The earlier case was that the explicit lookups to the server were being sent only when the parent inode was NULL. This situation breaks when the parent inode is available in the i- or d-cache but the child dirent is not. In such a case, no explicit lookups were being sent to get the missing child dirent. Now, explicit path lookup happens even if the inode for parent or basename is not found in the caches. This also fixes a seg-fault occuring during glusterfs_open, in my test case, but one that could occur almost anywhere lookup code is used. Patch adapted from Raghu's original patch. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Fix segfault in glusterfs_openShehjar Tikoo2009-04-081-3/+3
| | | | | | | | | | | | libgf_client_loc_fill gets passed a name=NULL argument. So when this function returns the filled loc argument, this loc is actually missing the inode structure that was to be filled. The segfault actually occurs a few lines later when we try to access fd->flags but fd returned by fd_create is NULL because we'd passed a NULL inode to it, i.e. the loc->inode. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* introduction of secondary index database in storage/bdbBasavanagowda Kanur2009-04-084-1523/+2019
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* link() & rename() on storage/bdb will always return EXDEV.Basavanagowda Kanur2009-04-083-353/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* storage/bdb untabify, code alignment to limit to 80 characters per line.Basavanagowda Kanur2009-04-084-4409/+4566
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* map translator cleanup.Amar Tumballi2009-04-081-643/+1065
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix minor bug in afr_open_cbk.Vikas Gorur2009-04-081-3/+7
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Refactor un-ordered worker exit pathShehjar Tikoo2009-04-081-33/+17
| | | | | | | This is being done for the same reason as the previous refactoring for ordered threads. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Refactor ordered worker exit pathShehjar Tikoo2009-04-081-34/+25
| | | | | | | | | | | | | | This patch re-factors the exit path of an ordered worker on a time-out. Earlier we're checking for exit permission in such a way that required us to release and acquire the worker lock a second time in the worker loop opening a window wherein a new request could've been appended to the request queue. This patch makes the decision to exit while still holding on to the worker lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* add .gitignoreCsaba Henk2009-04-081-0/+12
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix in changelog logic.Vikas Gorur2009-04-076-41/+254
| | | | | | If a writev fails, remember it by marking it in the fd context. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Consider a subvolume dead if an fop fails on itVikas Gorur2009-04-073-17/+19
| | | | | | | | | Transaction fops earlier called afr_transaction_child_died only if an fop failed due to ENOTCONN or EBADFD. Now they consider a child dead regardless of the reason for failure. This handles cases such as ENOSPC. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add lock-less versions of fd_ctx_*Vikas Gorur2009-04-072-52/+104
| | | | | | | | 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>
* Enabling booster after port to work with changed libglusterfsclient interface.Raghavendra G2009-04-061-0/+929
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix to fd leak in posix_create() in case of some failures.Amar Tumballi2009-04-061-2/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* nufa to take care of free disk-space while creating files.Amar Tumballi2009-04-061-32/+74
| | | | | | nufa gets awareness about the available free-disk-space in subvolumes. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix in return value of afr_sh_mark_sourcesVikas Gorur2009-04-063-10/+26
| | | | | | | | | | | | afr_sh_mark_sources now returns: -1 if two wise subvols conflict (split-brain) 0 if all subvols are innocent (no self-heal needed) >0 if sources found Also, changes to callers of afr_sh_mark_sources to handle return value properly. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* bitrot-13 fixCsaba Henk2009-04-061-0/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix an incorrect type-cast in libglusterfsclient.cVikas Gorur2009-04-061-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Cleaner stub destructionShehjar Tikoo2009-04-061-0/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Sanity check worker thread idxShehjar Tikoo2009-04-061-20/+62
| | | | | | | | 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>
* disabling boosterAnand V. Avati2009-04-031-920/+0
|
* distribute to take care of available disk space while creating new dirs, and ↵Amar Tumballi2009-04-035-26/+384
| | | | | | | | files. distribute gets awareness about disk-space while creating the files Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix broken transport-type unixRommer2009-04-031-1/+5
| | | | | | | 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>
* libglusterfsclient - reimplement glusterfs_fgetxattr and glusterfs_fsetxattrRaghavendra G2009-04-031-90/+137
| | | | | | | | - 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>
* libglusterfsclient - fix bug in __do_path_resolveRaghavendra G2009-04-031-22/+26
| | | | | | | | - 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>
* libglusterfsclient - move lookup timeout related code to ↵Raghavendra G2009-04-033-227/+181
| | | | | | | | | | 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>
* libglusterfsclient - fix indentationRaghavendra G2009-04-033-78/+155
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - change implementation of glusterfs_getRaghavendra G2009-04-033-41/+49
| | | | | | - remove redundent lookups happening in glusterfs_get. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* mod_glusterfs/lighttpd/1.4 port and memory leak fixesRaghavendra G2009-04-032-99/+196
| | | | | | - port owing to changes in interface of libglusterfsclient. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* mod_glusterfs/apache/1.3 portRaghavendra G2009-04-031-25/+26
| | | | | | - port owing to changes in interface of libglusterfsclient. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* mod_glusterfs/apache/2.2 portRaghavendra G2009-04-031-20/+21
| | | | | | - port owing to changes in interface of libglusterfsclient. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient code changesRaghavendra G2009-04-037-436/+1194
| | | | | | | | | | | | - 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>
* server-protocol - reimplement connection cleanup to happen in 2 phasesRaghavendra G2009-04-036-32/+261
| | | | | | | | | | | - 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>
* Made afr inode context a 64-bit packed value instead of a structure.Vikas Gorur2009-04-034-313/+205
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Load balance read operations among subvolumes in afrVikas Gorur2009-04-024-110/+513
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Defined afr_inode_ctx_t structure.Vikas Gorur2009-04-022-11/+76
| | | | | | | | 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>
* io-threads: Support autoscaling volfile optionsShehjar Tikoo2009-04-022-24/+104
| | | | | | | | | | | | | | | | | 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>
* io-threads: Cleanup request queueing,thread firingShehjar Tikoo2009-04-021-30/+38
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>