summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
Commit message (Collapse)AuthorAgeFilesLines
* pump: mark pending before notify to children to avoid race in single CPU.Krishnan P2011-06-221-2/+2
| | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3050 ('replace-brick' hangs on vm's) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3050
* afr: bg self-heal must be off if self-heal-count=0.Krishnan P2011-06-221-3/+3
| | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3036 (self-heal problem in replace-brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3036
* loc_t: add 'gfid' and 'pargfid' fieldsAmar Tumballi2011-06-145-1/+30
| | | | | | | | | | | | | | these fields are used mainly in case of selfheal path, where 'inode->gfid'||'parent->gfid' is not yet set. These fields in 'loc' will have lower precedence than 'inode->gfid' in client protocol. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* pump: cleanup potential dict related memory corruption.v3.1.5qa2Krishnan Parthasarathi2011-06-104-39/+101
| | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2489 (GlusterFS crashing with replace-brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2489
* cluster/afr: propagate proper errno returned by lock fopsAnand Avati2011-06-101-4/+0
| | | | | | | | | | If locks could not be held on any of the servers, then propagate the errno returned by the lock FOPs instead of hardcoding EAGAIN/EINVAL. Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2993 ([glusterfs-3.2.0qa2]: hang while doing the selfheal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2993
* DHT selheal dir: Recreate dirs with correct gfid.shishir gowda2011-06-091-3/+1
| | | | | | | | | | | When selfheal of dir is triggered, make sure the dirs are recreated with the correct gfid, to prevent mismatch of gfids in the backend. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2994 ([glusterfs-3.2.1qa2]: untar and rm in parallel hangs untar) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2994
* cluster/afr: Give proper device id for mknodPranith Kumar K2011-06-091-1/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2840 (files not getting self-healed when the first child goes down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2840
* cluster/afr: lookup should set the read-child based on pending xattrsPranith Kumar K2011-06-093-34/+100
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2840 (files not getting self-healed when the first child goes down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2840
* cluster/afr: Read-dir should wind to the read-child firstPranith Kumar K2011-06-091-44/+53
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2840 (files not getting self-healed when the first child goes down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2840
* cluster/afr: Log errors in afr self-heal with GF_LOG_ERRORPranith Kumar K2011-06-096-43/+57
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2986 (Failed operations should should be logged `E' or `W') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2986
* cluster/dht: use GFID returned from hashed subvolumeAnand Avati2011-06-091-0/+5
| | | | | | | | | | | | | .. to perform lookups on remaining subvolumes. This way, if there is a race between two clients to 'fix' GFIDs with gfid-req, then the hashed subvolume will arbitrate and return the winner in stbuf->ia_gfid. This patch uses the returned gfid as the new gfid-req thereby preventing mismatching GFIDs on other servers due to further races. Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
* cluster/afr: declare favorite_child as int instead of unsigned intRaghavendra Bhat2011-05-312-2/+2
| | | | | | | | | | | | | | In afr_private_t structure favorite child is declared as unsigned int. In init function of afr we set favorite child to -1, if that option is not found in volfile. But favorite child value will be set to a huge value instead of -1 since it is an unsigned int and in statedump file favorite child value is displayed as a huge value instead of -1. Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2668 ([glusterfs-3.2.9qa7]: createbench error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2668
* cluster/distribute: corrected layout mismatch handling logicAmar Tumballi2011-05-312-147/+17
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2281 (I/O operations exit when add-brick is done) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2281
* send the proper device id to posix while self healing device special file entryRaghavendra Bhat2011-05-311-9/+14
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2567 (self heal on device files changes the major and minor number) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2567
* DHT-rename: Unlink older link files before creating new one.shishir gowda2011-05-313-1/+147
| | | | | | | | | | | If older link file exists, unlink it and then create linkfiles. This will prevent mismatch of gfid Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2464 ([7b07d444a77526f27f860210930bf1d4c7fbea9b]: rm -rf gives Invalid argumenrt error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2464
* cluster/dht: detect linkfiles mismatching gfid and delete+recreateAnand Avati2011-05-311-73/+109
| | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
* pump: init last_event array to be used in afr_notifyPranith Kumar K2011-05-311-0/+7
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2870 (Inconsistent xattr values when creating bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2870
* cluster/afr: Send Non-blocking lock in non-blocking entrylkPranith Kumar K2011-05-311-1/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2949 (self-heal hangs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2949
* pump: Detect 'empty' brick and finish migration.Krishnan Parthasarathi2011-05-311-0/+8
| | | | | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> BUG: 2909 (replace brick of empty brick never says migration completed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2909 Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2909 (replace brick of empty brick never says migration completed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2909
* cluster/dht: notify should succeed when waiting for all subvols first eventPranith Kumar K2011-05-311-1/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2870 (Inconsistent xattr values when creating bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2870
* cluster/afr: Send the first child up/down after all its children notifyPranith Kumar K2011-05-313-55/+113
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2870 (Inconsistent xattr values when creating bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2870
* cluster/afr: Avoid null dereferencePranith Kumar K2011-04-141-0/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2750 ([glusterfs-3.2.0qa11]: nfs server crashed in afr_sh_entry_expunge_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2750
* cluster/afr: skip openfd flush when the file is already deletedPranith K2011-04-112-6/+19
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2497 (client crashes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2497
* afr-entry-self-heal: fixes to detected renames (gfid based)Anand Avati2011-04-112-15/+39
| | | | | | | | | | | | | - perform expunge first (before impunge) to be able to delete renamed away files - perform readdirp instead of readdir to get gfid along with entry names - if gfid mismatch is found, expunge the entry Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2500 (Self Healing not working) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2500
* DHT: Propogate error if dht_rmdir_opendir_cbkshishir gowda2011-04-111-0/+2
| | | | | | | | | | | | | Earlier rmdir would succeed on all up subvols, but fuse would get an error if one of the subvol was down. In follow up lookup, self heal would be triggered, and since st_mode would be 0, the permissions would be bad. The behaviour now is to fail rmdir if subvol is down Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2591 (Directories changing to d--------- permission after trying to delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2591
* DHT: send revalidate to all subvols and not just first subvolshishir gowda2011-04-081-6/+10
| | | | | | | | | | | Reverting commit 23d9783a192669b638d42b8dd127ad69ea36f950. When first subvolume is down, mount point becomes inaccessible. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2532 ([glusterfs-3.1.3qa8]: bringing first subvolume down makes mount point inaccessible) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2532
* cluster/dht: send inode number from 'inode->ino' in dir_lookup_cbkAmar Tumballi2011-04-061-5/+6
| | | | | | | | | | | that way, even when there is a conf->gen number change, inode number is preserved. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2584 (Inode number changes on a directory when one of subvolumes is down in replicate) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2584
* cluster/afr: Re-factoring code for alignmentVijay Bellur2011-02-281-62/+62
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* cluster/afr: Whitespace cleanupVijay Bellur2011-02-282-124/+126
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* dht: log filename on failed reavalidateAnand Avati2011-02-251-2/+3
| | | | | | | | | | The previous log message is pretty much useless without the path Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* dht: do not send revalidates to all subvolsAnand Avati2011-02-221-10/+6
| | | | | | | | Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2450 (scalability enhancements) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2450
* core: have framework for GF_EVENT_CHILD_MODIFIED notifcation eventAnand Avati2011-02-222-1/+12
| | | | | | | | | | | | | If anything changes anywhere in the graph, all xlators know that something has changed. Previously dht and afr would mask certain events from propagating up. Now they forward GF_EVENT_CHILD_MODIFIED event in those situations Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2450 (scalability enhancements) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2450
* Solaris build fixesshishir gowda2011-02-223-3/+3
| | | | | | | | | | | | | | Disable geosync build for non-linux platforms. And fix solaris related build failures.The symbol getxattr was not available on solaris. The build on linux passed as getxattr symbol was available in the library. The argument was not being used, hence removed it. Make 64 bit build default in CFLAGS option by passing -m64 option Signed-off-by: Shishir Gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2440 (Fix solaris build issues seen on latest git) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2440
* replicate: set read-child to the subvolume which replied first (fastest)Anand Avati2011-02-221-20/+0
| | | | | | | | | | | | In the old logic read-child was set to the last subvolume which replied. Now it is updated to the first subvolume. This way we can ensure that local servers are preferred for reads _most_ of the times. Signed-off-by: Anand Avati <avati@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1172 (ls -lh on NFS mount of 2-mirror replicate gives incorrect file size) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1172
* cluster/dht : implement a fsetxattr() commandAmar Tumballi2011-02-182-0/+45
| | | | | | | | | | Thanks to Jeff Darcy <jdarcy(at)redhat.com> for the patch Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2319 (DHT uses wrong subvolume for fsetxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2319
* cluster/afr: stop spawning self-heal loops when the self-heal failsPranith K2011-02-171-12/+24
| | | | | | | | | | | | | With the current model of self-heal, any loop wont resume if a self-heal failure happens. I have added the fix to stop spawning the initial loops on self-heal failure. Fixed the invalid read shown in valgrind in diff-self-heal. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1174 (Replicate spawns read loops even after destination fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1174
* cluster/dht: Send removexattr() to all subvolumes.Vikas Gorur2011-02-141-4/+52
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2426 (removexattr is not sent to all subvolumes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2426
* cluster/dht: Perform self-heal as rootPranith K2011-02-083-35/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2370 (cluster/afr: Perform self-heal as root) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2370
* cluster/afr: Perform self-heal as rootPranith K2011-02-082-1/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2370 (cluster/afr: Perform self-heal as root) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2370
* cluster/dht: restore attrs of dirs in self-healPranith K2011-02-071-3/+63
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2371 (dht: Set owners of directories after performing self-heal as root) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2371
* Revert "distribute: Return ESTALE when dir selfheal finds no fix"Anand V. Avati2011-02-041-6/+2
| | | | This reverts commit a4c948aca6058049523e31acf33ce5770f8693ad.
* cluster/afr: fix races in self-healPranith K2011-02-041-119/+125
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1188 (3.0.5 client crash - afr_set_split_brain) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1188
* adding libxlator, to ensure proper client side aggregation of marks by ↵Kaushik BV2011-01-279-19/+278
| | | | | | | | | | | clustering translators Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2310 (georeplication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2310
* cluster/replicate: update st_nlink count of stat sent to application after ↵Raghavendra G2011-01-071-3/+18
| | | | | | | | | | | | | | completion of entry-self-heal. - certain applications like 'find' use st_nlink count to optimize searches. Hence an incorrect hard link count can result in non-healing of some of the newly created subdirectories. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2187 (Self heal errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2187
* afr_lookup_done: Propogate the same inode number as sent in first lookupshishir gowda2010-12-291-7/+7
| | | | | | | | | If only one subvolume was up, we used to unwind, without updating the ino Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2144 (errors removing directories when one subvolume is down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2144
* stripe: fix memory leakAnand Avati2010-12-292-5/+15
| | | | | | | | | | | destroy the frame copied and clean the local structure in stripe to avoid memory leak Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2253 (Memory leak in glusterfs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2253
* change the log level from warning to debug while getting pending matrixRaghavendra Bhat2010-12-271-1/+1
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1080 (clang errors in the file afr-self-heal-common.c) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1080
* Add volume key to select data-self-heal-algorithmHarshavardhana2010-12-271-11/+55
| | | | | | | | Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2218 (Replicate self-heal causes servers to go 100% cpu and unresponsive.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2218
* Make STRIPE_STACK_UNWIND and STRIPE_STACK_DESTROY default calls in stripeshishir gowda2010-12-271-74/+54
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2134 (inode leaks on stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2134
* Implement STRIPE_STACK_UNWIND and STRIPE_STACK_DESTROYshishir gowda2010-12-271-0/+18
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2134 (inode leaks on stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2134