summaryrefslogtreecommitdiffstats
path: root/doc/legacy/booster.txt
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2012-04-09 23:11:52 +0530
committerAnand Avati <avati@redhat.com>2012-04-11 10:25:56 -0700
commit076830c068fb39bbc3e863c89a4253cbea36357e (patch)
tree842884d8db9a40d5a53e5171c852a84daa8e0f65 /doc/legacy/booster.txt
parentdf8e2f53b70f4f49af70df308010dddfe5ca35ec (diff)
doc: Move outdated documentation to legacy
Change-Id: I0ceba9a993e8b1cdef4ff6a784bfd69c08107d88 BUG: 811311 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3116 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'doc/legacy/booster.txt')
-rw-r--r--doc/legacy/booster.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/legacy/booster.txt b/doc/legacy/booster.txt
new file mode 100644
index 00000000000..6f215c63848
--- /dev/null
+++ b/doc/legacy/booster.txt
@@ -0,0 +1,54 @@
+Introduction
+============
+* booster is a LD_PRELOADable library which boosts read/write performance by bypassing fuse for
+ read() and write() calls.
+
+Requirements
+============
+* fetch volfile from glusterfs.
+* identify whether multiple files are from the same mount point. If so, use only one context.
+
+Design
+======
+* for a getxattr, along with other attributes, fuse returns following attributes.
+ * contents of client volume-file.
+ * mount point.
+
+* LD_PRELOADed booster.so maintains an hash table storing mount-points and libglusterfsclient handles
+ so that handles are reused for files from same mount point.
+
+* it also maintains a fdtable. fdtable maps the fd (integer) returned to application to fd (pointer to fd struct)
+ used by libglusterfsclient. application is returned the same fd as the one returned from libc apis.
+
+* During fork, these tables are overwritten to enable creation of fresh glusterfs context in child.
+
+Working
+=======
+* application willing to use booster LD_PRELOADs booster.so which is a wrapper library implementing
+ open, read and write.
+
+* application should specify the path to logfile through the environment variable GLFS_BOOSTER_LOGFILE. If
+ not specified, logging is done to /dev/stderr.
+
+* open call does,
+ * real_open on the file.
+ * fgetxattr(fd).
+ * store the volume-file content got in the dictionary to a temparory file.
+ * look in the hashtable for the mount-point, if already present get the libglusterfsclient handle from the
+ hashtable. Otherwise get a new handle from libglusterfsclient (be careful about mount point not present in
+ the hashtable and multiple glusterfs_inits running simultaneously for the same mount-point there by using
+ multiple handles for the same mount point).
+ * real_close (fd).
+ * delete temporary volume-volfile.
+ * glusterfs_open (handle, path, mode).
+ * store the fd returned by glusterfs_open in the fdtable at the same index as the fd returned by real_open.
+ * return the index as fd.
+
+* read/write calls do,
+ * get the libglusterfsclient fd from fdtable.
+ * if found use glusterfs_read/glusterfs_write, else use real_read/real_write.
+
+* close call does,
+ * remove the fd from the fdtable.
+
+* other calls use real_calls.