summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read/src/quick-read.c
Commit message (Collapse)AuthorAgeFilesLines
...
* changes to client to make use of the rdma functionality.Raghavendra G2010-08-301-4/+4
| | | | | | | | | | | - preallocate buffers in client and pass them to transport layer whenever a large response is expected. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 513 (Introduce 0 copy rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=513
* xlators/performance: quick-read.c remove dead assignmentsSachidananda2010-08-171-4/+0
| | | | | | | | Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1109 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1109
* dump total cache used in quickread in the statedump informationRaghavendra Bhat2010-07-191-1/+4
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@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
* typo error: should check for less than instead of greater thanRaghavendra Bhat2010-07-131-1/+1
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@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
* dump total files cached in quick-read in statedump informationRaghavendra Bhat2010-07-121-0/+24
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@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
* quick-read: fix size parameter to GF_CALLOC of priv to fix mem corruptionAnand Avati2010-06-071-1/+1
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 723 (enhancements to quick read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=723
* performance/quick-read: fix the size-to-be pruned.Raghavendra G2010-06-031-2/+2
| | | | | | | | | | | - size-to-be pruned used to be a negative number because of cache-used being subtracted from configured cache-limit (with cache-used > cache-limit). Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 980 (quick read - fetching from backend issue) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=980
* performance/quick-read: set default cache-size value to 128MB.Raghavendra G2010-06-031-1/+3
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 723 (enhancements to quick read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=723
* performance/quick-read: implement an upper size limit for the cache.Raghavendra G2010-05-261-248/+566
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 723 (enhancements to quick read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=723
* frame's 'op', 'type' restructuredAmar Tumballi2010-05-031-3/+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
* performance/quick-read: don't try to validate again if qr_readv is called ↵Raghavendra G2010-04-271-4/+12
| | | | | | | | | | just after validation. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 852 (QR cache-timeout 0 causes high CPU usage and app hangs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=852
* Memory accounting changesVijay Bellur2010-04-231-23/+49
| | | | | | | | | | | 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/quick-read: read directly from backend for fds opened with ↵Raghavendra G2010-04-081-2/+11
| | | | | | | | | | O_DIRECT flag. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 723 (enhancements to quick read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=723
* performance/quick-read: make use of nanosecond resolution of mtime to decide ↵Raghavendra G2010-04-081-2/+5
| | | | | | | | | | whether to keep cache or not. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 801 (Direct io-mode support and related changes in caching translators.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
* iatt: changes across the codebaseAnand V. Avati2010-03-161-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* quick-read: Store and propagate wbflags argument in open fopShehjar Tikoo2010-03-041-12/+21
| | | | | | | | | | | | ..this is needed to ensure underlying translators like write-behind, ioc, etc, do not return zero-filled stats to NFSx. 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
* performance/quick-read: change the maximum value of max-file-size to 1000KB ↵Raghavendra G2009-11-281-4/+4
| | | | | | | | | | | | | | | from 1MB. - protocol restricts the maximum buffer size that can be received over network to 1MB. Since the buffer holding reply of lookup should also contain the lookup header and other key/value pairs of xattr_reply dict, the maximum file size that can be fetched through dictionary cannot be equal to 1MB. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 419 (Issues with writing files of size >= 1MB) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=419
* performance/quick-read: use STACK_UNWIND_STRICT for unwinding.Raghavendra G2009-11-241-40/+49
| | | | | | | | 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/quick-read: set return value to zero after successful init.Raghavendra G2009-11-131-0/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 374 (quick read fails to initialize if no options are given) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=374
* performance/quick-read: Process state dump operations are added.vinayak hegde2009-10-201-0/+35
| | | | | | | 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/quick-read: frame->local need not be set in qr_open_cbk.Raghavendra G2009-10-151-4/+1
| | | | | | | | | | - local is used only by certain operations and hence it need not be set by all the operations invoking open. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 323 (fd leak with quick-read loaded in translator tree) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=323
* performance/quick-read: flush should proceed with winding if fd-context is ↵Raghavendra G2009-10-151-2/+1
| | | | | | | | | | | | not found. - if the fd-context is not set, quick-read has no role to play other than just passing down the call to underlying translators. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 317 (Data corruption with write-behind loaded in translator tree.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=317
* performance/quick-read: change the default option values in quick-read.Raghavendra G2009-10-091-1/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-011-23/+26
| | | | | | | 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-107/+20
| | | | | | | 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
* performance/quick-read: refine logic of qr_readv.Raghavendra G2009-09-221-3/+14
| | | | | | | | | | - An extra vector was being allocated when the number of bytes being read from cache were equal to the iobuf size. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 274 (Memory corruption in Apache running on booster) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=274
* performance/quick-read: optimizations to lookupRaghavendra G2009-09-221-24/+49
| | | | | | | | | | | - qr_lookup not to send request for file-content if the cache is already present during revalidates. - flush the cache in qr_lookup_cbk if the cache is not in sync with the file. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: make a comment more explicit.Raghavendra G2009-09-221-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: checking for qr_file in inode-context and creating ↵Raghavendra G2009-09-221-30/+45
| | | | | | | | | if not present should be atomic. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: refine the logic in qr_lookup.Raghavendra G2009-09-221-40/+54
| | | | | | | | | | | | | - a new size has to be set in xattr_req only if (quick-read is configured with a maximum file size limit && ((xattr_req does not have a request key for getting content) || (the size requested in xattr_req is not equal to configured size in quick-read))) Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: access glusterfs_ctx from xlator instead of using ↵Raghavendra G2009-09-171-1/+1
| | | | | | | | | | | | | | glusterfs_get_ctx - since glusterfs_get_ctx gets the global context pointer, there can be problems in a multithreaded application running on libglusterfsclient doing multiple glusterfs_inits. Hence use context specific to the current xlator tree stored in each xlator object. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 240 (segmentation fault in qr_readv) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=240
* performance/quick-read: if open fails during cache validation, don't ↵Raghavendra G2009-09-081-2/+22
| | | | | | | | | continue validation process. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 232 (Quick-read: if open fails during cache validation, don't continue validation process.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=232
* performance/quick-read: Fix access of freed memory in qr_open_cbk.Raghavendra G2009-09-081-1/+9
| | | | | | | | | | | | | - It may so happen that current frame might be unwound and local might be freed when waiting operations are resumed. Hence store the information of whether this frame belongs to an open call in a local variable, instead accessing the flag from local at the end of qr_open_cbk. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 231 (Quick-read: Fix access of freed memory in qr_open_cbk.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=231
* quick-read: implement release and forget cbks.Raghavendra G2009-07-161-0/+49
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_lk.Raghavendra G2009-07-161-0/+97
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_ftruncate.Raghavendra G2009-07-161-0/+142
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_fsync.Raghavendra G2009-07-161-0/+94
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_finodelk.Raghavendra G2009-07-161-0/+100
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_fentrylk.Raghavendra G2009-07-161-0/+100
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_flush.Raghavendra G2009-07-161-0/+74
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_fgetxattr.Raghavendra G2009-07-161-0/+101
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_fsetxattr.Raghavendra G2009-07-161-0/+99
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement lc_fchmodRaghavendra G2009-07-161-0/+93
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_fchownRaghavendra G2009-07-161-0/+95
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_fstat.Raghavendra G2009-07-161-0/+94
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_writevRaghavendra G2009-07-161-0/+118
| | | | | | - writev on any fd opened on a file invalidates the cache stored during lookup Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_readvRaghavendra G2009-07-161-0/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - pseudo-code of the algorithm is given below if (content is cached) { validate-contents (); if (content cached is valid) { stack unwind with cached content; } else { goto read-from-storage; } } else { goto read-from-storage; } return; read-from-storage: if (open is already done on fd) { stack-wind read; } else { add the current readv to list of operations waiting on completion of open; if (open on the fd is in transit) { do nothing; } else { stack-wind open; } } return; Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: implement qr_openRaghavendra G2009-07-161-0/+201
| | | | | | | | - The file is opened actually only if it is not cached already in lookup. This adds responsibility for fops operating on fds to make sure that a valid fd actually opened on a file is used to complete the fop. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* quick-read: add qr_lookup.Raghavendra G2009-07-161-0/+137
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>