1280 Commits

Author SHA1 Message Date
vinayak hegde
15a6e0be9b cluster/stripe: Set local->inode value before referring it.
Signed-off-by: Vinayak Hegde <vinayak@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 362 (GlusterFS crash while doing mkdir in stripe setup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=362
2009-11-12 01:10:52 -08:00
Vijay Bellur
8b8691ef70 cluster/stripe: local was not being set in stripe_mknod_ifreg_setxattr_cbk()
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 367 (GlusterFS crash while doing mknod in stripe setup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=367
2009-11-12 01:10:52 -08:00
Shehjar Tikoo
9bbe8d4cd9 core: Replace inode_search with inode_grep in inode_from_path
This fixes a situation where the inode_from_path fails to
return an inode even though the inode exists in the table.

Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 315 (generation number support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
2009-11-12 01:10:52 -08:00
Sachidananda
c1bf268b28 Add unhashed-sticky-bit option to volume_options structure
Signed-off-by: Sachidananda <sac@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 365 (unhashed-sticky-bit is not recognized)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=365
2009-11-12 01:10:52 -08:00
Pavan Sondur
ef078a3359 Add glusterfs-volgen to master, change fusermount options and other changes to rpm spec file.
The patch has the following changes:
* Rename glusterfs-volgen.py and include it in the rpm spec file
* Enable fusermount by default. Change fusermount configure option from disable to enable.
* Remove BDB from configure.ac, essentially removing it from the normal build.
* Remove all dependencies on fuse in the rpm spec file.

Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 343 (Placeholder bug for adding volgen into rpm, bdb makefile changes, etc)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=343
2009-11-11 23:18:19 -08:00
vinayak hegde
e98020d5f6 performance/stat-prefetch: In lookup_cbk do not set error no to EINVAL, when inode_ctx_get returns -1.
Signed-off-by: vinayak <vinayak@laptop.(none)>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 360 (All fop fails when stat-prefetch is loaded on afr.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=360
2009-11-05 02:53:44 -08:00
vinayak hegde
f98e7524b4 cluster/afr: In fop structure afr_readdirp is not correctly registered.
Signed-off-by: Vinayak Hegde <vinayak@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 360 (All fop fails when stat-prefetch is loaded on afr.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=360
2009-11-05 00:42:08 -08:00
vinayak hegde
add4dd9623 performance/stat-prefetch: In sp_readdir_cbk op_ret value is not handled.
Signed-off-by: Vinayak Hegde <vinayak@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 360 (All fop fails when stat-prefetch is loaded on afr.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=360
2009-11-05 00:42:05 -08:00
vinayak hegde
e151ab3ed4 libglusterfs/src/gf-dirent.c: In gf_dirent_nb structure d_name should be char array of size 1.
Signed-off-by: Vinayak Hegde <vinayak@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 360 (All fop fails when stat-prefetch is loaded on afr.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=360
2009-11-05 00:42:01 -08:00
Pavan Sondur
47da643a0e Do not abort make install if a chown on the fuser-mount script does not succeed.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 343 (Placeholder bug for adding volgen into rpm, bdb makefile changes, etc)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=343
2009-11-03 23:54:06 -08:00
Pavan Sondur
7bd570a007 Remove fuse_lowlevel.h from xlator.h in libglusterfs.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 343 (Placeholder bug for adding volgen into rpm, bdb makefile changes, etc)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=343
2009-11-03 23:01:22 -08:00
Shehjar Tikoo
612aed4b6a libglusterfsclient: Dont alloc root inode context
....because the lookup on root inode done a few lines before this
call already allocates an inode context. This one just over-writes
that context, results in invalidation of the cached iattrs.

Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 354 (Stale file handle on unfs3 booster)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=354
2009-11-03 22:21:47 -08:00
Shehjar Tikoo
f04b9fcfeb libglusterfsclient: Prevent root inode number clobbering
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 354 (Stale file handle on unfs3 booster)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=354
2009-11-03 22:21:43 -08:00
Vikas Gorur
51d105d63f cluster/afr: Bail out of the self-heal driver loops as soon as possible
Don't wait for the next recursive call to sh_{full,diff}_loop_driver
to decide that we've reached the end of file, as the frame could
have been destroyed by that time (if subvolumes are posix).

Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 320 (Improve self-heal performance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
2009-11-03 08:16:54 -08:00
Pavan Sondur
cd7a02533d Remove unnecessary log message. It also accesses a freed lock after an 'unlock'.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 222 (Enhance Internal locks to support multilple domains and rewrite inodelks)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=222
2009-11-03 07:10:08 -08:00
Corentin Chary
2bda225433 transport/name.c: refine the address resolution logic when listen-host is not specified.
- when listen-host is not specified and there are are no interfaces having
    adresses belonging to the address-family specified, listen at 0.0.0.0/::0.

  - this patch is necessary since with AI_ADDRCONFIG, getaddrinfo fails if there
    are no active interfaces for the address family specified and when
    listen-host is specified we still want the functionality provided with
    usage of AI_ADDRCONFIG.
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 339 (glusterfsd fails to start when there are no active interfaces having address in the address family configured.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=339
2009-11-03 06:48:58 -08:00
Sachidananda
2a62b1748e Wrong variable is checked after stat call.
Signed-off-by: Sachidananda <sac@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 355 (Wrong variable checked after a stat call)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=355
2009-11-03 06:48:54 -08:00
vinayak hegde
c1aa647291 configure.ac: Before checking for libglusterfsclient BUILD_LIBGLUSTERFSCLIENT should be initialized to no.
Signed-off-by: Vinayak <vinayak@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 353 (./configure adds libglusterfsclient when it shouldn't)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=353
2009-11-03 06:48:50 -08:00
Vijay Bellur
7269a74512 storage/posix: Changed error message displayed for option background-unlink.
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 352 (Wrong message logged for option `background-unlink')
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=352
2009-11-02 03:30:21 -08:00
Vijay Bellur
f8a56c6322 features/locks: Do not try to set value in dict when lookup has failed.
lock-count was being set without checking for op_ret from lookup. This would
cause a lot of Critical messages in the log as dict would be NULL in case
of a lookup failure.

Also, removed some trailing white spaces and did some minor re-factoring.

Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
2009-11-01 22:23:22 -08:00
Vikas Gorur
b4b2098472 cluster/afr: Don't try to self-heal if there are locks held
If the inodelk_count or entrylk_count is positive on a
file/directory, don't try to do self-heal on it.

Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 326 ([2.0.8rc9] Spurious self-heal)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
2009-10-30 04:10:57 -07:00
Corentin Chary
2b610a095f volgen: remove trailing whitespace
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
2009-10-30 03:51:48 -07:00
Corentin Chary
ef79f934c3 volgen: Add conf-dir option
Add a conf-dir option to change the output directory for
generated files.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
2009-10-30 03:51:47 -07:00
Shehjar Tikoo
0e7875dbf8 core: Use parent for condition to create dentry not name
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 348 (touch on booster segfaults)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=348
2009-10-30 03:37:50 -07:00
Shehjar Tikoo
44f6b7a542 booster: Must check errno for error number not return value
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 346 (booster returns success on failed getxattr and lgetxattr)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=346
2009-10-30 03:37:47 -07:00
Shehjar Tikoo
10cddf14e9 core: Check for NULL to avoid segfault
A segfault as a result of this was observed during tests.

Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 348 (touch on booster segfaults)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=348
2009-10-30 03:37:43 -07:00
Shehjar Tikoo
e6fc0cbe71 booster, libglusterfsclient: Support samba specific relative paths
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 158 (libglusterfsclient: Applications are restricted to using absolute paths)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=158
2009-10-30 03:37:39 -07:00
Anand Avati
5d9a4d81b3 iobuf: initialize size without 4KB padding
since new fuse bridge takes care of landing write buffers to aligned iobufs
and the 4KB header padding is no more necessary

Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 315 (generation number support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
2009-10-30 03:37:35 -07:00
Anand Avati
bee7b8877d glusterfsd: whitespace cleanup
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 315 (generation number support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
2009-10-30 03:37:31 -07:00
Raghavendra G
ef2d6b3449 libglusterfsclient: don't do inode_link on root inode.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 348 (touch on booster segfaults)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=348
2009-10-30 01:49:57 -07:00
Raghavendra G
8345b6448d performance/io-cache: change the data-types to be big enough to hold size of data flushed.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 335 (Io-cache optimization)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
2009-10-30 01:49:53 -07:00
Pavan Sondur
e16f05a6d1 Fix logic while granting blocked entrylks, which could run into an infinite loop.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 222 (Enhance Internal locks to support multilple domains and rewrite inodelks)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=222
2009-10-30 01:21:41 -07:00
Anand Avati
c68255daa1 call-stub: fix leak of fxattrop dictionary
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 315 (generation number support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
2009-10-29 21:47:43 -07:00
Anand Avati
382b4d03ab protocol/server: fix leak of xattrop dictionary
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 315 (generation number support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
2009-10-29 21:47:40 -07:00
Vikas Gorur
d72c47cb04 cluster/afr: Move deleted files to /.trash in entry self-heal.
If entry self-heal determines that a file/directory should
be deleted from a subvolume, move that entry to a directory
called "/.trash" on that subvolume. This is for two reasons:

1) It limits the damage that can be done by a "wrong" entry
   self-heal.

2) It solves the problem of a to-be-deleted directory not
   being empty.

Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 227 (replicate selfheal does not remove directory with contents in it)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=227
2009-10-29 10:17:19 -07:00
Raghavendra G
14962ce3e6 performance/io-cache: change the hash function used for rbtree based hash table.
- the earlier hash function does not distribute pages uniformly for offsets that
    fit into 32 bits. The reason is that the hash function just xors the contents of
    the key 4 bytes at a time with the current value of hash. Hence for keys that
    fit into 32 bits, the hash will be the key itself. Since we are using the
    rounded_offset (which is a multiple of 128KB) as the key, the key will
    be exactly divisible by the number of buckets configured (4096) resolving all
    the pages into the first bucket.

Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 335 (Io-cache optimization)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
2009-10-29 10:07:49 -07:00
Pavan Sondur
13e6947744 Remove unnecessary check of xattr_req in lookup.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
2009-10-29 10:07:46 -07:00
Vikas Gorur
c770322ca4 storage/posix: Serialize do_xattrop.
Hold a lock on the inode for the getxattr/add-array/setxattr
section since multiple threads can enter into it causing
wrong values to be written and triggering spurious replicate
self-heal later.

Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 326 ([2.0.8rc9] Spurious self-heal)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
2009-10-29 09:45:41 -07:00
Vikas Gorur
32c963cfea storage/posix: Refactor xattrop
Move common code into do_xattrop.

Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 326 ([2.0.8rc9] Spurious self-heal)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
2009-10-29 09:45:37 -07:00
Vikas Gorur
6e2dba2c41 protocol/server, mount/fuse: Handle returned inode in create properly
Check if linked_inode is different from returned inode in create,
and if so, make the fd point to the correct inode.

Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 347 (Assertion failed: inode->ref)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=347
2009-10-29 09:32:29 -07:00
Vijay Bellur
c555dcbb3a transport/socket:Enable NODELAY by default for lowlat client and server sockets
TCP_NODELAY is enabled by default for lowlat client and server sockets.

Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 344 (Add support for TCP NODELAY in master)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=344
2009-10-29 09:23:57 -07:00
Vijay Bellur
c0b5cc8868 protocol/client: Support for TCP_NODELAY
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 344 (Add support for TCP NODELAY in master)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=344
2009-10-29 09:23:53 -07:00
Vijay Bellur
0897c400c0 transport/socket: Support for TCP_NODELAY
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 344 (Add support for TCP NODELAY in master)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=344
2009-10-29 09:23:50 -07:00
Pavan Sondur
82c0df9941 Print inodelks in and out if option trace is on.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
2009-10-29 00:52:53 -07:00
Pavan Sondur
08327b6a6b Print entrylks in and out if option trace is on.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
2009-10-29 00:52:48 -07:00
Pavan Sondur
03c6fe7f7e Trace locks in and out with an option in normal log mode.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
2009-10-29 00:52:45 -07:00
Anand Avati
9a62a3747c posix: posix_[f]setattr() handle valid=0 case by performing {f, l}chown (-1, -1)
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 146 (Add setattr FOP)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
2009-10-28 23:42:13 -07:00
Pavan Sondur
b3b4fc4afb Implement lookup in locks to return lock count in a dict value.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
2009-10-28 23:00:43 -07:00
Raghavendra G
53ff4f0299 libglusterfs/rbtree: change rbthash_init_table to take no of expected entries in the hash table as argument.
- the expected number of entries is used to create the memory pool of the hash
    table. Having constant macro for this purpose is not suitable since different
    users of rbtree based hash table store different number of entries in the
    table.

Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 335 (Io-cache optimization)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
2009-10-28 23:00:39 -07:00
Raghavendra G
07e8d8a377 performance/io-cache: fix memory leak.
- page table of cache was not being destroyed in ioc_forget.

Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 335 (Io-cache optimization)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
2009-10-28 23:00:35 -07:00