summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
Commit message (Collapse)AuthorAgeFilesLines
* dht-rename: Unlink older link files before creating new oneshishir gowda2011-05-311-0/+8
| | | | | | | | | | | If a older link file exists, unlink it and then create the linkfile. This will prevent mis-match of gfid's. 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
* DHT: Add xlator-option assert_no_child_downshishir gowda2011-04-141-0/+1
| | | | | | | | | | If this is set, when CHILD_DOWN event is received, call exit Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
* cluster/dht: whitespace cleanupAmar Tumballi2011-03-171-111/+111
| | | | | | | | | | also fill tabs by spaces (untabify), and indent the code Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@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/dht: Perform self-heal as rootPranith K2011-02-081-2/+0
| | | | | | | | 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
* adding libxlator, to ensure proper client side aggregation of marks by ↵Kaushik BV2011-01-271-0/+5
| | | | | | | | | | | 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
* Fix DHT getxattr for directoriesshishir gowda2010-11-031-1/+0
| | | | | | | | | | | | When a heal on the directory or layout changes, the user xattrs do not get healed in dht. The current fix sends the getxattr call n all the subvolumes, aggregates it and sends the response Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1991 (distribute directory self-heal does not copy user extended attributes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1991
* dht: change behaviour CHILD_UP/DOWN/CONNECTING event propagationAnand Avati2010-10-111-0/+1
| | | | | | | | | | | The first CHILD_UP/DOWN/CONNECTING event to pass dht upwards should be only after all subvols have reported their status atleast once. Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1643 (Initial requests after mount ESTALE if DHT subvolumes connect after nfs startup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1643
* Revert "distribute: Propagate CHILD-UP when all subvols are up"Anand Avati2010-10-111-1/+0
| | | | | | | | | | This reverts commit 6b2e2fb0903fc56105c267881f202a4865a8b6c7. Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1643 (Initial requests after mount ESTALE if DHT subvolumes connect after nfs startup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1643
* Copyright changesVijay Bellur2010-10-111-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* Change GNU GPL to GNU AGPLPranith K2010-10-041-3/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1388 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1388
* distribute: don't update the inode's gfid directlyAmar Tumballi2010-09-231-0/+3
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1680 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1680
* distribute: Propagate CHILD-UP when all subvols are upShehjar Tikoo2010-09-221-0/+1
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1643 (Initial requests after mount ESTALE if DHT subvolumes connect after nfs startup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1643
* remove 'gen' from iatt/protocol structuresAmar Tumballi2010-09-141-1/+0
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* gfid: change in create() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-0/+1
| | | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* cluster/distribute: add option 'use-readdirp' to force readdirpAmar Tumballi2010-09-021-0/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1508 (add-brick works but files are not distributed to newly added server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1508
* dht enhancementsAmar Tumballi2010-07-271-0/+8
| | | | | | | | | | | | | | * create(filename@<distribute-volume-name>-<subvol-name>), will create the file in corresponding subvol of dht. * same for unlink() same logic can be extended to other fops if there is a need Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1200 (enhance distribute with hooks so lot of debugging can be done online) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1200
* proper way to do defrag of a mountpointAmar Tumballi2010-07-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: "glusterfs-defrag <MOUNTPOINT>" there are new features added to distribute with this patch: * bash# getfattr -n trusted.distribute.linkinfo <file> Gives output in the format "<hostname>:<directory>", if there is a linkfile present, where hostname is server, directory is backend directory where the actual linkfile is present. * bash# getfattr -n trusted.glusterfs.pathinfo <path> Gives layout information if directory, and info about actual location of file in backend servers, in the form of 'hostname:directory'. (TODO: should extend it to all xlators) * bash# getfattr -n trusted.distribute.fix.layout <path> scales out the directory layout in distribute, so when new servers are added, layouts are fixed to include them. * removed 'scale-n-defrag.sh' as its no more required. * changed 'defrag.sh' to have a feature to specify target bricks, so defrag happens to only those nodes. moved the file to 'glusterfs-defrag', which now gets installed to '${prefix}/bin' * storage/posix: takes new option 'hostname' so it can resolve to same hostname given during 'gluster volume create'. with 'trusted.glusterfs.pathinfo' posix returns the value in 'hostname:real_path' format. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1073 ('gluster defrag <VOLNAME>' fails in mainline) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1073
* NULL dereference fixes in code base after running with 'clang'Amar Tumballi2010-07-021-3/+5
| | | | | | | | | | | | * 212 logical (NULL deref/divide by zero) errors reduced to 28 (27 of them in contrib/ and lex part of codebase, 1 is invalid) * 11 API errors reduced to 0 Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* Memory accounting changesVijay Bellur2010-04-231-0/+2
| | | | | | | | | | | Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their contributions. Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
* iatt: changes across the codebaseAnand V. Avati2010-03-161-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - libglusterfs -- call-stub -- inode -- protocol - libglusterfsclient - cluster/replicate - cluster/{dht,nufa,switch} - cluster/unify - cluster/HA - cluster/map - cluster/stripe - debug/error-gen - debug/trace - debug/io-stats - encryption/rot-13 - features/filter - features/locks - features/path-converter - features/quota - features/trash - mount/fuse - performance/io-threads - performance/io-cache - performance/quick-read - performance/read-ahead - performance/stat-prefetch - performance/symlink-cache - performance/write-behind - protocol/client - protocol/server - storage-posix Signed-off-by: Anand V. Avati <avati@blackhole.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
* distribute: perform self-heal as rootShehjar Tikoo2010-03-041-0/+4
| | | | | | | | | | | prerserve original frame uid and gid and perform self-heal by changing uid/gid to root (0) temporarily. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
* distribute, nufa: return 0 mtimes in preparent/postparentShehjar Tikoo2010-03-041-0/+2
| | | | | | | | | | | | | | Returning 0 times means the values are unreliable and not to be trusted for the purposes of caching. This is a temporary fix till we bring in proper times handling in DHT to return consistant values for parent inodes. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
* distribute: Respect end-of-dir on readdir only for last subvolShehjar Tikoo2010-03-041-0/+1
| | | | | | | | | | | | | | | | We need to ensure that only the last subvolume's end-of-directory notification is respected so that directory reading does not stop before all subvolumes have been read. That could happen because the posix for each subvolume sends a ENOENT on end-of-directory but in distribute we're not concerned only with a posix's view of the directory but the aggregated namespace' view of the directory, which is maintained by distribute. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
* dht: unlink stale linkfiles in rmdir to prevent ENOTEMPTYAnand Avati2010-02-221-2/+5
| | | | | | | | | | | | Thanks to He Xaobing <allreol@gmail.com>, this patch is inspired by http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=188#c2 Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 188 ([ glusterfs 2.0.6rc2 ] - "Directory not empty" on rm -rf) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=188
* dht: Remove pointer casting in layout handlingAnand Avati2010-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Small changes by Anand Avati <avati@gluster.com> over original submission: Remove pointer casting (copy data to proper memory before using it). Fixes bug #493. Hello, See bug #493 for more information on this patch. http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=493#c2 This patch assumes that the scope of disk_layout is local wherever it is used. Seems correct, not really checked, though. Greetings, Hraban Luyat Signed-off-by: Hraban Luyat <hraban@0brg.net> Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 493 (tcp + dht + armv5tel: ???brick: disk layout has invalid count 29696???) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=493
* 'lookup-unhashed' option of distribute should be 'auto' by default.Amar Tumballi2010-02-061-0/+3
| | | | | | | | | | | | | | * Added 'auto' option, older boolean options works as they used to. * This option should make 'create' rate faster, also handles self-healing of linkfile properly in case of scaling to more servers or filesystem is getting full. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 584 (automatically configure 'lookup-unhashed' option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=584
* cluster/dht: Check for size 0 in check_is_linkfile()Vijay Bellur2010-01-291-1/+3
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 574 (Sticky bit files are not listed in the output of ls on a dht volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=574
* dht: initialize layout typeAnand Avati2010-01-231-0/+5
| | | | | | | | | | | 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: return st_dev from the same subvol from where itransform is ↵Anand Avati2009-12-061-0/+1
| | | | | | | | | | | | | | 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
* fixes in nufaAmar Tumballi2009-11-261-1/+0
| | | | | | | | | | | | | | | 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-261-0/+2
| | | | | | | | | | | 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
* distribute,nufa: layout handling changesAnand V. Avati2009-10-161-4/+13
| | | | | | | | | | 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
* cluster/dht: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-081-6/+6
| | | | | | | 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-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* distribute: NFS-friendly logic changesShehjar Tikoo2009-10-011-2/+7
| | | | | | | 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-011-0/+2
| | | | | | | 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
* rename dht_first_up_child to dht_first_up_subvolAnand V. Avati2009-06-261-0/+1
| | | | 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-181-1/+2
| | | | | | | | | | | 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>
* "option unhashed-sticky-bit on/off"krishna2009-04-231-0/+1
| | | | | | | | "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>
* cluster/distribute bug fix - try to create linkfile in ↵Basavanagowda Kanur2009-04-161-0/+2
| | | | | | | | 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>
* in dht, initialize the free available space properly, so the first few ↵Amar Tumballi2009-04-121-0/+1
| | | | | | creates are not confused. 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-031-0/+17
| | | | | | | | files. distribute gets awareness about disk-space while creating the files Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Enhancements to distribute selfhealAnand V. Avati2009-03-261-0/+4
| | | | | | | | | | - 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>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-261-1/+1
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Layout is sorted on volume names before forming the layout ranges. But when ↵krishna2009-02-261-0/+2
| | | | | | anomalies are to be detected layout is sorted based on "start" of the range (done in the selfheal during lookup). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* DHT clean up. Lot of selfheal code is not applicable to newly created ↵Krishna Srinivas2009-02-251-0/+3
| | | | | | | | | directory. Newly created directory will use only relavant part of DHT selfheal code - only for xattr application. DHT clean up. Lot of selfheal code is not applicable to newly created directory. Newly created directory will use only relavant part of DHT selfheal code - only for xattr application. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Added all filesVikas Gorur2009-02-181-0/+212