mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Clean up include files.
This commit is contained in:
parent
98998134de
commit
667c6be176
@ -9,33 +9,17 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <sched.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <linux/netlink.h>
|
|
||||||
#include <linux/dm-ioctl.h>
|
|
||||||
|
|
||||||
#include "dm-log-userspace.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "local.h"
|
|
||||||
#include "cluster.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "functions.h"
|
||||||
#include "link_mon.h"
|
#include "link_mon.h"
|
||||||
|
#include "local.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
static int exit_now = 0;
|
static int exit_now = 0;
|
||||||
static sigset_t signal_mask;
|
static sigset_t signal_mask;
|
||||||
|
@ -9,33 +9,21 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include "logging.h"
|
||||||
#include <string.h>
|
#include "cluster.h"
|
||||||
#include <sys/types.h>
|
#include "common.h"
|
||||||
#include <unistd.h>
|
#include "compat.h"
|
||||||
#include <stdint.h>
|
#include "functions.h"
|
||||||
#include <stdlib.h>
|
#include "link_mon.h"
|
||||||
#include <signal.h>
|
#include "local.h"
|
||||||
#include <sys/socket.h> /* These are for OpenAIS CPGs */
|
#include "xlate.h"
|
||||||
#include <sys/select.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <corosync/corotypes.h>
|
|
||||||
#include <corosync/cpg.h>
|
#include <corosync/cpg.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <openais/saAis.h>
|
#include <openais/saAis.h>
|
||||||
#include <openais/saCkpt.h>
|
#include <openais/saCkpt.h>
|
||||||
|
#include <signal.h>
|
||||||
#include "dm-log-userspace.h"
|
#include <unistd.h>
|
||||||
#include "libdevmapper.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "local.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "logging.h"
|
|
||||||
#include "link_mon.h"
|
|
||||||
#include "cluster.h"
|
|
||||||
#include "compat.h"
|
|
||||||
#include "xlate.h"
|
|
||||||
|
|
||||||
/* Open AIS error codes */
|
/* Open AIS error codes */
|
||||||
#define str_ais_error(x) \
|
#define str_ais_error(x) \
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef __CLUSTER_LOG_CLUSTER_DOT_H__
|
#ifndef _LVM_CLOG_CLUSTER_H
|
||||||
#define __CLUSTER_LOG_CLUSTER_DOT_H__
|
#define _LVM_CLOG_CLUSTER_H
|
||||||
|
|
||||||
#include "libdevmapper.h"
|
|
||||||
#include "dm-log-userspace.h"
|
#include "dm-log-userspace.h"
|
||||||
|
#include "libdevmapper.h"
|
||||||
|
|
||||||
#define DM_ULOG_RESPONSE 0x1000 /* in last byte of 32-bit value */
|
#define DM_ULOG_RESPONSE 0x1000 /* in last byte of 32-bit value */
|
||||||
#define DM_ULOG_CHECKPOINT_READY 21
|
#define DM_ULOG_CHECKPOINT_READY 21
|
||||||
@ -73,4 +73,4 @@ int destroy_cluster_cpg(char *uuid);
|
|||||||
|
|
||||||
int cluster_send(struct clog_request *rq);
|
int cluster_send(struct clog_request *rq);
|
||||||
|
|
||||||
#endif /* __CLUSTER_LOG_CLUSTER_DOT_H__ */
|
#endif /* _LVM_CLOG_CLUSTER_H */
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef __CLUSTER_LOG_COMMON_DOT_H__
|
#ifndef _LVM_CLOG_COMMON_H
|
||||||
#define __CLUSTER_LOG_COMMON_DOT_H__
|
#define _LVM_CLOG_COMMON_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there are problems when forking off to become a daemon,
|
* If there are problems when forking off to become a daemon,
|
||||||
@ -30,4 +30,4 @@
|
|||||||
|
|
||||||
#define DM_ULOG_REQUEST_SIZE 1024
|
#define DM_ULOG_REQUEST_SIZE 1024
|
||||||
|
|
||||||
#endif /* __CLUSTER_LOG_COMMON_DOT_H__ */
|
#endif /* _LVM_CLOG_COMMON_H */
|
||||||
|
@ -5,16 +5,12 @@
|
|||||||
* modify, copy, or redistribute it subject to the terms and conditions
|
* modify, copy, or redistribute it subject to the terms and conditions
|
||||||
* of the GNU Lesser General Public License v.2.1.
|
* of the GNU Lesser General Public License v.2.1.
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "dm-log-userspace.h"
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
|
#include "compat.h"
|
||||||
#include "xlate.h"
|
#include "xlate.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include <errno.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Older versions of the log daemon communicate with different
|
* Older versions of the log daemon communicate with different
|
||||||
@ -201,7 +197,7 @@ int clog_request_from_network(void *data, size_t data_len)
|
|||||||
if (data_len < (COMPAT_OFFSET + sizeof(*rq)))
|
if (data_len < (COMPAT_OFFSET + sizeof(*rq)))
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
|
|
||||||
rq = data + COMPAT_OFFSET;
|
rq = (struct clog_request *)((char *)data + COMPAT_OFFSET);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR("Unable to process cluster message: "
|
LOG_ERROR("Unable to process cluster message: "
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
* modify, copy, or redistribute it subject to the terms and conditions
|
* modify, copy, or redistribute it subject to the terms and conditions
|
||||||
* of the GNU Lesser General Public License v.2.1.
|
* of the GNU Lesser General Public License v.2.1.
|
||||||
*/
|
*/
|
||||||
#ifndef __COMPAT_DOT_H__
|
#ifndef _LVM_CLOG_COMPAT_H
|
||||||
#define __COMPAT_DOT_H__
|
#define _LVM_CLOG_COMPAT_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The intermachine communication structure version are:
|
* The intermachine communication structure version are:
|
||||||
@ -22,4 +22,4 @@
|
|||||||
int clog_request_to_network(struct clog_request *rq);
|
int clog_request_to_network(struct clog_request *rq);
|
||||||
int clog_request_from_network(void *data, size_t data_len);
|
int clog_request_from_network(void *data, size_t data_len);
|
||||||
|
|
||||||
#endif /* __COMPAT_DOT_H__ */
|
#endif /* _LVM_CLOG_COMPAT_H */
|
||||||
|
@ -9,27 +9,16 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define _GNU_SOURCE
|
|
||||||
#define _FILE_OFFSET_BITS 64
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <linux/kdev_t.h>
|
|
||||||
//#define __USE_GNU /* for O_DIRECT */
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "libdevmapper.h"
|
|
||||||
#include "dm-log-userspace.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "cluster.h"
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
#include "functions.h"
|
||||||
|
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <linux/kdev_t.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define BYTE_SHIFT 3
|
#define BYTE_SHIFT 3
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef __CLOG_FUNCTIONS_DOT_H__
|
#ifndef _LVM_CLOG_FUNCTIONS_H
|
||||||
#define __CLOG_FUNCTIONS_DOT_H__
|
#define _LVM_CLOG_FUNCTIONS_H
|
||||||
|
|
||||||
#include "dm-log-userspace.h"
|
#include "dm-log-userspace.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
@ -31,4 +31,4 @@ int log_get_state(struct dm_ulog_request *rq);
|
|||||||
int log_status(void);
|
int log_status(void);
|
||||||
void log_debug(void);
|
void log_debug(void);
|
||||||
|
|
||||||
#endif /* __CLOG_FUNCTIONS_DOT_H__ */
|
#endif /* _LVM_CLOG_FUNCTIONS_H */
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <poll.h>
|
|
||||||
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "link_mon.h"
|
#include "link_mon.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <poll.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
struct link_callback {
|
struct link_callback {
|
||||||
int fd;
|
int fd;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef __LINK_MON_DOT_H__
|
#ifndef _LVM_CLOG_LINK_MON_H
|
||||||
#define __LINK_MON_DOT_H__
|
#define _LVM_CLOG_LINK_MON_H
|
||||||
|
|
||||||
int links_register(int fd, const char *name, int (*callback)(void *data), void *data);
|
int links_register(int fd, const char *name, int (*callback)(void *data), void *data);
|
||||||
int links_unregister(int fd);
|
int links_unregister(int fd);
|
||||||
int links_monitor(void);
|
int links_monitor(void);
|
||||||
int links_issue_callbacks(void);
|
int links_issue_callbacks(void);
|
||||||
|
|
||||||
#endif /* __LINK_MON_DOT_H__ */
|
#endif /* _LVM_CLOG_LINK_MON_H */
|
||||||
|
@ -9,24 +9,18 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include <unistd.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/poll.h>
|
|
||||||
#include <linux/connector.h>
|
|
||||||
#include <linux/netlink.h>
|
|
||||||
|
|
||||||
#include "dm-log-userspace.h"
|
|
||||||
#include "functions.h"
|
|
||||||
#include "cluster.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "functions.h"
|
||||||
#include "link_mon.h"
|
#include "link_mon.h"
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <linux/connector.h>
|
||||||
|
#include <linux/netlink.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifndef CN_IDX_DM
|
#ifndef CN_IDX_DM
|
||||||
/* Kernel 2.6.31 is required to run this code */
|
/* Kernel 2.6.31 is required to run this code */
|
||||||
#define CN_IDX_DM 0x7 /* Device Mapper */
|
#define CN_IDX_DM 0x7 /* Device Mapper */
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef __CLUSTER_LOG_LOCAL_DOT_H__
|
#ifndef _LVM_CLOG_LOCAL_H
|
||||||
#define __CLUSTER_LOG_LOCAL_DOT_H__
|
#define _LVM_CLOG_LOCAL_H
|
||||||
|
|
||||||
int init_local(void);
|
int init_local(void);
|
||||||
void cleanup_local(void);
|
void cleanup_local(void);
|
||||||
|
|
||||||
int kernel_send(struct dm_ulog_request *rq);
|
int kernel_send(struct dm_ulog_request *rq);
|
||||||
|
|
||||||
#endif /* __CLUSTER_LOG_LOCAL_DOT_H__ */
|
#endif /* _LVM_CLOG_LOCAL_H */
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include "logging.h"
|
||||||
#include <syslog.h>
|
|
||||||
|
|
||||||
const char *__rq_types_off_by_one[] = {
|
const char *__rq_types_off_by_one[] = {
|
||||||
"DM_ULOG_CTR",
|
"DM_ULOG_CTR",
|
||||||
|
@ -10,16 +10,21 @@
|
|||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CLUSTER_LOG_LOGGING_DOT_H__
|
#ifndef _LVM_CLOG_LOGGING_H
|
||||||
#define __CLUSTER_LOG_LOGGING_DOT_H__
|
#define _LVM_CLOG_LOGGING_H
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
|
||||||
|
#include <configure.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
/* SHORT_UUID - print last 8 chars of a string */
|
/* SHORT_UUID - print last 8 chars of a string */
|
||||||
#define SHORT_UUID(x) (strlen(x) > 8) ? ((x) + (strlen(x) - 8)) : (x)
|
#define SHORT_UUID(x) (strlen(x) > 8) ? ((x) + (strlen(x) - 8)) : (x)
|
||||||
|
|
||||||
extern char *__rq_types_off_by_one[];
|
extern const char *__rq_types_off_by_one[];
|
||||||
#define RQ_TYPE(x) __rq_types_off_by_one[(x) - 1]
|
#define RQ_TYPE(x) __rq_types_off_by_one[(x) - 1]
|
||||||
|
|
||||||
extern int log_tabbing;
|
extern int log_tabbing;
|
||||||
@ -69,4 +74,4 @@ extern int log_resend_requests;
|
|||||||
#define LOG_PRINT(f, arg...) LOG_OUTPUT(LOG_NOTICE, f, ## arg)
|
#define LOG_PRINT(f, arg...) LOG_OUTPUT(LOG_NOTICE, f, ## arg)
|
||||||
#define LOG_ERROR(f, arg...) LOG_OUTPUT(LOG_ERR, f, ## arg)
|
#define LOG_ERROR(f, arg...) LOG_OUTPUT(LOG_ERR, f, ## arg)
|
||||||
|
|
||||||
#endif /* __CLUSTER_LOG_LOGGING_DOT_H__ */
|
#endif /* _LVM_CLOG_LOGGING_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user