summaryrefslogtreecommitdiff
path: root/msg.h
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-07-12 20:27:40 +1000
committerNeil Brown <neilb@suse.de>2008-07-12 20:27:40 +1000
commitbfa44e2e7afb88a9f2d6083f8ff31c2d50cc78dc (patch)
tree4a4e140f3e3e4611320e872bc2bb88b622dc83ce /msg.h
parent4d43913ce07ffbcb1ae8e7bdd06a4bd67cd07791 (diff)
Revise message passing code.
More here
Diffstat (limited to 'msg.h')
-rw-r--r--msg.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/msg.h b/msg.h
index 433239da..4dc805e5 100644
--- a/msg.h
+++ b/msg.h
@@ -19,21 +19,13 @@
struct mdinfo;
+struct metadata_update;
-struct mdinfo;
-struct md_message {
- int seq;
- int num_bytes;
- void *buf;
-};
-
-extern const int start_magic;
-extern const int end_magic;
-
-extern int receive_message(int fd, struct md_message *msg, int tmo);
-extern int send_message(int fd, struct md_message *msg, int tmo);
-extern int ack(int fd, int seq, int tmo);
-extern int nack(int fd, int err, int tmo);
+extern int receive_message(int fd, struct metadata_update *msg, int tmo);
+extern int send_message(int fd, struct metadata_update *msg, int tmo);
+extern int ack(int fd, int tmo);
+extern int wait_reply(int fd, int tmo);
extern int connect_monitor(char *devname);
extern int ping_monitor(char *devname);
+#define MSG_MAX_LEN (4*1024*1024)