12511 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
0e9cda6d77 update storage/bdb with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
6e641226df update storage/posix with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
fa58474014 update cluster/map with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
645c60e308 update cluster/ha with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
89cacef43e update cluster/dht with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
f33f0669ef update cluster/afr with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:47 +05:30
Anand V. Avati
e0e6acd6fb update cluster/stripe with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:46 +05:30
Anand V. Avati
f551e72584 update cluster/unify with new readv writev prototypes
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-12 11:33:46 +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
e953968683 use 128Kbyte as the channel transfer size in fuse-bridge
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
Shehjar Tikoo
a31e26f8df io-threads: Reduce default min and max threads
Going by the memory usage for each threads, it is prudent to
have lower number of threads by default and let users who understand
the memory consequences increase the thread count for themselves.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-10 18:09:03 +05:30
Shehjar Tikoo
e1977a4e75 io-threads: Use non-default thread stack size
The default stack size on Linux is around 8 MiB for each
thread. This is clearly too high for our purpose. This commit reduces
the stack size down to 1 MiB.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-10 18:07:16 +05:30
Raghavendra G
bf7b462382 posix_unlink: make unlinking in background configurable through volume spec file
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-09 20:33:17 +05:30
Vikas Gorur
fb034ba303 Compulsorily do self heal if file sizes differ.
If file sizes differ, then compulsorily do self-heal. If no 'wise'
sources are found, then pick a 'fool' with the biggest file size.
If even 'fools' aren't found, pick the 'innocent' source with the
biggest file size.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-09 18:57:08 +05:30
Vikas Gorur
bfbcde7892 Handle files which have no pending xattrs at all.
If a pending xattr key is non-existent on a file (call such
files 'ignorant'), make all other non-ignorant subvolumes point
towards the ignorant one.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-09 18:57:05 +05:30
Vikas Gorur
ec35b79f74 Erase xattr during self-heal based on original dict.
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>
2009-04-09 18:57:01 +05:30
Csaba Henk
445b57bf72 niftify mount(8) output for glusterfs mounts
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>
2009-04-08 15:09:13 +05:30
Harshavardhana
8123c90701 Commit package making files for FreeBSD and Solaris platform.
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>
2009-04-08 15:06:56 +05:30
Shehjar Tikoo
b976536e61 libglusterfsclient: Complete support for rmdir fop
glusterfs_rmdir code path wasnt implemented completely. Here is an
attempt to complete it.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:06:22 +05:30
Shehjar Tikoo
ca32040f35 libglusterfsclient: Create new directory inode
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>
2009-04-08 15:06:09 +05:30
Shehjar Tikoo
364af2266e libglusterfsclient: Return ENOENT on missing ancestor component
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>
2009-04-08 15:06:04 +05:30
Shehjar Tikoo
353f30ad17 libglusterfsclient: Return EEXIST on lookup success in glusterfs_mkdir
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:06:00 +05:30
Shehjar Tikoo
957ae7ba2b libglusterfsclient: Perform explicit create
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>
2009-04-08 15:05:55 +05:30
Shehjar Tikoo
d4ab91b1f2 libglusterfsclient: Handle O_CREAT on lookup failure
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>
2009-04-08 15:05:50 +05:30
Shehjar Tikoo
e8282fd242 libglusterfsclient: Dont depend on ENOENT
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>
2009-04-08 15:05:44 +05:30
Shehjar Tikoo
ccbb9c7df1 libglusterfsclient: Remove spurious strcmp
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>
2009-04-08 15:05:38 +05:30
Shehjar Tikoo
2524bf2e9c libglusterfsclient: Resolve path on empty caches
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>
2009-04-08 15:05:30 +05:30
Shehjar Tikoo
47f0373468 libglusterfsclient: Fix segfault in glusterfs_open
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>
2009-04-08 15:05:24 +05:30
Basavanagowda Kanur
07fcdfebf2 introduction of secondary index database in storage/bdb
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:04:48 +05:30
Basavanagowda Kanur
abf35ff6c7 link() & rename() on storage/bdb will always return EXDEV.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:04:02 +05:30
Basavanagowda Kanur
8fea700263 storage/bdb untabify, code alignment to limit to 80 characters per line.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:03:53 +05:30
Amar Tumballi
34ae34826c map translator cleanup.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:03:42 +05:30
Vikas Gorur
4e90ca853b Fix minor bug in afr_open_cbk.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 15:03:15 +05:30
Shehjar Tikoo
225e86b374 io-threads: Refactor un-ordered worker exit path
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>
2009-04-08 11:57:15 +05:30
Shehjar Tikoo
fe1cedc1a9 io-threads: Refactor ordered worker exit path
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>
2009-04-08 11:57:09 +05:30
Csaba Henk
3acd56bec5 add .gitignore
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-08 11:56:29 +05:30
Vikas Gorur
5634986f59 Fix in changelog logic.
If a writev fails, remember it by marking it in the fd context.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-07 23:19:08 +05:30
Vikas Gorur
d46684117a Consider a subvolume dead if an fop fails on it
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>
2009-04-07 23:19:00 +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
27996c714f Enabling booster after port to work with changed libglusterfsclient interface.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 23:31:22 +05:30
Amar Tumballi
2d59bde996 fix to fd leak in posix_create() in case of some failures.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 23:30:33 +05:30
Amar Tumballi
c796267822 nufa to take care of free disk-space while creating files.
nufa gets awareness about the available free-disk-space in subvolumes.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 22:22:04 +05:30
Vikas Gorur
258fec70ba Fix in return value of afr_sh_mark_sources
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>
2009-04-06 22:04:48 +05:30
Csaba Henk
6b18487d28 bitrot-13 fix
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-06 22:04:34 +05:30
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