| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
|
|
|
|
|
|
| |
but since introduction of IObuf it is no more. Now iobuf has to be unref'ed instead.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This is another attempt at fixing build problems on Solaris.
I am told that booster build is disabled on Solaris and I know
that it is disabled on Mac OS X also. Getting it to work
on both these systems is now on my TODO list, mainly
because on both these systems, we can have a glusterfs client
running without requiring FUSE.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
|
|
|
|
|
|
|
|
| |
When mandatory locks are enabled and a read/write
would block due to a lock and if the fd is opened
with O_NONBLOCK, return EAGAIN (previously EWOULDBLOCK).
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes mem-pool behaviour to return a directly usable
address by performing the required adjustment on the address
being returned.
This is different from the previous behaviour where we're trying to fit
into the requested size, the list_head*2 also. This is not efficient
enough in terms of space but hopefully works better than not having any
mem-pool at all. Besides, I am not comfortable with mem-pool meta-data
and caller-useable memory area being the same because of the potential for
mem-pool's data structure corruption.
PS:
Please do read the comments in the code for more info during review.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
| |
It is possible that some of the real_* functors for stat
family of syscalls are NULL. I've seen this on libc. In that
case, this commit attempts to use any available function that
performs an equivalent operation.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
In case the init procedure for VMP fails, we want to
continue using booster through the old approach, which means
leaving the fd-table intact.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
During a rename, if the new file exists, the old name needs to
over-write the new name. We're returning EEXIST, which is wrong
behaviour.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In __do_path_resolve, we need to use the new_loc.path as the input
for resolution rather than the resolved variable, simply because we're
not interested in resolving the names that have been resolved, as
pointed out by the variable name 'resolved'. Instead, we need to resolve
new_loc, which stores the next component in the path to
be looked up.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not cleaning up the ino member of a loc_t results in SIGABRT
in __inode_link because in some cases, the loc->ino is
different from loc->inode->ino. This happens especially in code
blocks which re-use a loc_t structure for pointing at different
inodes/files. For eg, if a loc_t has been assigned an inode and
an ino, and followed by a libgf_client_loc_wipe, then re-use of this
loc in say libgf_client_lookup results the SIGABRT because
libgf_client_lookup calls inode_link with the same loc_t. However,
this loc_t has just been assigned a new inode pointer but the ino
member still contains a previous inode's inode number. This difference
in inode numbers results in an assertion failure, so the SIGABRT.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
Here I am only refining the entry parsing code in order
to clarify the exit conditions from the loop. There were
a few workloads where this loop went infinite.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit basically reverts the previous readdir conformance
patch I sent a few days back. That commit had a completely retarded
and broken way of maintaining per-directory dirent.
It was broken for two reasons:
1. Creating a wrapper structure around the directory's fd_t
only for storing a struct dirent is not clean enough. This commit
takes a better approach by storing the dirent in fd_t context.
This dirent is valid only if the fd_t refers to a directory.
2. That commit was made and tested under the assumption (..stupidity
is a better word..) that only opendir call is used for opening a
directory. That is not correct. Directories are also opened using the
open syscall. The point is, glusterfs_open returns an fd_t and so did
glusterfs_opendir. The previous patch actually changed opendir to
return a new wrapper structure. That is fine, if we go by the POSIX
definition of open and opendir because, they're both supposed to
return different types, an int and a DIR*. However, in
libglusterfsclient, all other code assumes that directory handles
corresponding to DIR* and file descriptors corresponding to int types
are the same type, resulting in use of the same locking and fd context
addition/extraction code. So a directory opened using opendir returned
a wrapper structure which went down into the libglusterfsclient stack
where some function called a lock on the handle assuming it was an
fd_t, since it is not and dereferencing of the supposed fd->inode->lock
results in a seg fault.
Obviously, this didnt show up till unfs3 used open() to open a
directory and not opendir.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
Previous fstab option parsing logic was completely
retarded and did not handle all cases. This fixes the situation
so we now work without any problems.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
build on solaris and other platforms
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
- memory corruption was due to new members being added between allocation
of buffer for serializing xattr_req dictionary and dict_serialize of
xattr_req.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
| |
- this procedure atomically allocates a buffer and serializes dict into it.
- this procedure helps avoid memory corruptions due to race conditions where
in new members are added into dict between allocating a buffer for
serializing and actually serializing buffer into it.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
| |
Edited by avati: make the function signature of fuse_xattr_reply_buf() use 'const char *value' instead of 'char *value'
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
| |
This change is needed as the format of how the /etc/mtab entry of glusterfs
mount looks is now changed.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
| |
fixes http://savannah.nongnu.org/bugs/?26581
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
| |
Send the struct stat's 'blksize' variable same as GlusterFS's page-size,
instead of BIG_FUSE_CHANNEL_SIZE.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
This feature is required becuase when more than one glusterfs process
is started with default log file, all logs will be going to same file,
which after a while gets more confusing.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
| |
This fixes a build warning due to use of incorrect
type for size_t, for Core 2 Duo.
Extra fix from avati: change %ld to GF_PRI_SIZET
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
| |
ref: http://savannah.nongnu.org/bugs/?26416
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
- refresh-interval was being reported as not provided in the options
even when configured.
- fixes bug reported in rt #1007
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the booster.conf format from a
simple custom format to that of the /etc/fstab.c
See booster_mount(..) for the mount options supported/required
for LD_PRELOADing booster. I'll write a small help doc soon.
This commit also brings in fstab parsing code into libglusterfs
because Darwin libc only supports reading the hardcoded /etc/fstab.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
Run the script as:
sh$ ./backend-xattr-sanitize.sh /data/export0
and it will remove all the known stale xattrs on the backend files and dirs
|
|
|
|
| |
by glibc resolver)
|
|
|
|
|
|
|
|
|
| |
- sc_readlink wrongly returned strlen (link) + 1 when link was present in
cache.
- this fixes rt #828. Since fuse_readlink_cbk does link[op_ret] = '\0', there
was a memory corruption.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
| |
fixes the bug which causes GlusterFS not to have valid 'direct-io'
option through mount command or /etc/fstab entries.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
| |
|
| |
|
|
|
|
|
|
| |
This patch makes the server pass back the transport pointer of the client. If the UUID matches, the client makes the local transport 'shortcut' with the remote transport (pointer received from server)
The shortcut simulates a socket queue. Instead of serialized messages going over the network and getting queued in the tcp socket queue, the messages get queued in a transport specific queue picked by a polling thread.
|