]>
git.ipfire.org Git - thirdparty/mdadm.git/blob - msg.h
2 * Copyright (C) 2008 Intel Corporation
4 * mdmon socket / message handling
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 struct metadata_update
;
23 extern int receive_message(int fd
, struct metadata_update
*msg
, int tmo
);
24 extern int send_message(int fd
, struct metadata_update
*msg
, int tmo
);
25 extern int ack(int fd
, int tmo
);
26 extern int wait_reply(int fd
, int tmo
);
27 extern int connect_monitor(char *devname
);
28 extern int ping_monitor(char *devname
);
29 extern int block_subarray(struct mdinfo
*sra
);
30 extern int unblock_subarray(struct mdinfo
*sra
, const int unfreeze
);
31 extern int block_monitor(char *container
, const int freeze
);
32 extern void unblock_monitor(char *container
, const int unfreeze
);
33 extern int fping_monitor(int sock
);
34 extern int ping_manager(char *devname
);
35 extern void flush_mdmon(char *container
);
37 #define MSG_MAX_LEN (4*1024*1024)