+/* rpc/pack_generic.c */
+int lustre_pack_msg(int count, int *lens, char **bufs, int *len,
+ struct lustre_msg **msg);
+int lustre_msg_size(int count, int *lengths);
+int lustre_unpack_msg(struct lustre_msg *m, int len);
+void *lustre_msg_buf(struct lustre_msg *m, int n);
+
+static inline void ptlrpc_bulk_decref(struct ptlrpc_bulk_desc *desc)
+{
+ if (atomic_dec_and_test(&desc->b_refcount)) {
+ CDEBUG(D_PAGE, "Released last ref on %p, freeing\n", desc);
+ ptlrpc_free_bulk(desc);
+ } else {
+ CDEBUG(D_PAGE, "%p -> %d\n", desc,
+ atomic_read(&desc->b_refcount));
+ }
+}
+
+static inline void ptlrpc_bulk_addref(struct ptlrpc_bulk_desc *desc)
+{
+ atomic_inc(&desc->b_refcount);
+ CDEBUG(D_PAGE, "Set refcount of %p to %d\n", desc,
+ atomic_read(&desc->b_refcount));
+}
+