summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read/src/quick-read.c
Commit message (Collapse)AuthorAgeFilesLines
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: Ia85fa5617fb0bb438dbe3660d36465c0ecb000be BUG: 3348 Reviewed-on: http://review.gluster.com/199 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/v3.1.6qa6Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: I30b1807f4493a9b4ffa9899548daf7d29a0a6364 BUG: 3348 Reviewed-on: http://review.gluster.com/184 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* performance/quick-read: Handle unwinding of frameRaghavendra G2011-07-291-115/+220
| | | | | | | | | | | | | | | | | corresponding to read fop properly, while validating cache. - there was a possibility of double unwind in case of errors. - use a new frame to do open in fd-based fops. In case of errors, qr_resume_pending_ops will be called to resume all the fops waiting on open. Hence if we use frame corresponding to fop (without creating a new one), there is a possibility of frame being freed by the time open would've returned to quick-read. Change-Id: I45a528e02b0886d22161ac24ab3e147a26d5ee7d BUG: 3168 Reviewed-on: http://review.gluster.com/53 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* quick-read: Fix dirname(3) usageAnand Avati2011-07-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | glibc dirname() modify the string it is given and returns it. glusterfs takes this behavior for granted, and assume that if it gives a malloc'ed string to dirname(), then it can free()) the return value. Here is what SUSv2 says: http://opengroup.org/onlinepubs/007908799/xsh/dirname.html "The dirname() function may modify the string pointed to by path, and may return a pointer to static storage" At least NetBSD returns a static storage. glusterfs will return it to a calling function that has the responsability to free it, causing a SIGSEGV. Thanks to: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I8b1b946a005ee487b4b9fb23c0f85a41facfe7c4 BUG: 2923 Reviewed-on: http://review.gluster.com/52 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* performance/quick-read: Perform error handling only when GF_CALLOC failsVijay Bellur2011-07-291-1/+1
| | | | | | | | Change-Id: I7a1e2cae3de8794b252ebbf0de7ffab5ba2900d1 BUG: 3011 Reviewed-on: http://review.gluster.com/51 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* performance/quick-read: dump inode and fdctx during statedump.Raghavendra G2011-07-291-0/+126
| | | | | | | | Change-Id: I8641e1f2e9e031c1b443821b16ef4a365926a8a8 BUG: 1059 Reviewed-on: http://review.gluster.com/50 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* performance/quick-read: propagate errors during open back to actual fops.Raghavendra G2011-07-291-336/+845
| | | | | | | | | | | | | | - If open fails and there are any other fops waiting on that open, those fops should also unwind with appropriate errors. Before this patch, irrespective of success/failure of open, fops waiting on it were stack_wound and since fd was invalid, they would fail with EBADFD errors. Due to this actual error would've got masked by EBADFD. Change-Id: I65f88a681ea573a964fae132073696d32701882f BUG: 2346 Reviewed-on: http://review.gluster.com/49 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* quick-read: changes in volume_options to assist volume set help/help-xmlKaushik BV2011-07-171-1/+20
| | | | | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041 BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* performance/quick-read: reset open_in_transit to zero in case of an error.v3.1.6qa1Raghavendra G2011-07-121-0/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3011 (Uninterruptible processes writing(reading ? ) to/from glusterfs share) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3011
* performance/quick-read: disable caching for fds opened with GF_OPEN_NOWB flags.Raghavendra G2011-02-181-2/+4
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2240 (Solaris client hangs on file read operations) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2240
* performance/quick-read: Fix unwinding of same frame twice when qr_loc_fill ↵Raghavendra G2011-01-111-42/+22
| | | | | | | | | | fails. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2274 (crash in fd_unref) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2274
* performance/quick-read: fix warnings due to format string mismatches during ↵Raghavendra G2010-12-121-1/+1
| | | | | | | | | | invocation of gf_log. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2211 ((re)introduce warnings for format string/parameter mismatch) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2211
* performance/quick-read: handle the errors in qr_loc_fill properly when an ↵Raghavendra G2010-11-131-2/+24
| | | | | | | | | | | | fop needs to do open before continuing. - without need_unwind set, 'goto out' will result in infinite loop. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2075 (inode_from_path silently consumes 99% CPU causing nfs client disconnects) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2075
* performance/quick-read: white space cleanupVijay Bellur2010-10-281-110/+110
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2027 (Updates not happening with replication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2027
* performance/quick-read: set right validation checksVijay Bellur2010-10-281-2/+2
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2027 (Updates not happening with replication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2027
* Change assert to GF_ASSERTVijay Bellur2010-10-121-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
* mgmt/Glusterd: Volume set enhancementsKaushik BV2010-10-071-1/+47
| | | | | | | | | | | - performance.flush-behind, transport.keepalive added - volume info to display the options reconfigured 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
* Reply back to CLI on error, by validating each xlator's optsKaushik BV2010-10-051-0/+85
| | | | | | | | 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
* Changes to replace flock with gf_flock across GlusterFS.Pavan Sondur2010-10-011-5/+5
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 865 (Add locks recovery support in GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=865
* performance/quick-read: fix memory leaks.Raghavendra G2010-09-221-3/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1438 (memory leaks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1438
* 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