summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
Commit message (Collapse)AuthorAgeFilesLines
* dht: initialize layout typeAnand Avati2010-01-233-5/+6
| | | | | | | | | | | Instead of relying on CALLOC's zero initialization which happens to be the value of DHT_HASH_TYPE_DM, explicitly set the value Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 523 (Hash type is not initialized in dht_layout_new) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=523
* 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
* 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
* 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
* 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
* 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>
* fixes in nufaAmar Tumballi2009-11-263-96/+92
| | | | | | | | | | | | | | | Now nufa uses dht_conf->private variable to store its contents, and doesn't pollute distribute's structures. It used to hang earlier as layout_lock was not INIT()'d. whitespace-cleanup done on the code too. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 409 (implement a switch scheduler) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=409
* switch translator addedAmar Tumballi2009-11-263-1/+1059
| | | | | | | | | | | switch translator is a wrapper around distribute to work for a pattern based scheduling. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 409 (implement a switch scheduler) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=409
* cluster/distribute: copy the stat structure while copying dentries in ↵Raghavendra G2009-11-191-0/+2
| | | | | | | | | | | | | readdirp_cbk. - only the transformed inode number was being copied, leaving other fields of stat 0. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 371 (rm -rf fails on stat-prefetch.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=371
* 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
* 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
* distribute - more NULL checkAnand V. Avati2009-10-161-3/+21
| | | | | | | 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
* distribute,nufa: layout handling changesAnand V. Avati2009-10-167-136/+209
| | | | | | | | | | changes to make revalidate not fail but instead perform fresh lookup and swap inode context (layout) safely 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
* fix double initialization of dht_local_tAnand V. Avati2009-10-161-7/+0
| | | | | | | | | | This was causing leak of the first initialized frame->local in every create call 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
* NULL checks on local->loc.parentAnand V. Avati2009-10-161-17/+36
| | | | | | | | | | | check for presence of local->loc.parent != NULL before defering to pick ino for post/preparent parameters. local->loc.parent can be NULL legally when loc is describing "/" 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
* shuffle hash layouts on directoriesAnand Avati2009-10-151-2/+44
| | | | | | | | | | | allow for hash layouts to be written differently for different directories to give a better spread for same filenames across directories Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 324 (distribute does not spread files of the same name among all servers) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=324
* cluster/dht: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-084-98/+107
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-0711-11/+11
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* distribute: Support readdirp fopShehjar Tikoo2009-10-062-5/+112
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* distribute: NFS-friendly logic changesShehjar Tikoo2009-10-014-101/+320
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-015-42/+185
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: Introduce setattr and fsetattr fopsShehjar Tikoo2009-10-014-303/+167
| | | | | | | 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
* Dumop inodectx addedVijay Bellur2009-09-161-0/+29
| | | | | | | | | | Added dumpop inodectx. Support for dumop inodectx added in dht, locks and client-protocol. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* cluster/dht: Support for dumpop priv.Vijay Bellur2009-09-161-0/+134
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* dht_stat_merge - use the highest uid when ambiguousAnand Avati2009-08-041-2/+3
| | | | | | | | | When directories on different subvolumes have different ownerships, use the highest uid/gid till self-heal resolves the inconsistency Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 191 (random Permission denied errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=191
* dht_readdir_cbk: use stat attributes in the READDIRPLUS dirents toAnand V. Avati2009-06-261-22/+21
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* rename dht_first_up_child to dht_first_up_subvolAnand V. Avati2009-06-262-2/+3
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* local->loc should be filled in dht-mknod()Amar Tumballi2009-06-181-0/+9
| | | | | | | local->loc should be properly filled while creating a linkfile. otherwise this causes the segfault in underlying volume layer (mostly client-protocol). Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* making dht and nufa's 'min-free-disk' option to take both percent and disk-sizeAmar Tumballi2009-06-184-38/+90
| | | | | | | | | | | Originally from Paul Rawson <plrca2@gmail.com> http://patches.gluster.com/patch/391/ : patch re-submitted with patching guidelines. cluster/distribute, and cluster/nufa uses new option PERCENT_OR_SIZET for its option 'min-free-disk'. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* change the log level of disk full message in dht-diskusageAmar Tumballi2009-06-181-3/+3
| | | | | | | | the current msg is getting printed in warning level. Instead changed it to debug, as the msg specific each node being full is already getting printed in higher priority, hence this msg looks excessive. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* bug fix in dht-diskusage when statvfs->f_blocks is 0Amar Tumballi2009-06-021-2/+3
| | | | | | | This can happen when 'option export-statfs-size off' is given in posix volume. Caused divide by 0 error. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* dht logging cleanupAnand V. Avati2009-04-283-10/+14
|
* log message cleanup in distributeAnand V. Avati2009-04-249-291/+242
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* "option unhashed-sticky-bit on/off"krishna2009-04-233-5/+25
| | | | | | | | "option unhashed-sticky-bit on/off" will configure distribute to set or not the S_ISVTX bit in the stat.st_mode of the actual file in case it is pointed to by the link file. This can be enabled during migration. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fixed parameter to finodelk in STACK_WIND in dhtVikas Gorur2009-04-171-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* cluster/distribute bug fix - try to create linkfile in ↵Basavanagowda Kanur2009-04-163-16/+68
| | | | | | | | 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>
* bug fixes in dht-disk-usage feature.Amar Tumballi2009-04-144-35/+72
| | | | | | fixes bugs seen with dht's disk usage. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* in dht, initialize the free available space properly, so the first few ↵Amar Tumballi2009-04-123-3/+52
| | | | | | creates are not confused. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update cluster/dht with new readv writev prototypesAnand V. Avati2009-04-121-5/+8
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* nufa to take care of free disk-space while creating files.Amar Tumballi2009-04-061-32/+74
| | | | | | nufa gets awareness about the available free-disk-space in subvolumes. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* distribute to take care of available disk space while creating new dirs, and ↵Amar Tumballi2009-04-035-26/+384
| | | | | | | | files. distribute gets awareness about disk-space while creating the files Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* cluster/{dht,nufa} propogate ESTALE (when at least one subvolume returns ↵Basavanagowda Kanur2009-04-021-1/+10
| | | | | | ESTALE for revalidate) to parent translator. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* cluster/{nufa,dht} fail revalidates with ESTALE, in case a stale layout is ↵Basavanagowda Kanur2009-04-022-4/+4
| | | | | | found in inode->ctx. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Enhancements to distribute selfhealAnand V. Avati2009-03-263-51/+117
| | | | | | | | | | - create missing directories instead of creating linkfiles when entry missing on hashed subvol - detect cases where there are dirs and linkfiles for a name and make them all dirs Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* dht memory leak fixRaghavendra G2009-03-241-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fixes issue of hashing to wrong subvolumes in case when a subvolume is downAmar Tumballi2009-03-211-2/+2
| | | | | | | When a hashed subvolume is down, variable 'subvol' was NULL, but was sent to itransform. This patch solves this, and readdir is sent to proper subvolume now. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* dht_layout_dir_cmp - if xattr is missing, it is an error only if cached ↵Anand V. Avati2009-03-191-11/+18
| | | | layout has entry for that subvolume.
* Add extra 'volume' parameter to inodelk/entrylk callsVikas Gorur2009-03-121-8/+8
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* dht_readdir_cbk - retry on same subvol if no entries match the hashAnand V. Avati2009-03-091-5/+15
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>