summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-082-2/+24
| | | | | | | | | 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-162-0/+219
| | | | | | | | - 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-162-0/+147
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Implementing quick-read translator.Raghavendra G2009-07-164-0/+183
lookup can fetch the entire file in xattr dictionary using the key "glusterfs.content". We set the maximum size of the file that can be fetched so in the xattr_req dictionary using the same key. If file-size is less than or equal to the value set in dictionary, the content is stored in the dictionary using same key in lookup_cbk. For small files, we can do an optimization wherein we do not really send the calls open, read and close to the storage translators. Instead there can be an xlator which fakes open, read and close calls. For reads, it sends the data it has cached during lookup and hence saving the time for open, read and close calls to reach storage translators (this time can be significant if calls have to go through network to reach storage translator). Signed-off-by: Anand V. Avati <avati@dev.gluster.com>