summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* booster: Add rewinddir APIShehjar Tikoo2009-05-182-0/+37
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Refine readdir entry parsing logicShehjar Tikoo2009-05-181-25/+19
| | | | | | | | 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>
* libglusterfsclient: Add telldir APIShehjar Tikoo2009-05-182-0/+35
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Add seekdir APIShehjar Tikoo2009-05-182-0/+32
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Add rewinddir APIShehjar Tikoo2009-05-182-1/+33
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Revert and re-do readdir conformanceShehjar Tikoo2009-05-182-61/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* booster: Supplement fstab option parsingShehjar Tikoo2009-05-181-6/+14
| | | | | | | | 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>
* workaround for not including sys/cdefs.h -- including sys/cdefs.h breaks ↵Anand V. Avati2009-05-181-1/+16
| | | | build on solaris and other platforms
* Bug fix in pl_readv/writev to handle the mandatory lock case properly.Vikas Gorur2009-05-181-23/+21
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* client-protocol: Fix memory corruption in client_lookupRaghavendra G2009-05-161-13/+7
| | | | | | | | - 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>
* dict.c: make dict_serialized_length and dict_serialize to hold locks.Raghavendra G2009-05-161-120/+10
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* dict.c: Add dict_allocate_and_serializeRaghavendra G2009-05-162-0/+230
| | | | | | | | | - 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>
* make getxattr fail with ERANGE if reply is bigger than what was requestedCsaba Henk2009-05-161-31/+25
| | | | | | 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>
* apache/2.2/mod_glusterfs: port to use new glusterfs_readdir interface.Raghavendra G2009-05-161-5/+5
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* avoid duplicate mounts while using mount.glusterfsAmar Tumballi2009-05-161-1/+1
| | | | | | | 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>
* modified init scripts to honour @prefix@Harshavardhana2009-05-164-3/+12
| | | | | | fixes http://savannah.nongnu.org/bugs/?26581 Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Edited log message for --volfile-checkVikas Gorur2009-05-161-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* minor log enhancement in 'ib-verbs' transport.Amar Tumballi2009-05-161-0/+5
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* replace BIG_FUSE_CHANNEL_SIZE with 'this->ctx->page_size'Amar Tumballi2009-05-161-9/+9
| | | | | | | 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>
* default log file different per mount (or if server, per volumefile)Amar Tumballi2009-05-161-8/+54
| | | | | | | | 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>
* posix: Fix build warning on incorrect typeShehjar Tikoo2009-05-161-1/+1
| | | | | | | | | 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>
* stripe init 'block-size' pattern parsing bug fixed.2.0.1Amar Tumballi2009-05-081-59/+78
| | | | | | ref: http://savannah.nongnu.org/bugs/?26416 Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* scheduler-nufa: fix initialization of refresh-intervalRaghavendra G2009-05-081-8/+10
| | | | | | | | - 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>
* Set op_errno properly in afr_flush.Vikas Gorur2009-05-081-0/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add fstab parsing supportShehjar Tikoo2009-05-084-59/+467
| | | | | | | | | | | | | 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>
* booster: Standardize conf file and env variableShehjar Tikoo2009-05-081-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* backend-xattr-sanitize.sh: script added to extras/Anand V. Avati2009-05-072-1/+67
| | | | | | | | 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
* valid_host_name(): accept string lengths upto 75 chars (the limit accepted ↵Anand V. Avati2009-05-071-1/+1
| | | | by glibc resolver)
* symlink-cache: fix return value of readlinkRaghavendra G2009-05-071-2/+2
| | | | | | | | | - 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>
* fix in mount.glusterfs for proper direct io mode option.Amar Tumballi2009-05-071-1/+1
| | | | | | | 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>
* protocol/client: indentation fixesAnand V. Avati2009-05-071-926/+737
|
* protocol/client: removed conf->childAnand V. Avati2009-05-072-603/+0
|
* transport shortcut b/w client and serverAnand V. Avati2009-05-074-2/+131
| | | | | | 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.
* fix log message from transport-timeout to frame-timeoutAnand V. Avati2009-05-061-1/+1
|
* libglusterfsclient: Improve readdir conformance on re-entrancyShehjar Tikoo2009-05-062-23/+63
| | | | | | | | | | | readdir is supposed to be non-re-entrant only with respect to the given dir stream, not the whole process. What that means is the static struct dirent that we maintain in libglusterfsclient should be per-directory handle and not process-wide. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Fix large directory reading bugShehjar Tikoo2009-05-061-3/+16
| | | | | | | | | | | | | | As of now, we use 1024 bytes as the buffer for reading directory entries. If a directory as many files, then its possible that it does not fit into this buffer, thereby requiring more than one call to readdir. Now suppose the last bunch of directories fit more or less exactly int the 1024 byte buffer. If this happens, the offset extracted by the current logic(in libgf_client_readdir) never gets updated beyond the first entry in this last block, because the last block's first entry always remains same. This explanation is convoluted, I know, but I too found out the hard way. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Use CONFDIR as booster.conf default locationShehjar Tikoo2009-05-061-1/+1
| | | | | | | | This commit changes the default location of the booster.conf file from /etc/booster.conf to a directory defined during the build process. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Change booster conf env var nameShehjar Tikoo2009-05-061-1/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* afr self-heal: update file size of the returning stat buf with source file's ↵Anand V. Avati2009-05-061-0/+1
| | | | size
* log level fixes in read-aheadAnand V. Avati2009-05-051-6/+6
|
* log level fix in storage/posixAnand V. Avati2009-05-051-1/+1
|
* io-cache logging level fixesAnand V. Avati2009-05-054-33/+32
|
* libglusterfsclient: Add 0-byte size/count guardsShehjar Tikoo2009-05-051-0/+144
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add lchown APIShehjar Tikoo2009-05-051-0/+23
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add remove APIShehjar Tikoo2009-05-051-0/+22
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add getxattr,lgetxattr APIShehjar Tikoo2009-05-051-1/+47
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add readdir64 APIShehjar Tikoo2009-05-052-1/+14
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add statvfs APIShehjar Tikoo2009-05-052-0/+65
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add statfs APIShehjar Tikoo2009-05-052-0/+64
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* booster: Add lstat APIShehjar Tikoo2009-05-052-0/+127
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>