302 Commits

Author SHA1 Message Date
Basavanagowda Kanur
4a632ea96b protocol/client - set remote inode number in inode context for root inode also, during lookup_cbk().
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 14:47:53 +05:30
Harshavardhana
6bd53940d1 Renamed abs_top_srcdir to top_srcdir for older versions of autotool
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:45:18 +05:30
Shehjar Tikoo
4e68cf7c4d libglusterfsclient: Remove unused variables
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:45:01 +05:30
Shehjar Tikoo
27d73ca503 libglusterfsclient: Add realpath API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:57 +05:30
Shehjar Tikoo
4ada36f9bd libglusterfsclient: Add lstat API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:26 +05:30
Shehjar Tikoo
7cd3cc24c8 libglusterfsclient: Add readlink API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:23 +05:30
Shehjar Tikoo
a6f0446541 libglusterfsclient: Add symlink API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:19 +05:30
Shehjar Tikoo
7aff8936f9 libglusterfsclient: Add unlink API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:16 +05:30
Shehjar Tikoo
42528875cd libglusterfsclient: Add mkfifo API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:12 +05:30
Shehjar Tikoo
933c3eee81 libglusterfsclient: Add mknod API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:08 +05:30
Shehjar Tikoo
169976dfaf libglusterfsclient: Add utime API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:05 +05:30
Shehjar Tikoo
c9017ae0de libglusterfsclient: Add utimes API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:44:01 +05:30
Shehjar Tikoo
366bd140f3 libglusterfsclient: Add rename API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:58 +05:30
Shehjar Tikoo
5feab82f0c libglusterfsclient: Add statvfs API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:54 +05:30
Shehjar Tikoo
ff2bacf346 libglusterfsclient: Add statfs API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:50 +05:30
Shehjar Tikoo
f199ebf5d0 libglusterfsclient: Add link API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:46 +05:30
Shehjar Tikoo
e18b8031ab libglusterfsclient: Add ftruncate API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:42 +05:30
Shehjar Tikoo
9193494d20 linglusterfsclient: Add fsync API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:38 +05:30
Shehjar Tikoo
912f1a8492 libglusterfsclient: Add fchown API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:34 +05:30
Shehjar Tikoo
67561c9652 libglusterfsclient: Add fchmod API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:30 +05:30
Shehjar Tikoo
01a48790c4 libglusterfsclient: Add closedir API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:26 +05:30
Shehjar Tikoo
eb4d5f0074 libglusterfsclient: Add opendir API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:22 +05:30
Shehjar Tikoo
f6ebe58492 libglusterfsclient: Add chown API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:19 +05:30
Shehjar Tikoo
e7d7a19d57 libglusterfsclient: Add chmod API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:43:15 +05:30
Shehjar Tikoo
f887fd6f7c libglusterfsclient: Abstract away inode attr cache updates
This commit creates a separate function that allows users of
the inode attribute cache to update the cache when required.
Major users are lookup, stat and fstat functions.

The function libgf_update_iattr_cache(..) allows updating the lookup
and stat caches separately using flags.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:59 +05:30
Shehjar Tikoo
4c98eaf4c4 libglusterfsclient: Replace dict based inode ctx with array based one
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:55 +05:30
Shehjar Tikoo
c71110fb15 libglusterfsclient: Fix fd_ctx leak on release cbks
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:51 +05:30
Shehjar Tikoo
adb677be13 libglusterfsclient: Replace dict-based fd ctx with array-based one
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:47 +05:30
Shehjar Tikoo
00968db306 libglusterfsclient: Generalize [RW] checks on dirs
This patch moves the read-write permission check on directory
inode into libgf_client_opendir, so that when I am next adding support
for the opendir syscall, I dont have to perform similar checks again,
outside this function.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:43 +05:30
Shehjar Tikoo
1873d0bdb5 libglusterfsclient: Check for directory on O_CREAT
If we have received an O_CREAT for a name where that basename is a
directory, and if we have successfully looked up the inode for this directory,
then we can check for S_ISDIR in libglusterfsclient and prevent sending a message
to the server through libgf_client_creat. See also the comment inline.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:38 +05:30
Shehjar Tikoo
79215d4f24 libglusterfsclient: Create and use LIBGF_REPLY_NOTIFY macro
All reply notifications can now be abstracted away through
this macro and all cbk functions should now call this.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:42:35 +05:30
Shehjar Tikoo
ba4833355a libglusterfsclient: Fix segfault on non-NULL loc->name
The gf_log message actually assumes that loc->name will have a valid
non-NULL name in it, whereas if the loc_t being passed to it was
actually created on a function stack, i.e. a local function variable
and was then passed down the code path to do_path_resolve without ever
initing it or zeroing the structure, its possible that the name member
has a non-NULL but corrupted address. This leads to a segfault.
Whereas, we know loc->path will always have the full path.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:18:16 +05:30
Shehjar Tikoo
c1b3deff11 libglusterfsclient: Use macros for argument checks
Having those if {} blocks to check for argument
validity hurts the eye so this patch replaces those checks
with macros. One macro already exists in libglusterfs. The second
macro is introduced by this commit for libglusterfsclient-specific
check for paths.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:18:12 +05:30
Shehjar Tikoo
b3e3fc79d4 libglusterfsclient: Rename XLATOR_NAME define
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 13:17:53 +05:30
Basavanagowda Kanur
41011cdb4c protocol/client - NULL check for loc->inode added in statfs(), before trying to retrieve remote inode number from loc->inode's context.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 10:29:17 +05:30
Harshavardhana
4c4021bea2 RPM spec file updates for RHEL,CentOS,Fedora,SLES and OpenSUSE for upcoming 2.0.0 stable release
* Updates to ahere to RPM standards hugely driven by Fedora dist-f11.
* RPM spec file portable across RHEL, Fedora, CentOS, SLES, OpenSUSE.
* RPM spec build options made compact and removed unnecessary.
* %changelog old entries removed as they were giving many warnings
  during rpmlint.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-17 10:29:10 +05:30
Anand V. Avati
7ae141bb05 add NULL check in iobuf_arena_destroy 2009-04-16 17:32:05 +05:30
Raghavendra G
6bc3f3c19b logging enhances to commit d77279ef04ca75ab9715864274567d1ce0ce66a6
- logging made more relevent.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 17:11:10 +05:30
Vikas Gorur
8a00ad080c Use original pid when calling the FOP in afr transaction.
Save the original pid while locking and restore it
after the FOP is done. This ensures posix-locks can
release locks (fcntl) properly.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 17:10:28 +05:30
Raghavendra G
34f8f0b3e1 write-behind aggregate-size related changes
This patch brings in following changes:
   1. make aggregate-size as non-configurable and make it to be equal to
      maximum iobuf size.
   2. best effort to write data in chunks of length as close to aggregate-size
      as possible but not greater than aggregate-size, since aggregate-size is
      made equal to Maximum size of iobuf.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 17:10:01 +05:30
Raghavendra G
ffb863c3a8 write-behind: adhere to coding guidelines.
- make sure lines are not greater than 80 characters in length

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 17:09:50 +05:30
Basavanagowda Kanur
e77eb62f25 cluster/distribute bug fix - try to create linkfile in dht_lookup_everywhere_cbk(), only if hashed subvolume can be determined, else error out with ENOENT.
-- with local fixes (avati)

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 17:09:20 +05:30
Harshavardhana
d170334473 Fixed the build problems observed
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 14:54:21 +05:30
Basavanagowda Kanur
e6c22c0587 eliminate this_ino_get(), this_ino_set(). handle inode_ctx_{get,set}() at the fop level itself.
they used to log ambiguously
and was of no use. logging is now more precise and will help in debugging,
in case of errors.

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 14:42:11 +05:30
Vikas Gorur
f7902b7072 Changed xattr format of afr changelog to support adding and removing of subvolumes while keeping existing data.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-16 14:41:41 +05:30
Raghavendra G
d77279ef04 server-helpers: Add check for NULL connection arguement being passed in helpers.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 15:31:35 +05:30
Anand V. Avati
3baa437e99 remove unused variable @ret in ib_verbs_options_init
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 15:30:15 +05:30
Anand V. Avati
54c40bbfb4 use MAP_FAILED macro to free mem_base in arena_destroy
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 15:00:38 +05:30
Anand V. Avati
1ce5acccf5 FREE arena->iobufs in iobuf_arena_destory
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 14:52:52 +05:30
Basavanagowda Kanur
8b32e03f87 cluster/unify link() should be sent to only one subvolume.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
2009-04-14 14:52:38 +05:30