summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* cluster/afr: Pick a source for metadata self-heal even if all nodes are ↵Vikas Gorur2010-01-141-0/+28
| | | | | | | | | | | | | | | innocent. If metadata changelog has been disabled, all subvolumes will be innocent. In that case, simply pick the subvolume on which the file has the lowest uid as the source and sync other subvolumes to it. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 451 (metadata self-heal does not a pick a source if mode/times have been changed at the backend) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=451
* cluster/unify: don't call xl_init_tree on namespace node.Raghavendra G2010-01-141-11/+0
| | | | | | | | | | | | | | | | | | | | - just before xl_init_tree call on namespace, unify node is set as parent of namespace node and since xl->ready of unify node is set only after return from init call, calling xl_init_tree on namespace node will result in execution of init of unify node for the second time. This results in following bugs: * since during second execution, parent of namespace node is unify, init of unify xlator fails. * even if init did not fail, re-execution of init in itself is bad, since it results in memory leaks etc. Worse, it can result in infinite recursive calls into init of unify node. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 518 (unify does not start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=518
* features/locks: Fix broken interface grant_blocked_inode_locksPavan Sondur2010-01-142-22/+35
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 496 (deadlock in pl_inode_setlk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=496
* features/locks: Do not call grant blocked locks in pl_forgetPavan Sondur2010-01-141-44/+85
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 496 (deadlock in pl_inode_setlk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=496
* fuse: treat DESTROY message as proto requires, ie. don't leave it unansweredCsaba Henk2010-01-121-2/+4
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
* cluster/afr: Use dict_ref instead of dict_copy_with_ref.Vikas Gorur2010-01-081-2/+2
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 509 (Crash in afr_local_cleanup ()) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=509
* fuse: fix memleakCsaba Henk2010-01-061-0/+1
| | | | | | | | | | continuing the work of d281971e Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 438 (Memory leak) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=438
* storage/posix: Zero out the checksum array in rchecksum.Vikas Gorur2009-12-281-0/+2
| | | | | | | | | | | Set the checksum bytes to zero to ensure random junk is not returned as the checksum. 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: Allocate diff algorithm loop_state structures only once.Vikas Gorur2009-12-282-47/+167
| | | | | | | | | | | | Instead of CALLOC'ing a loop_state structure at the beginning of every loop, keep a table of allocated structures and reuse them. 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: Report number of blocks healed during diff self-heal.Vikas Gorur2009-12-282-1/+18
| | | | | | | | 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
* protocol/client: Fail revalidate with ESTALE.Vikas Gorur2009-12-281-0/+1
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@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
* properly ref/unref fd in stripe_opendir_cbkAmar Tumballi2009-12-221-0/+5
| | | | | | | | | | fixes the crash due to dereferencing NULL fd pointer Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 497 (Client crashes in fuse_fd_cbk while running ltp tests) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=497
* features/locks: Unwind if inode is NULL to prevent 'lost' frame.Pavan Sondur2009-12-211-6/+9
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@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
* fuse-bridge: Don't try to fill a loc in setattr when we can proceed on with ↵Csaba Henk2009-12-181-2/+9
| | | | | | | | | | | | an fd. This fixes broken ftruncate on unlinked files. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 472 (OpenOffice fails on GlusterFS $HOME due to fuse_loc_fill error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=472
* distribute: Dont dereference sbuf on failed readlink_cbkShehjar Tikoo2009-12-181-0/+4
| | | | | | | | | | | This fixes a crash that was caused due to a NULL pointer deref because a NULL sbuf is returned if the readlink fop fails. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 492 (distribute crashes in readlink) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=492
* Added null checks in "fini"Harshavardhana Ranganath2009-12-182-0/+6
| | | | | | | | Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 364 (Segfault in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=364
* cluster/dht: Check for pointers before de-referencing in dht_stat_merge()Vijay Bellur2009-12-161-0/+3
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 463 (Crash in dht_stat_merge ()) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=463
* more cleanup in stripe stat structuresAmar Tumballi2009-12-151-335/+83
| | | | | | | | | | Removed few more 'fops' from stripe. More cleaner stat structure return. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340
* fix typo in posixCsaba Henk2009-12-141-1/+1
| | | | Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* Changed occurrences of Z Research to GlusterVijay Bellur2009-12-071-1/+1
| | | | Signed-off-by: Vijay Bellur <vijay@gluster.com>
* resolver: include RESOLVE_EXACT type for failure case when inode not foundAnand Avati2009-12-071-1/+2
| | | | | | | | 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
* cluster/afr: Sync the parent directory's mtime during missing entries self-heal.Vikas Gorur2009-12-071-6/+26
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
* cluster/afr: Don't do entry self-heal in the background.Vikas Gorur2009-12-071-5/+0
| | | | | | | | 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
* cluster/afr: Hold inode lock on 0-infinity for a flush transaction.Vikas Gorur2009-12-071-1/+1
| | | | | | | | 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
* fix typo in 76d6f3fbeCsaba Henk2009-12-061-1/+1
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 336 (Use lock owner field from fuse in locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=336
* Save st_dev properly in stbuf.st_dev from the same subvolume.Harshavardhana Ranganath2009-12-061-1/+1
| | | | | | | | Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* Revert "performance/write-behind: Changed default value of option ↵Anand V. Avati2009-12-061-1/+1
| | | | | | | | | disable-till to 0" This reverts commit e6c35f74ff4a204cf016ebf201a2630b331f9434. This commit is found to trigger spurious self heal by causing flush and writev to get reordered. Reverting as a workaround.
* fuse-bridge: set lk_owner to -1 for release forged flush.Csaba Henk2009-12-061-0/+1
| | | | | | | | | | Server would interpret 0 as a sign of us getting disconnected. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 336 (Use lock owner field from fuse in locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=336
* fuse-bridge: make use of lock owner data in a protocol adherent way.Csaba Henk2009-12-061-22/+29
| | | | | | | | | | | | | | | | | No need for pid fallback, for those cases where we use it, it's always available. It appears conditionally in read/write/truncate (related to mandatory locking). There just get it for demonstrative purposes. Discard it from release, there locking data exists only as a portability hack, no use of it on Linux. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 336 (Use lock owner field from fuse in locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=336
* resolver: handle resolutions of pathsAnand Avati2009-12-061-2/+66
| | | | | | | | | | | | | | | | support a new type of resolution where only the path is sent from the client over the wire without inode/parent/generation numbers. this can happen when cluster translators could not look up inodes on a server and later when the server comes up applications issues operations on the inode without a lookup (since they could be cd'ed inside). In these cases the server makes the best attempt to resolve the path and perform the fop on it 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
* Revert "protocol/client: return ENOENT if inode context is missing"Anand V. Avati2009-12-061-49/+21
| | | | | | | | This reverts commit 4439876a34f2e5d19db0d8b05ce7d7722c1c466f. This revert is necessary for path handle resolution to work over the protocol where client/server talk only with the path, without inode or parent inode and generation numbers
* features/locks: Implement release xlator callback.Pavan Sondur2009-12-064-10/+48
| | | | | | | | | | | | This patch solves the lock bailout problem seen recently when autoconf tools were run. This is a workaround, where 'flock' locks are removed in pl_release, if an explicit UNLCK call does not come. The complete fix would be to allow 'fcntl' and 'flock' locks to operate in different domains. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 449 (Handle flock calls in a different domain from fcntl calls) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=449
* distribute: more cases of st_dev settingAnand Avati2009-12-061-1/+4
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* distribute: return st_dev from the same subvol from where itransform is ↵Anand Avati2009-12-062-0/+5
| | | | | | | | | | | | | | performed distribute should return st_dev from the same subvolume it itransforms the inode number. this is to ensure that there will not be false replacements of inodes in inode management Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* fuse-bridge: log cases where newer generation is found in tableAnand Avati2009-12-061-1/+12
| | | | | | | | | | | This is usually the case when there is a bug a cluster xlator and returns generation number from the wrong subvolume Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 433 (Posix conformance test failed on 3.0.0pre2 (Dec 3) release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=433
* features/locks: Disable mandatory locks, until we can use lock-owner field ↵Pavan Sondur2009-12-061-9/+3
| | | | | | | | | | without problems in mandatory locking. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 336 (Use lock owner field from fuse in locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=336
* features/locks: Correct the order of arguments and print a log message in ↵Pavan Sondur2009-12-061-2/+12
| | | | | | | | | | pl_flush. 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
* protocol/server: more fixes in server_link_cbkAnand Avati2009-12-061-4/+4
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 448 (server_link_cbk refers to @inode when op_ret is -1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=448
* THIS: set THIS pointers before forget/release/releasedir callbacksAnand Avati2009-12-061-1/+1
| | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* afr: fix fd ref leak in self-healAnand Avati2009-12-061-1/+3
| | | | | | | | | | sh->healing_fd should be ref'ed only when healing_fd_opened is not set 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/stat-prefetch: remove the usage of THIS.Raghavendra G2009-12-062-1/+3
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
* performance/stat-prefetch: fix memory leak.Raghavendra G2009-12-061-1/+4
| | | | | | | | | | | - rbt_hash_remove only removes entry from the hash table. It does not free the data. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 438 (Memory leak) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=438
* protocol/server: fix bad reference to @inode in server_link_cbkAnand Avati2009-12-061-1/+1
| | | | | | | | | | | when op_ret is -1, gf_log refers to @inode which can be NULL. fix this to refer to state->loc2.inode instead Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 448 (server_link_cbk refers to @inode when op_ret is -1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=448
* corrected the stripe's stat structure return logic.Amar Tumballi2009-12-062-354/+260
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340
* performance/stat-prefetch: don't check whether previous lookups have been ↵Raghavendra G2009-12-051-9/+0
| | | | | | | | | | | | | | | | | | | | failed in sp_process_inode_ctx. We need this patch for following reasons: 1. The inode used in the successful lookup call may not be the one passed to fops operating on path. This may happen, if revalidate of inode is failed, but the lookup itself succeeds (in case of reavalidate failures, fuse sends a fresh lookup using new inode) and since inode_link, if there is an inode already associated with a path retains it. 2. Only fops that "wait" in stat-prefetch for a lookup which is already in progress, need to check for the result of the lookup they are waiting on, before resuming and sp_process_inode_ctx is _not_ used in such contexts. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 428 (looks like stat cache not upto date..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=428
* fuse: fix leak in fuse_getxattr and fuse_getattrAnand Avati2009-12-051-0/+2
| | | | | | | | | | | | | In fuse_getxattr, @finh was leaked in the case of posix ACL getxattr request In fuse_getattr, @state was leaked when fuse_loc_fill() failed Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 438 (Memory leak) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=438
* cluster/afr: Fix inode_ref's for local->cont.lookup.inodeVikas Gorur2009-12-051-4/+8
| | | | | | | | 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
* fix crash in server protocol server-connection-destroyAmar Tumballi2009-12-051-6/+8
| | | | | | | | | | | a variable allocated inside a condition was getting reffered outside the block. If the condition fails, there used to be a crash. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 439 (crash in server protocol, while destroying connection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=439
* posix_rchecksum() - fix leak of read bufferAnand Avati2009-12-041-0/+2
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.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
* protocol/client: return ENOENT if inode context is missingAnand Avati2009-12-041-21/+49
| | | | | | | | 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