summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/iobuf.h
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-04-11 00:09:08 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-12 11:33:46 +0530
commit3524572538e5abe839fa29fe94da8f7591cedce8 (patch)
tree301acbdffe65b609551ea291792a8b6299e40dcd /libglusterfs/src/iobuf.h
parente953968683d988c8fc3020ede2cb8e5229a548a6 (diff)
IOBREF support for holding iobuf refs along with fops (replacement for frame->root->{req,rsp}_refs
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs/src/iobuf.h')
-rw-r--r--libglusterfs/src/iobuf.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h
index 8a854db8f41..3d389b82fc9 100644
--- a/libglusterfs/src/iobuf.h
+++ b/libglusterfs/src/iobuf.h
@@ -94,4 +94,17 @@ struct iobuf_pool *iobuf_pool_new (size_t arena_size, size_t page_size);
struct iobuf *iobuf_get (struct iobuf_pool *iobuf_pool);
void iobuf_unref (struct iobuf *iobuf);
+
+struct iobref {
+ gf_lock_t lock;
+ int ref;
+ struct iobuf *iobrefs[8];
+};
+
+struct iobref *iobref_new ();
+struct iobref *iobref_ref (struct iobref *iobref);
+void iobref_unref (struct iobref *iobref);
+int iobref_add (struct iobref *iobref, struct iobuf *iobuf);
+int iobref_merge (struct iobref *to, struct iobref *from);
+
#endif /* !_IOBUF_H_ */