summaryrefslogtreecommitdiffstats
path: root/xlators/performance/write-behind
Commit message (Collapse)AuthorAgeFilesLines
* performance/write-behind: initialize lock in wb-file before wb-file is set ↵v3.0.8qa1v3.0.8Raghavendra G2011-05-071-23/+29
| | | | | | | | | | | | | | | | | | | in fd-ctx. - Consider a combination of fuse->quick-read->read-ahead->wb->client. quick-read can do open-behind (open is returned as success even before it is issued to backend) and hence the fd can already be in the list of open fds of the inode. A flush call on some other fd opened on the same inode, will result in ra_flush issuing flush calls to all the fds opened on the same inode. This can result in wb_flush trying to hold a lock on non-initialized lock there by causing memory corruption. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2679 (Crash in GlusterFS 3.0.5 in GSP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2679
* performance/write-behind: backport write-behind from 3.1Raghavendra G2011-01-271-231/+620
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 934 (md5sum mismatch when files are transferred using vsftpd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=934
* write-behind: fixes in flushAnand Avati2010-07-021-138/+135
| | | | | | | | | | old code was resulting in duplicate flushes and spurious dangling flush frames Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1042 (Use correct flock structures in lk fops) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1042
* Revert "performance/write-behind: explicitly enforce ordering of overlapping ↵Anand V. Avati2010-05-281-125/+122
| | | | | | writes." This reverts commit 6d9b11dba63d86c48450aa956281114962289ef5.
* performance/write-behind: explicitly enforce ordering of overlapping writes.Raghavendra G2010-05-261-122/+125
| | | | | | | | | | | | | | | | | - If there are non-contiguous offsets (offsets which do not start where previous write ended), wait for completion of previous writes to server, before sending new ones. - Send flush call to server only when all writes are completed. - If a file is opened with O_APPEND, at any point of time a maximum only one write call to server should be in transit. This is to avoid reordering of writes in the presence of afr which can result in data corruption. See bug #934 for more details. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 934 (md5sum mismatch when files are transferred using vsftpd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=934
* write-behind: update default values for better small file performanceAnand Avati2010-05-131-2/+2
| | | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 898 (small file performance enhancements) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=898
* performance/write-behind: Resume all the consecutive non-write operations in ↵Raghavendra G2010-03-291-3/+0
| | | | | | | | | | the request queue in a single go. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 740 (read-ahead does not work to its full potential when loaded on top of write-behind) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=740
* performance/write-behind: fix data corruption while aggregating the adjacent ↵Raghavendra G2010-02-221-4/+55
| | | | | | | | | | | | | | | | | contiguous iobufs into a single iobuf - while aggregating, we should make sure that the destination has enough memory. __wb_collapse_write_bufs assumed that destination vector's iov_base was aligned to the start of an iobuf and hence memory of page_size is available for aggregation. This assumption is not always true, like in the configuration consisting afr->write->io-cache (afr is on top). Refer to the bug url for more details. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 542 (write-behind crashes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=542
* performance/write-behind: refactor __wb_collapse_write_bufsRaghavendra G2010-02-221-36/+38
| | | | | | | | | | - refactor done to remove duplicated code. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 542 (write-behind crashes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=542
* write-behind: fix 'option enable-trickling-writes'Anand Avati2010-01-261-8/+4
| | | | | | | | | | | fix logic in __wb_mark_winds to properly initialize incomplete_writes and conditionally check based on enable_trickling_writes flag Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 547 (write-behind enable-trickling-writes working?) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=547
* 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.
* performance/write-behind: Changed default value of option disable-till to 0Vijay Bellur2009-12-021-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 425 (Change disable-till default to 0) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=425
* performance/write-behind: use STACK_UNWIND_STRICT for unwinding.Raghavendra G2009-11-241-2/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> 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
* performance/write-behind: fix to bug in setattr which was causing frames to ↵Raghavendra G2009-10-201-1/+2
| | | | | | | | | | | | | | | be missed. - local->file was being assigned even before file pointer was got from any of the fds opened on the inode, thus making local->file to be NULL. In wb_setattr_cbk, since local->file is NULL (and hence file passed to wb_process_queue), wb_process_queue does not resume the pending operations queued for the file. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 327 (dbench does not complete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=327
* performance/write-behind: Process state dump operations are added.vinayak hegde2009-10-201-0/+43
| | | | | | | 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
* performance/write-behind: initialize frame->local before goto out labelvinayak hegde2009-10-161-10/+10
| | | | | | | | | | if mtime,atime are not changed, frame->local will not be initialized. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 310 (While trying to create a file on replicate with write behind set-up, client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=310
* performance/write-behind: In wb_setattr, inode is checked twicevinayak hegde2009-10-151-27/+10
| | | | | | | | | | 1. check for is it a directory, 2. otherwise check for inode and continue. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 310 (While trying to create a file on replicate with write behind set-up, client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=310
* performance/write-behind:STACK_UNWIND happens only in failure path of wb_stat()Vijay Bellur2009-10-151-1/+2
| | | | | | | | | | Only in case of errors STACK_UNWIND happens in wb_stat(). Also, fixed an incorrect check which would fail all writes. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 309 (In replicate set-up when exnihilate.sh is run , client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=309
* performance/write-behind: return from wb_open after STACK_WINDVijay Bellur2009-10-141-0/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 312 (iozone crash in Distribute-Replicate) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=312
* performance/write-behind: In wb_setattr file is used before getting fd contextvinayak hegde2009-10-131-1/+17
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 310 (While trying to create a file on replicate with write behind set-up, client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=310
* performance/write-behind: file is referenced, without checking for NULLvinayak hegde2009-10-131-1/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 310 (While trying to create a file on replicate with write behind set-up, client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=310
* performance/write-behind: Add enable-trickling-writes to volume_options.Raghavendra G2009-10-091-0/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: Refining the check for fd_ctx in fdsRaghavendra G2009-10-081-120/+145
| | | | | | | | | | - An fd opened on a directory should not be considered bad if the fd context is not set since the context is set only for fds opened on files. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 260 (ls on booster VMP results in error: "File descriptor in bad state") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=260
* performance/write-behind: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-081-39/+51
| | | | | | | 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
* Initialize local before any call to STACK_WIND to prevent a crashPavan Sondur2009-10-071-9/+10
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 304 (Write behind crashes when a chmod is issued) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=304
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Removed remaining references to chmod, chown and utimens as part of setattr ↵Pavan Sondur2009-10-061-16/+26
| | | | | | | | | | | changes. Removed references to chmod, chown and utimes. Removed utimes references in AFR and writebehind. 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
* write-behind: NFS-friendly logic changesShehjar Tikoo2009-10-011-112/+172
| | | | | | | 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-011-11/+15
| | | | | | | 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
* performance/write-behind: Add a NULL check for request->stub before checking ↵Raghavendra G2009-09-241-1/+2
| | | | | | | | | | | | | | | | | request->stub->fop. - for non-write wind requests, the request structure outlives the stub. The call stub is destroyed when stack is wound but request is destroyed only when the reply has come. (for writes, both stub and request are destroyed when refcount becomes 0, which happens only when the write operation is stack unwound and a reply for the write operation has come from underlying translators, for non-write unwind requests the request is first destroyed before resuming the stub). Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 280 (simple stripe, with write-behind set up, when dbench is run client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=280
* performance/write-behind: store currently aggregated data size in wb_fileRaghavendra G2009-09-231-27/+30
| | | | | | | | | | - this helps us to not traverse the request list whenever we need currently aggregated data in the queue Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: store the current window size in wb_file.Raghavendra G2009-09-231-43/+39
| | | | | | | | | | - this would increase the performance since we don't have to traverse the request list every time we need the current window size. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: reduce usage of iov_length.Raghavendra G2009-09-231-47/+27
| | | | | | | | | | - request structure now holds a member write_size which is initialised at the time of request creation and used later. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: add option "enable-trickling-writes".Raghavendra G2009-09-221-22/+41
| | | | | | | | | | | | | | - With this option enabled, writes are stack-wound even though not enough data is aggregated, provided there are no write-requests which are stack-wound but reply is yet to come. The reason behind this option is to make use of the network, which is relatively free (with no writes or replies in transit). However, with non-standard block-sizes of writes the performance can actually degrade. Hence making this configurable. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: reduce traversal of request list during wb_mark_winds.Raghavendra G2009-09-221-35/+28
| | | | | | | | | | | | | | | | - move all the decision making code to __wb_can_wind. - don't continue traversing the request list, once we know any of the following conditions are true: * requests other than write are present in queue. * writes are happening at non-contiguous offsets. * there are no write requests, which are wound to server but not yet received the reply. * enough data is aggregated for writing. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: reduce list-traversal during wb_mark_unwindsRaghavendra G2009-09-221-13/+19
| | | | | | | | | | - don't traverse entire request list to get the window-size, instead break when current window size becomes greater than configured limit. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: remove redundant traversal of write-requests in ↵Raghavendra G2009-09-221-3/+5
| | | | | | | | | | | | the wind list in wb_ sync. - no need of getting the total_count of number of requests in the list. Even if there is a single request, we need to sync it. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: Aggregate adjacent contiguous write-buffers into ↵Raghavendra G2009-09-221-1/+77
| | | | | | | | | single iobuf. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: fine-tune logic of wb_mark_windsRaghavendra G2009-09-221-65/+14
| | | | | | | | | | | | | | | - remove wb_mark_wind_aggregegate_size_aware, since wb_mark_wind_all does the same work (with check for whether current aggregated data size is greater than the configured limit before calling it). Moreover, wb_mark_wind_aggregate_size_aware called __wb_get_aggregate_size redundantly, thereby reducing the performance, since for small sized large number of writes, traversing the list of requests takes significant amount of time. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: check for the presence of context only in fds not ↵Raghavendra G2009-09-221-6/+12
| | | | | | | | | opened on directories. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 260 (ls on booster VMP results in error: "File descriptor in bad state") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=260
* performance/write-behind: hold locks when accessing members of wb_file.Raghavendra G2009-09-081-25/+99
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 243 (Hold locks when accessing members of wb_file_t.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=243
* performance/write-behind: communicate back the errors in writes to servers, ↵Raghavendra G2009-09-081-1/+12
| | | | | | | | | in the next immediate writes from application. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 242 (If any of the writes fail, write-behind should not wait till the fd is closed for reporting errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=242
* write-behind: set default window-size to 1MB.Raghavendra G2009-07-071-1/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* write-behind: Use O_ACCMODE while checking for access modes.Raghavendra G2009-07-071-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* performance/write-behind - bug fix in open() and create().Basavanagowda Kanur2009-07-021-1/+5
| | | | | | | | open() & create() calls should reset frame->local to NULL. bz# 104 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* enhancement in write-behindAmar Tumballi2009-06-301-18/+22
| | | | | | | | | Write calls should not be pushed to background only when the mandatory locking is enabled, in all other cases (eg: O_SYNC, O_DIRECT etc), we should not be 'caching' any data, but the calls can be pushed to the background. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* write-behind: fix memory corruptionRaghavendra G2009-06-151-0/+1
| | | | | | | | - wb_sync did not set local = NULL after stack_wind. It also used to free local if its not NULL as part of cleanup process. Hence there was a double free in STACK_DESTROY done in wb_sync_cbk. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* write-behind: check for memory allocation failures and take appropriate actionRaghavendra G2009-06-151-78/+434
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* write-behind: indentation and logging fixesRaghavendra G2009-04-301-158/+74
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* write-behind aggregate-size related changesRaghavendra G2009-04-161-15/+76
| | | | | | | | | | | This patch brings in following changes: 1. make aggregate-size as non-configurable and make it to be equal to maximum iobuf size. 2. best effort to write data in chunks of length as close to aggregate-size as possible but not greater than aggregate-size, since aggregate-size is made equal to Maximum size of iobuf. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>