Commit Graph

4 Commits

Author SHA1 Message Date
Sage Weil c7e337d649 ceph: buffer decoding helpers
Helper for decoding into a ceph_buffer, and other misc decoding helpers
we will need.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-02-10 15:04:39 -08:00
Sage Weil b6c1d5b81e ceph: simplify ceph_buffer interface
We never allocate the ceph_buffer and buffer separtely, so use a single
constructor.

Disallow put on NULL buffer; make the caller check.

Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07 12:17:17 -08:00
Sage Weil dd26d857a7 ceph: use kref for ceph_buffer
Signed-off-by: Sage Weil <sage@newdream.net>
2009-12-07 12:10:04 -08:00
Sage Weil c30dbb9cc7 ceph: ref counted buffer
struct ceph_buffer is a simple ref-counted buffer.  We transparently
choose between kmalloc for small buffers and vmalloc for large ones.

This is currently used only for allocating memory for xattr data.

Signed-off-by: Sage Weil <sage@newdream.net>
2009-10-06 11:31:07 -07:00