Assorted fixed for a "make everything" build
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
parent
d5ff855d47
commit
7071320a18
8
Makefile
8
Makefile
|
@ -187,7 +187,7 @@ mdadm : $(OBJS) | check_rundir
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
|
$(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
|
||||||
|
|
||||||
mdadm.static : $(OBJS) $(STATICOBJS)
|
mdadm.static : $(OBJS) $(STATICOBJS)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS)
|
$(CC) $(CFLAGS) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS) $(LDLIBS)
|
||||||
|
|
||||||
mdadm.tcc : $(SRCS) $(INCL)
|
mdadm.tcc : $(SRCS) $(INCL)
|
||||||
$(TCC) -o mdadm.tcc $(SRCS)
|
$(TCC) -o mdadm.tcc $(SRCS)
|
||||||
|
@ -197,13 +197,13 @@ mdadm.klibc : $(SRCS) $(INCL)
|
||||||
$(CC) -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 $(CFLAGS) $(SRCS)
|
$(CC) -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 $(CFLAGS) $(SRCS)
|
||||||
|
|
||||||
mdadm.Os : $(SRCS) $(INCL)
|
mdadm.Os : $(SRCS) $(INCL)
|
||||||
$(CC) -o mdadm.Os $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -Os $(SRCS)
|
$(CC) -o mdadm.Os $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -Os $(SRCS) $(LDLIBS)
|
||||||
|
|
||||||
mdadm.O2 : $(SRCS) $(INCL) mdmon.O2
|
mdadm.O2 : $(SRCS) $(INCL) mdmon.O2
|
||||||
$(CC) -o mdadm.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(SRCS)
|
$(CC) -o mdadm.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(SRCS) $(LDLIBS)
|
||||||
|
|
||||||
mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
|
mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
|
||||||
$(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
|
$(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS) $(LDLIBS)
|
||||||
|
|
||||||
# use '-z now' to guarantee no dynamic linker interactions with the monitor thread
|
# use '-z now' to guarantee no dynamic linker interactions with the monitor thread
|
||||||
mdmon : $(MON_OBJS) | check_rundir
|
mdmon : $(MON_OBJS) | check_rundir
|
||||||
|
|
|
@ -734,8 +734,7 @@ char *vmd_domain_to_controller(struct sys_dev *hba, char *buf)
|
||||||
|
|
||||||
if (strncmp(buf, hba->path, strlen(buf)) == 0) {
|
if (strncmp(buf, hba->path, strlen(buf)) == 0) {
|
||||||
sprintf(path, "/sys/bus/pci/drivers/vmd/%s", ent->d_name);
|
sprintf(path, "/sys/bus/pci/drivers/vmd/%s", ent->d_name);
|
||||||
realpath(path, buf);
|
return realpath(path, buf);
|
||||||
return buf;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
6
super1.c
6
super1.c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* mdadm - manage Linux "md" devices aka RAID arrays.
|
* mdadm - manage Linux "md" devices aka RAID arrays.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2001-2009 Neil Brown <neilb@suse.de>
|
* Copyright (C) 2001-2016 Neil Brown <neilb@suse.com>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -141,6 +141,7 @@ struct misc_dev_info {
|
||||||
|MD_FEATURE_JOURNAL \
|
|MD_FEATURE_JOURNAL \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
static int role_from_sb(struct mdp_superblock_1 *sb)
|
static int role_from_sb(struct mdp_superblock_1 *sb)
|
||||||
{
|
{
|
||||||
unsigned int d;
|
unsigned int d;
|
||||||
|
@ -153,6 +154,7 @@ static int role_from_sb(struct mdp_superblock_1 *sb)
|
||||||
role = MD_DISK_ROLE_SPARE;
|
role = MD_DISK_ROLE_SPARE;
|
||||||
return role;
|
return role;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* return how many bytes are needed for bitmap, for cluster-md each node
|
/* return how many bytes are needed for bitmap, for cluster-md each node
|
||||||
* should have it's own bitmap */
|
* should have it's own bitmap */
|
||||||
|
@ -1654,6 +1656,7 @@ static void free_super1(struct supertype *st);
|
||||||
#define META_BLOCK_SIZE 4096
|
#define META_BLOCK_SIZE 4096
|
||||||
__u32 crc32c_le(__u32 crc, unsigned char const *p, size_t len);
|
__u32 crc32c_le(__u32 crc, unsigned char const *p, size_t len);
|
||||||
|
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
static int write_empty_r5l_meta_block(struct supertype *st, int fd)
|
static int write_empty_r5l_meta_block(struct supertype *st, int fd)
|
||||||
{
|
{
|
||||||
struct r5l_meta_block *mb;
|
struct r5l_meta_block *mb;
|
||||||
|
@ -1699,7 +1702,6 @@ fail_to_write:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef MDASSEMBLE
|
|
||||||
static int write_init_super1(struct supertype *st)
|
static int write_init_super1(struct supertype *st)
|
||||||
{
|
{
|
||||||
struct mdp_superblock_1 *sb = st->sb;
|
struct mdp_superblock_1 *sb = st->sb;
|
||||||
|
|
26
util.c
26
util.c
|
@ -82,8 +82,15 @@ struct blkpg_partition {
|
||||||
aren't permitted). */
|
aren't permitted). */
|
||||||
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
|
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
|
||||||
|
|
||||||
static struct dlm_hooks *dlm_hooks = NULL;
|
|
||||||
static int is_dlm_hooks_ready = 0;
|
static int is_dlm_hooks_ready = 0;
|
||||||
|
|
||||||
|
int dlm_funs_ready(void)
|
||||||
|
{
|
||||||
|
return is_dlm_hooks_ready ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
|
static struct dlm_hooks *dlm_hooks = NULL;
|
||||||
struct dlm_lock_resource *dlm_lock_res = NULL;
|
struct dlm_lock_resource *dlm_lock_res = NULL;
|
||||||
static int ast_called = 0;
|
static int ast_called = 0;
|
||||||
|
|
||||||
|
@ -92,11 +99,6 @@ struct dlm_lock_resource {
|
||||||
struct dlm_lksb lksb;
|
struct dlm_lksb lksb;
|
||||||
};
|
};
|
||||||
|
|
||||||
int dlm_funs_ready(void)
|
|
||||||
{
|
|
||||||
return is_dlm_hooks_ready ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Using poll(2) to wait for and dispatch ASTs */
|
/* Using poll(2) to wait for and dispatch ASTs */
|
||||||
static int poll_for_ast(dlm_lshandle_t ls)
|
static int poll_for_ast(dlm_lshandle_t ls)
|
||||||
{
|
{
|
||||||
|
@ -206,6 +208,16 @@ int cluster_release_dlmlock(int lockid)
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
int cluster_get_dlmlock(int *lockid)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
int cluster_release_dlmlock(int lockid)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse a 128 bit uuid in 4 integers
|
* Parse a 128 bit uuid in 4 integers
|
||||||
|
@ -2115,10 +2127,10 @@ void reopen_mddev(int mdfd)
|
||||||
dup2(fd, mdfd);
|
dup2(fd, mdfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MDASSEMBLE
|
||||||
static struct cmap_hooks *cmap_hooks = NULL;
|
static struct cmap_hooks *cmap_hooks = NULL;
|
||||||
static int is_cmap_hooks_ready = 0;
|
static int is_cmap_hooks_ready = 0;
|
||||||
|
|
||||||
#ifndef MDASSEMBLE
|
|
||||||
void set_cmap_hooks(void)
|
void set_cmap_hooks(void)
|
||||||
{
|
{
|
||||||
cmap_hooks = xmalloc(sizeof(struct cmap_hooks));
|
cmap_hooks = xmalloc(sizeof(struct cmap_hooks));
|
||||||
|
|
Loading…
Reference in New Issue