summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-write.c
Commit message (Collapse)AuthorAgeFilesLines
...
* cluster/afr: Handle error cases in local initPranith Kumar K2011-12-281-94/+69
| | | | | | | | | | | | - Fop should unwind with appropriate errno - Local is de-allocated on errors Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Change-Id: I4db40342ae184fe1cc29e51072e8fea72ef2cb15 BUG: 770513 Reviewed-on: http://review.gluster.com/2539 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Add command-line support (but no doc) for enforce-quorum option.Jeff Darcy2011-11-281-8/+8
| | | | | | | | Change-Id: Ia52ddb551e24c27969f7f5fa0f94c1044789731f BUG: 3823 Reviewed-on: http://review.gluster.com/743 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Add quorum checks to avoid split-brain.Jeff Darcy2011-11-201-1/+16
| | | | | | | | Change-Id: I2f123ef93989862aa796903a45682981d5d7fc3c BUG: 3533 Reviewed-on: http://review.gluster.com/473 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: remove 'ino' variable from 'inode_t' structureAmar Tumballi2011-11-161-1/+0
| | | | | | | | Change-Id: I0f078d1753db65d2f2e0380d1b0450c114cf40dd BUG: 3518 Reviewed-on: http://review.gluster.com/522 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/afr: Remove unused 'ino' codePranith Kumar K2011-10-281-30/+0
| | | | | | | | Change-Id: I425e2d23e9e45f10ddeff2eacf918dd90f8baee7 BUG: 3744 Reviewed-on: http://review.gluster.com/639 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/afr: Make local->child_up immutablePranith Kumar K2011-09-211-40/+24
| | | | | | | | | | | | | | | | | | | | | | | Afr transaction performs lock, pre-op, op, post-op and unlock steps in that order. The child_up[] is overloaded with the information of where all the first two steps succeeded. This works perfectly fine for Transaction, but the locking/unlocking part of the code is re-used by data self-heal. In that each loop_frame does lock, rchecksum, read-from-source and write-to-sinks, unlock steps. Rchecksum fop assumes that the fop needs to happen on one source + all sinks and sets the call_count to that number. But if the lock step fails on any of the sinks it will mark the child_up of that child to 0, which will result in call_count mismatch and the frame will hang thinking that some more cbks need to come. When this happens loop_frame will never go to unlock step leading to hangs on that file. Change-Id: I3dd0449cc6193a980bacf637d935881f4b22210a BUG: 3597 Reviewed-on: http://review.gluster.com/474 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Eliminate many "var set but not used" warnings with newer gcc.Jeff Darcy2011-09-071-4/+0
| | | | | | | | | | | | | | | | This fixes ~200 such warnings, but leaves three categories untouched. (1) Rpcgen code. (2) Macros which set variables in the outer (calling function) scope. (3) Variables which are set via function calls which may have side effects. Change-Id: I6554555f78ed26134251504b038da7e94adacbcd BUG: 2550 Reviewed-on: http://review.gluster.com/371 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* cluster/afr: Perform self-heal without locking the whole filePranith Kumar K2011-08-201-17/+41
| | | | | | | | Change-Id: I206571c77f2d7b3c9f9d7bb82a936366fd99ce5c BUG: 3182 Reviewed-on: http://review.gluster.com/141 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: I2d10f2be44f518f496427f257988f1858e888084 BUG: 3348 Reviewed-on: http://review.gluster.com/200 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* LICENSE: s/GNU Affero General Public/GNU General Public/Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: I3914467611e573cccee0d22df93920cf1b2eb79f BUG: 3348 Reviewed-on: http://review.gluster.com/182 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* cluster/afr: Fix conflict files and gfid self-healPranith K2011-07-171-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2745 (failure to detect split brain) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2745
* cluster/afr: Add fresh children along with read-child to inode contextPranith K2011-07-171-71/+63
| | | | | | | | 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
* core: fill 'ia_ino' from 'ia_gfid' in 'storage/posix' to preserve same ino ↵Amar Tumballi2011-06-161-84/+0
| | | | | | | | | | | | | | | number take the least significant 64bit from gfid and assign it to 'ia_ino', hence for a given file (or directory), the 'ia_ino' number is always same, and we need not worry about the 'itransform' in 'cluster/*' translators. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3042 (inode number should be constant on storage) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3042
* loc_t: add 'gfid' and 'pargfid' fieldsAmar Tumballi2011-05-031-0/+3
| | | | | | | | | | | | | | 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
* cluster/afr: log enhancement - part 3Amar Tumballi2011-04-011-57/+2
| | | | | | | | 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/afr: white-space cleanup - part 2Amar Tumballi2011-03-311-1015/+1014
| | | | | | | | 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
* 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
* rmdir: introduce extra flags parameter in FOP prototypeAnand V. Avati2010-10-021-2/+3
| | | | | | | | 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
* Check for possible fd/ctx NULL in afrshishir gowda2010-09-241-2/+6
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1636 (Replicate crashed in afr_nonblocking_inodelk on deref of NULL fd_ctx) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1636
* remove 'gen' from iatt/protocol structuresAmar Tumballi2010-09-141-12/+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: changes in symlink() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-2/+5
| | | | | | | | | 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
* gfid: changes in mkdir() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-2/+5
| | | | | | | | | 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
* gfid: changes in mknod() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-2/+5
| | | | | | | | | 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
* gfid: change in create() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-2/+6
| | | | | | | | | 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/afr: Remove dead assignments.Sachidananda2010-08-241-22/+0
| | | | | | | | Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1087 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1087
* cluster/afr: rename should not consider ENOTEMPTY as failurePranith Kumar K2010-08-181-1/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1352 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1352
* Memory accounting changesVijay Bellur2010-04-231-4/+4
| | | | | | | | | | | 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
* fop namespace cleanup.Amar Tumballi2010-03-311-141/+0
| | | | | | | | | | | | removed 'lock_notify', 'lock_fnotify', 'setdents', 'getdents' from 'fop' list, and removed 'stats' from mop list, as they are no more used in the codebase, and had made code bulky/buggy. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 734 (keep only the working/usable code in build tree to focus more on development) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=734
* iatt: changes across the codebaseAnand V. Avati2010-03-161-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* replicate: Use link's parent ino for post/pre-parent not target dir'sShehjar Tikoo2010-03-041-1/+1
| | | | | | | | 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
* cluster/afr: Don't mark the fop as failed if rmdir returns ENOTEMPTY.Vikas Gorur2009-12-031-1/+1
| | | | | | | | | | | Marking the fop as failed in the ENOTEMPTY case led to spurious entry self-heals. 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: Preserve generation number along with inode in lookup and ↵Vikas Gorur2009-11-301-1/+13
| | | | | | | | | | | | | creation fops. This fixes fuse_create_cbk conflict warnings and random errors while running dbench (typically open handle failure with ENOENT). 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
* cluster/afr: Do self-heal on unopened fds.Vikas Gorur2009-11-251-0/+17
| | | | | | | | | | | | | | This patch completes the previous patch for self-heal of open fds in replicate. If an fd was never opened on a subvolume, we remember that and do the open after we've done self-heal on that fd. Signed-off-by: Vikas Gorur <vikas@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/afr: NFS-friendly logic changesVikas Gorur2009-10-271-13/+125
| | | | | | | 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
* cluster/afr: Attempt to set fd ctx in create only if the call has succeeded.Vikas Gorur2009-10-201-10/+9
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 325 (crash in afr_fd_ctx_set) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=325
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cluster/afr: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-071-24/+43
| | | | | | | 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
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-011-12/+21
| | | | | | | 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
* cluster/afr: dir-write: Fix inode number handling.Vikas Gorur2009-09-281-24/+40
| | | | | | | | | | | | | | | | | | | create, mkdir, symlink, mknod: Prefer to return itransform'd inode number from the first_up_child. If not, fall back on any other child that returned succcess. link, rename: Return the same inode number that was passed as part of loc_t. Also adds a new member to afr_local_t, local->first_up_child which is initialized at the start of the transaction. This fixes the race where a subvolume might go down during the transaction and thus have the first_up_child change. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 285 ("first up child" can change during a transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=285
* replicate: Return ino from first subvolume on inode creation fopsShehjar Tikoo2009-07-301-9/+28
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 177 (replicate: On file/dir creation, replicate returns inode from random subvolumes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=177
* Return stat from read subvolume in dir-write ops.Vikas Gorur2009-07-161-52/+77
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 138 (create family calls do not return stat buf from read child) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=138
* Cleaned up log messages in replicate.Vikas Gorur2009-04-241-9/+9
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed xattr format of afr changelog to support adding and removing of ↵Vikas Gorur2009-04-161-9/+0
| | | | | | subvolumes while keeping existing data. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix in changelog logic.Vikas Gorur2009-04-071-12/+25
| | | | | | If a writev fails, remember it by marking it in the fd context. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Consider a subvolume dead if an fop fails on itVikas Gorur2009-04-071-9/+9
| | | | | | | | | Transaction fops earlier called afr_transaction_child_died only if an fop failed due to ENOTCONN or EBADFD. Now they consider a child dead regardless of the reason for failure. This handles cases such as ENOSPC. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Made afr inode context a 64-bit packed value instead of a structure.Vikas Gorur2009-04-031-126/+61
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Load balance read operations among subvolumes in afrVikas Gorur2009-04-021-14/+211
| | | | 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>
* Added all filesVikas Gorur2009-02-181-0/+1786