summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade FUSE protocol to rev. 7.13Csaba Henk2009-11-161-3/+9
| | | | | | | | | | | | | 2.6.32 will feature FUSE proto 7.13 which lets us tune the maximal number of in-kernel backgrounded requests via INIT. Hereby we live up to this enhancement. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 385 (Upgrade FUSE protocol to rev. 7.13) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=385
* fixing a crash in posix (on 32bit)Amar Tumballi2009-11-161-1/+3
| | | | | | | | | | | | fd_ctx_get () was getting passed with type punned argument, now corrected by passing the right argument, and doing the typecasting later Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 383 (glusterfs server crash on 2.0.8) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=383
* fixes in stripeAmar Tumballi2009-11-161-2/+3
| | | | | | | | | | | | | * fix in stripe readv, so that a read request which falls in two (or more) subvolumes, depending on stripe-size works fine. * fix in stripe_setattr_cbk, where 'postop' stat structure was returning wrong 'st_size'. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 368 (setattr on a non-regular file makes glusterfs crash) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=368
* mount/fuse: Assign the right inode to fuse_entry_out in fuse_create_cbk().Vijay Bellur2009-11-161-2/+2
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 380 ([3.0.0 pre1] Crash in fuse_create_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=380
* protocol/client: preserve open/create flags in fdctx for reopeningAnand Avati2009-11-132-0/+8
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* performance/quick-read: set return value to zero after successful init.Raghavendra G2009-11-131-0/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 374 (quick read fails to initialize if no options are given) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=374
* mount/fuse: Prevent a hang on the mount point if no server is up when the ↵Pavan Sondur2009-11-131-4/+49
| | | | | | | | | | client is started. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 373 (Spawn fuse thread after a parent_up and wait and block until child_up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=373
* cluster/afr: Fix self-heal loop driver termination logic.Vikas Gorur2009-11-131-7/+19
| | | | | | | | 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
* cluster/afr: Ensure directory contents are in sync during opendir.Vikas Gorur2009-11-135-10/+281
| | | | | | | | | | | | | | | | | | | | | | The problem: If some files on the first subvolume disappeared without leaving a trace in the entry changelog (this can happen, for example, when an fsck has deleted files or when a hard drive is replaced), those files would never be self-healed even though they would be present on the second subvolume. This is because readdir is sent only to the first subvolume, and since the files don't appear in the directory listing, no lookup would ever be sent on them. This patch fixes this problem by doing a readdir on all the subvolumes during the first opendir on a directory inode. If a discrepancy in the contents is detected, entry self-heal in a special "force merge" mode is triggered on that directory. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/afr: Refactored inode context bitmasks.Vikas Gorur2009-11-131-6/+10
| | | | | | | | | | | Defined symbolic constants for the bit masks and made 'split-brain' a single bit field in the ctx. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* mount/fuse: Do readdirp in fuse_readdir.Vikas Gorur2009-11-131-2/+2
| | | | | | | | | | | Do the readdirp FOP in fuse_readdir. This is needed because dht_readdir is not "reliable", whereas dht_readdirp is. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* cluster/dht: Do readdir in dht_readdir instead of readdirpVikas Gorur2009-11-131-1/+1
| | | | | | | | | | | | The readdir call will not be used by applications (fuse will only ever send readdirp), but it will be used by afr to do directory self-heal at the time of opendir. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
* fix a crash in debug/traceAmar Tumballi2009-11-131-4/+4
| | | | | | | | | | | stat structure (which is an argument to function) was getting freed instead of string which actually should have freed. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 378 (trace segfault in trace_create_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=378
* protoocl/client: file directory reopen supportAnand Avati2009-11-132-117/+631
| | | | | | | | | | | | reopen files and directories which were open before a disconnection after reconnecting. operations on files/directories which could not be opened continue to return EBADFD Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* protocol/client: whitespace cleanupAnand Avati2009-11-132-3631/+3631
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* cluster/stripe: Initialize frame->local before checking for directory or ↵vinayak hegde2009-11-131-18/+22
| | | | | | | | | | regular files. Signed-off-by: Vinayak Hegde <vinayak@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 368 (setattr on a non-regular file makes glusterfs crash) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=368
* cluster/stripe: Set local->inode value before referring it.vinayak hegde2009-11-121-1/+7
| | | | | | | | 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
* cluster/stripe: local was not being set in stripe_mknod_ifreg_setxattr_cbk()Vijay Bellur2009-11-121-0/+2
| | | | | | | | 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
* Add unhashed-sticky-bit option to volume_options structureSachidananda2009-11-121-0/+3
| | | | | | | | 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
* Add glusterfs-volgen to master, change fusermount options and other changes ↵Pavan Sondur2009-11-111-1/+1
| | | | | | | | | | | | | | | | 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
* performance/stat-prefetch: In lookup_cbk do not set error no to EINVAL, when ↵vinayak hegde2009-11-051-3/+0
| | | | | | | | | | 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
* cluster/afr: In fop structure afr_readdirp is not correctly registered.vinayak hegde2009-11-051-1/+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
* performance/stat-prefetch: In sp_readdir_cbk op_ret value is not handled.vinayak hegde2009-11-051-0/+4
| | | | | | | | 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
* Remove fuse_lowlevel.h from xlator.h in libglusterfs.Pavan Sondur2009-11-031-2/+2
| | | | | | | | 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
* cluster/afr: Bail out of the self-heal driver loops as soon as possibleVikas Gorur2009-11-031-4/+4
| | | | | | | | | | | | 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
* Remove unnecessary log message. It also accesses a freed lock after an 'unlock'.Pavan Sondur2009-11-031-6/+0
| | | | | | | | 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
* Wrong variable is checked after stat call.Sachidananda2009-11-031-2/+2
| | | | | | | | 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
* storage/posix: Changed error message displayed for option background-unlink.Vijay Bellur2009-11-021-1/+1
| | | | | | | | 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
* features/locks: Do not try to set value in dict when lookup has failed.v3.0.0pre1Vijay Bellur2009-11-011-35/+42
| | | | | | | | | | | | | | 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
* cluster/afr: Don't try to self-heal if there are locks heldVikas Gorur2009-10-302-1/+18
| | | | | | | | | | | 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
* performance/io-cache: change the data-types to be big enough to hold size of ↵Raghavendra G2009-10-302-5/+5
| | | | | | | | | 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
* Fix logic while granting blocked entrylks, which could run into an infinite ↵Pavan Sondur2009-10-301-5/+6
| | | | | | | | | | 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
* protocol/server: fix leak of xattrop dictionaryAnand Avati2009-10-291-1/+3
| | | | | | | 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
* cluster/afr: Move deleted files to /.trash in entry self-heal.Vikas Gorur2009-10-294-33/+226
| | | | | | | | | | | | | | | | | 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
* performance/io-cache: change the hash function used for rbtree based hash table.Raghavendra G2009-10-292-12/+16
| | | | | | | | | | | | | | | - 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
* Remove unnecessary check of xattr_req in lookup.Pavan Sondur2009-10-291-1/+0
| | | | | | | | 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
* storage/posix: Serialize do_xattrop.Vikas Gorur2009-10-291-45/+58
| | | | | | | | | | | | | 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
* storage/posix: Refactor xattropVikas Gorur2009-10-291-122/+64
| | | | | | | | | | 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
* protocol/server, mount/fuse: Handle returned inode in create properlyVikas Gorur2009-10-292-6/+32
| | | | | | | | | | | 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
* protocol/client: Support for TCP_NODELAYVijay Bellur2009-10-291-0/+4
| | | | | | | | 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
* Print inodelks in and out if option trace is on.Pavan Sondur2009-10-294-18/+96
| | | | | | | 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
* Print entrylks in and out if option trace is on.Pavan Sondur2009-10-291-4/+136
| | | | | | | 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
* Trace locks in and out with an option in normal log mode.Pavan Sondur2009-10-294-2/+281
| | | | | | | 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
* posix: posix_[f]setattr() handle valid=0 case by performing {f, l}chown (-1, -1)Anand Avati2009-10-281-0/+24
| | | | | | | 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
* Implement lookup in locks to return lock count in a dict value.Pavan Sondur2009-10-285-0/+320
| | | | | | | 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
* libglusterfs/rbtree: change rbthash_init_table to take no of expected ↵Raghavendra G2009-10-282-6/+14
| | | | | | | | | | | | | | 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
* performance/io-cache: fix memory leak.Raghavendra G2009-10-281-0/+1
| | | | | | | | | - 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
* performance/io-cache: fix double free.Raghavendra G2009-10-281-1/+1
| | | | | | | | | | | - the destroyer function passed to rbthash_table_init is used to free the data. The data being inserted is page and it is destroyed in ioc_page_destroy. Hence no destroyer function needs to be passed to rbthash_table_init. 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
* fuse: use postbuf in truncate_cbk for attributes to returnAnand Avati2009-10-281-4/+4
| | | | | | | | | | this causes a problem where inodes even after truncate show old file size for a short time (till attributes are expired in fuse kernel module) 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
* mount/fuse: Derive fd from the file handle for setattrVikas Gorur2009-10-281-1/+3
| | | | | | | 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