summaryrefslogtreecommitdiffstats
path: root/xlators/performance/write-behind/src/write-behind.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Reply back to CLI on error, by validating each xlator's optsKaushik BV2010-10-051-2/+70
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
* 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
* Glusterd: gluster volume set <volume> <option> <value>Kaushik BV2010-09-181-0/+51
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
* performance/write-behind: dump contents of wb-fileRaghavendra G2010-09-161-8/+154
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1059 (enhancements for getting statistics from performance translators) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1059
* gfid: change in create() prototype to have params dictionary with uuid in itAnand Avati2010-09-041-4/+3
| | | | | | | | | 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
* fuse resolve related changesAmar Tumballi2010-08-111-1/+1
| | | | | | | | | | | | | Now fuse is fully complaint with DVM, as even if there is a fop request on inode belonging to old graph, it will be resolved corresponding to new graph and operations will be performed wrt. new graph, which makes DVM truely spontaneous. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1240 (DVM: after graph change, inodes should resolve to new inode-table) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1240
* Remove unused variablesSachidananda2010-08-021-2/+0
| | | | | | | | Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1105 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1105
* some check added to the variables after GF_CALLOCAmar Tumballi2010-07-281-4/+6
| | | | | | | | | | | handles some NULL dereference problems (reported by clang when ran with code where '#define GF_CALLOC NULL'). 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
* NULL dereference fixes in code base after running with 'clang'Amar Tumballi2010-07-021-4/+4
| | | | | | | | | | | | * 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
* performance/write-behind: explicitly enforce ordering of overlapping writes.Raghavendra G2010-07-021-173/+279
| | | | | | | | | | | | | | | | | - 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: 970 (extracting kernel tarball hangs midway.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=970
* Revert "performance/write-behind: explicitly enforce ordering of overlapping ↵Anand V. Avati2010-06-151-126/+128
| | | | | | writes." This reverts commit e46c613364cd90f9c277db8b0733a99fc1d255de.
* performance/write-behind: explicitly enforce ordering of overlapping writes.Raghavendra G2010-05-261-128/+126
| | | | | | | | | | | | | | | | | - 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
* frame's 'op', 'type' restructuredAmar Tumballi2010-05-031-2/+0
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* Memory accounting changesVijay Bellur2010-04-231-24/+57
| | | | | | | | | | | 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
* 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
* iatt: changes across the codebaseAnand V. Avati2010-03-161-40/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* 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
* performance/write-behind: Set right an incorrect message displayed in logVijay Bellur2010-01-291-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 579 (write-behind cache-size less than 128KB leads to error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=579
* write-behind: fix 'option enable-trickling-writes'Anand Avati2010-01-231-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