Remove lots of unnecessary white space.
Now that I am using white-space mode in Emacs I can see all of this, and I don't like it :-) Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
e6dd89da86
commit
1011e8344a
|
@ -1897,4 +1897,3 @@ int assemble_container_content(struct supertype *st, int mdfd,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
2
Grow.c
2
Grow.c
|
@ -1537,7 +1537,6 @@ int Grow_reshape(char *devname, int fd,
|
|||
struct mdinfo info;
|
||||
struct mdinfo *sra;
|
||||
|
||||
|
||||
if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) {
|
||||
pr_err("%s is not an active md array - aborting\n",
|
||||
devname);
|
||||
|
@ -2793,7 +2792,6 @@ static int reshape_array(char *container, int fd, char *devname,
|
|||
Manage_subdevs(devname, fd, devlist, verbose,
|
||||
0,NULL, 0);
|
||||
|
||||
|
||||
if (reshape.backup_blocks == 0 && data_offset)
|
||||
reshape.backup_blocks = reshape.before.data_disks * info->array.chunk_size/512;
|
||||
if (reshape.backup_blocks == 0) {
|
||||
|
|
1
Makefile
1
Makefile
|
@ -298,4 +298,3 @@ DISTRO_MAKEFILE := $(wildcard distropkg/Makefile)
|
|||
ifdef DISTRO_MAKEFILE
|
||||
include $(DISTRO_MAKEFILE)
|
||||
endif
|
||||
|
||||
|
|
|
@ -204,7 +204,6 @@ int Monitor(struct mddev_dev *devlist,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
while (! finished) {
|
||||
int new_found = 0;
|
||||
struct state *st;
|
||||
|
@ -855,7 +854,6 @@ static dev_t container_choose_spare(struct state *from, struct state *to,
|
|||
return dev;
|
||||
}
|
||||
|
||||
|
||||
static void try_spare_migration(struct state *statelist, struct alert_info *info)
|
||||
{
|
||||
struct state *from;
|
||||
|
|
3
config.c
3
config.c
|
@ -147,7 +147,6 @@ void free_line(char *line)
|
|||
dl_free(line);
|
||||
}
|
||||
|
||||
|
||||
struct conf_dev {
|
||||
struct conf_dev *next;
|
||||
char *name;
|
||||
|
@ -568,7 +567,6 @@ void mailfromline(char *line)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static char *alert_program = NULL;
|
||||
void programline(char *line)
|
||||
{
|
||||
|
@ -987,7 +985,6 @@ int devname_matches(char *name, char *match)
|
|||
else if (strncmp(match, "/dev/", 5) == 0)
|
||||
match += 5;
|
||||
|
||||
|
||||
if (strncmp(name, "md", 2) == 0 &&
|
||||
isdigit(name[2]))
|
||||
name += 2;
|
||||
|
|
1
dlink.c
1
dlink.c
|
@ -11,7 +11,6 @@ char *strncpy(char *dest, const char *src, size_t n) __THROW;
|
|||
void *xcalloc(size_t num, size_t size);
|
||||
#include "dlink.h"
|
||||
|
||||
|
||||
void *dl_head()
|
||||
{
|
||||
void *h;
|
||||
|
|
4
lib.c
4
lib.c
|
@ -112,8 +112,6 @@ char *fd2devnm(int fd)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* convert a major/minor pair for a block device into a name in /dev, if possible.
|
||||
* On the first call, walk /dev collecting name.
|
||||
|
@ -233,8 +231,6 @@ char *map_dev_preferred(int major, int minor, int create,
|
|||
return preferred ? preferred : regular;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* conf_word gets one word from the conf file.
|
||||
* if "allow_key", then accept words at the start of a line,
|
||||
* otherwise stop when such a word is found.
|
||||
|
|
|
@ -639,7 +639,6 @@ static void manage_new(struct mdstat_ent *mdstat,
|
|||
GET_LEVEL|GET_CHUNK|GET_DISKS|GET_COMPONENT|
|
||||
GET_DEGRADED|GET_DEVS|GET_OFFSET|GET_SIZE|GET_STATE);
|
||||
|
||||
|
||||
if (!mdi)
|
||||
return;
|
||||
new = xcalloc(1, sizeof(*new));
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#include <sys/file.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
#define MAP_READ 0
|
||||
#define MAP_NEW 1
|
||||
#define MAP_LOCK 2
|
||||
|
@ -105,7 +104,6 @@ int map_write(struct map_ent *mel)
|
|||
mapname[0]) == 0;
|
||||
}
|
||||
|
||||
|
||||
static FILE *lf = NULL;
|
||||
int map_lock(struct map_ent **melp)
|
||||
{
|
||||
|
|
3
maps.c
3
maps.c
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "mdadm.h"
|
||||
|
||||
|
||||
/* name/number mappings */
|
||||
|
||||
mapping_t r5layout[] = {
|
||||
|
@ -97,7 +96,6 @@ mapping_t pers[] = {
|
|||
{ NULL, 0}
|
||||
};
|
||||
|
||||
|
||||
mapping_t modes[] = {
|
||||
{ "assemble", ASSEMBLE},
|
||||
{ "build", BUILD},
|
||||
|
@ -150,4 +148,3 @@ int map_name(mapping_t *map, char *name)
|
|||
}
|
||||
return UnSet;
|
||||
}
|
||||
|
||||
|
|
3
mdadm.c
3
mdadm.c
|
@ -29,7 +29,6 @@
|
|||
#include "md_p.h"
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
static int scan_assemble(struct supertype *ss,
|
||||
struct context *c,
|
||||
struct mddev_ident *ident);
|
||||
|
@ -40,7 +39,6 @@ static int misc_list(struct mddev_dev *devlist,
|
|||
char *dump_directory,
|
||||
struct supertype *ss, struct context *c);
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int mode = 0;
|
||||
|
@ -423,7 +421,6 @@ int main(int argc, char *argv[])
|
|||
writemostly = 2;
|
||||
continue;
|
||||
|
||||
|
||||
case O(GROW,'z'):
|
||||
case O(CREATE,'z'):
|
||||
case O(BUILD,'z'): /* size */
|
||||
|
|
|
@ -621,4 +621,3 @@ AUTO +1.x homehost \-all
|
|||
.SH SEE ALSO
|
||||
.BR mdadm (8),
|
||||
.BR md (4).
|
||||
|
||||
|
|
8
mdadm.h
8
mdadm.h
|
@ -51,7 +51,6 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
|
|||
#define srandom srand
|
||||
#endif
|
||||
|
||||
|
||||
#include <linux/kdev_t.h>
|
||||
/*#include <linux/fs.h> */
|
||||
#include <sys/mount.h>
|
||||
|
@ -162,7 +161,6 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
|
|||
#endif
|
||||
#endif /* __KLIBC__ */
|
||||
|
||||
|
||||
/*
|
||||
* min()/max()/clamp() macros that also do
|
||||
* strict type-checking.. See the
|
||||
|
@ -448,7 +446,6 @@ typedef struct mapping {
|
|||
int num;
|
||||
} mapping_t;
|
||||
|
||||
|
||||
struct mdstat_ent {
|
||||
char *dev;
|
||||
char devnm[32];
|
||||
|
@ -605,7 +602,6 @@ static inline char *map_dev(int major, int minor, int create)
|
|||
struct active_array;
|
||||
struct metadata_update;
|
||||
|
||||
|
||||
/* 'struct reshape' records the intermediate states of
|
||||
* a general reshape.
|
||||
* The starting geometry is converted to the 'before' geometry
|
||||
|
@ -1156,7 +1152,6 @@ struct stat64;
|
|||
|
||||
extern int add_dev(const char *name, const struct stat *stb, int flag, struct FTW *s);
|
||||
|
||||
|
||||
extern int Manage_ro(char *devname, int fd, int readonly);
|
||||
extern int Manage_run(char *devname, int fd, int quiet);
|
||||
extern int Manage_stop(char *devname, int fd, int quiet,
|
||||
|
@ -1436,7 +1431,6 @@ char *xstrdup(const char *str);
|
|||
#define LEVEL_CONTAINER (-100)
|
||||
#define LEVEL_UNSUPPORTED (-200)
|
||||
|
||||
|
||||
/* faulty stuff */
|
||||
|
||||
#define WriteTransient 0
|
||||
|
@ -1456,7 +1450,6 @@ char *xstrdup(const char *str);
|
|||
#define ModeMask 0x1f
|
||||
#define ModeShift 5
|
||||
|
||||
|
||||
#ifdef __TINYC__
|
||||
#undef minor
|
||||
#undef major
|
||||
|
@ -1494,7 +1487,6 @@ char *xstrdup(const char *str);
|
|||
#define ALGORITHM_ROTATING_N_RESTART 9 /* DDF PRL=6 RLQ=2 */
|
||||
#define ALGORITHM_ROTATING_N_CONTINUE 10 /*DDF PRL=6 RLQ=3 */
|
||||
|
||||
|
||||
/* For every RAID5 algorithm we define a RAID6 algorithm
|
||||
* with exactly the same layout for data and parity, and
|
||||
* with the Q block always on the last device (N-1).
|
||||
|
|
3
mdmon.h
3
mdmon.h
|
@ -26,7 +26,6 @@ enum array_state { clear, inactive, suspended, readonly, read_auto,
|
|||
|
||||
enum sync_action { idle, reshape, resync, recover, check, repair, bad_action };
|
||||
|
||||
|
||||
struct active_array {
|
||||
struct mdinfo info;
|
||||
struct supertype *container;
|
||||
|
@ -73,7 +72,6 @@ extern struct active_array *discard_this;
|
|||
extern struct active_array *pending_discard;
|
||||
extern struct md_generic_cmd *active_cmd;
|
||||
|
||||
|
||||
void remove_pidfile(char *devname);
|
||||
void do_monitor(struct supertype *container);
|
||||
void do_manager(struct supertype *container);
|
||||
|
@ -97,4 +95,3 @@ static inline int is_resync_complete(struct mdinfo *array)
|
|||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,5 +53,3 @@ chmod +x initramfs/init
|
|||
) > init.cpio.gz
|
||||
rm -rf initramfs
|
||||
ls -l init.cpio.gz
|
||||
|
||||
|
||||
|
|
1
msg.c
1
msg.c
|
@ -78,7 +78,6 @@ static int recv_buf(int fd, void* buf, int len, int tmo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int send_message(int fd, struct metadata_update *msg, int tmo)
|
||||
{
|
||||
__s32 len = msg->len;
|
||||
|
|
1
msg.h
1
msg.h
|
@ -17,7 +17,6 @@
|
|||
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
|
||||
struct mdinfo;
|
||||
struct metadata_update;
|
||||
|
||||
|
|
3
part.h
3
part.h
|
@ -26,7 +26,6 @@
|
|||
/* Structure definitions ext for MBR and GPT partition tables
|
||||
*/
|
||||
|
||||
|
||||
#define MBR_SIGNATURE_MAGIC __cpu_to_le16(0xAA55)
|
||||
#define MBR_PARTITIONS 4
|
||||
|
||||
|
@ -49,8 +48,6 @@ struct MBR {
|
|||
__u16 magic;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
|
||||
#define GPT_SIGNATURE_MAGIC __cpu_to_le64(0x5452415020494645ULL)
|
||||
#define MBR_GPT_PARTITION_TYPE 0xEE
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
static int devpath_to_ll(const char *dev_path, const char *entry,
|
||||
unsigned long long *val);
|
||||
|
||||
|
@ -125,7 +124,6 @@ struct sys_dev *find_driver_devices(const char *bus, const char *driver)
|
|||
return head;
|
||||
}
|
||||
|
||||
|
||||
static struct sys_dev *intel_devices=NULL;
|
||||
static time_t valid_time = 0;
|
||||
|
||||
|
@ -155,7 +153,6 @@ static int devpath_to_ll(const char *dev_path, const char *entry, unsigned long
|
|||
return n;
|
||||
}
|
||||
|
||||
|
||||
static __u16 devpath_to_vendor(const char *dev_path)
|
||||
{
|
||||
char path[strlen(dev_path) + strlen("/vendor") + 1];
|
||||
|
@ -254,7 +251,6 @@ static int scan(const void *start, const void *end, const void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const struct imsm_orom *imsm_platform_test(enum sys_dev_type hba_id, int *populated,
|
||||
struct imsm_orom *imsm_orom)
|
||||
{
|
||||
|
@ -289,8 +285,6 @@ const struct imsm_orom *imsm_platform_test(enum sys_dev_type hba_id, int *popula
|
|||
return imsm_orom;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const struct imsm_orom *find_imsm_hba_orom(enum sys_dev_type hba_id)
|
||||
{
|
||||
unsigned long align;
|
||||
|
@ -346,7 +340,6 @@ static const struct imsm_orom *find_imsm_hba_orom(enum sys_dev_type hba_id)
|
|||
(c) & 0xff, ((c) >> 8) & 0xff, \
|
||||
(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
|
||||
|
||||
|
||||
#define SYS_EFI_VAR_PATH "/sys/firmware/efi/vars"
|
||||
#define SCU_PROP "RstScuV"
|
||||
#define AHCI_PROP "RstSataV"
|
||||
|
@ -447,7 +440,6 @@ const struct imsm_orom *find_imsm_capability(enum sys_dev_type hba_id)
|
|||
{
|
||||
const struct imsm_orom *cap=NULL;
|
||||
|
||||
|
||||
if ((cap = find_imsm_efi(hba_id)) != NULL)
|
||||
return cap;
|
||||
if ((cap = find_imsm_hba_orom(hba_id)) != NULL)
|
||||
|
|
|
@ -133,7 +133,6 @@ static inline int imsm_orom_has_chunk(const struct imsm_orom *orom, int chunk)
|
|||
return !!(orom->sss & (1 << (fs - 1)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* fls - find last (most-significant) bit set
|
||||
* @x: the word to search
|
||||
|
@ -208,4 +207,3 @@ int disk_attached_to_hba(int fd, const char *hba_path);
|
|||
char *devt_to_devpath(dev_t dev);
|
||||
int path_attached_to_hba(const char *disk_path, const char *hba_path);
|
||||
const char *get_sys_dev_type(enum sys_dev_type);
|
||||
|
||||
|
|
3
policy.c
3
policy.c
|
@ -401,7 +401,6 @@ void pol_add(struct dev_policy **pol,
|
|||
pol_dedup(*pol);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* disk_policy() gathers policy information for the
|
||||
* disk described in the given mdinfo (disk.{major,minor}).
|
||||
|
@ -592,7 +591,6 @@ int disk_action_allows(struct mdinfo *disk, const char *metadata, enum policy_ac
|
|||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* Domain policy:
|
||||
* Any device can have a list of domains asserted by different policy
|
||||
* statements.
|
||||
|
@ -703,7 +701,6 @@ void domain_add(struct domainlist **domp, char *domain)
|
|||
domain_merge_one(domp, domain);
|
||||
}
|
||||
|
||||
|
||||
void domain_free(struct domainlist *dl)
|
||||
{
|
||||
while (dl) {
|
||||
|
|
|
@ -43,7 +43,6 @@ void raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
|
|||
uint8_t **ptrs);
|
||||
void xor_blocks(char *target, char **sources, int disks, int size);
|
||||
|
||||
|
||||
/* Collect per stripe consistency information */
|
||||
void raid6_collect(int chunk_size, uint8_t *p, uint8_t *q,
|
||||
char *chunkP, char *chunkQ, int *results)
|
||||
|
@ -144,7 +143,6 @@ int unlock_all_stripes(struct mdinfo *info, sighandler_t *sig) {
|
|||
return rv * 256;
|
||||
}
|
||||
|
||||
|
||||
int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
|
||||
int raid_disks, int chunk_size, int level, int layout,
|
||||
unsigned long long start, unsigned long long length, char *name[],
|
||||
|
@ -308,7 +306,6 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
|
|||
}
|
||||
write_res1 = write(source[failed_disk1], stripes[failed_disk1], chunk_size);
|
||||
|
||||
|
||||
seek_res = lseek64(source[failed_disk2],
|
||||
offsets[failed_disk2] + start * chunk_size, SEEK_SET);
|
||||
if (seek_res < 0) {
|
||||
|
@ -364,7 +361,6 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
length--;
|
||||
start++;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,6 @@ int geo_map(int block, unsigned long long stripe, int raid_disks,
|
|||
case 500 + ALGORITHM_PARITY_0:
|
||||
return block + 1;
|
||||
|
||||
|
||||
case 600 + ALGORITHM_PARITY_N_6:
|
||||
if (block == -2)
|
||||
return raid_disks - 1;
|
||||
|
@ -131,7 +130,6 @@ int geo_map(int block, unsigned long long stripe, int raid_disks,
|
|||
return raid_disks - 1;
|
||||
return block + 1;
|
||||
|
||||
|
||||
case 600 + ALGORITHM_PARITY_0:
|
||||
if (block == -1)
|
||||
return 0;
|
||||
|
@ -173,7 +171,6 @@ int geo_map(int block, unsigned long long stripe, int raid_disks,
|
|||
if (block == -2) return (pd+1) % raid_disks;
|
||||
return (pd + 2 + block) % raid_disks;
|
||||
|
||||
|
||||
case 600 + ALGORITHM_ROTATING_N_RESTART:
|
||||
/* Same a left_asymmetric, by first stripe is
|
||||
* D D D P Q rather than
|
||||
|
@ -210,7 +207,6 @@ static int is_ddf(int layout)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void xor_blocks(char *target, char **sources, int disks, int size)
|
||||
{
|
||||
int i, j;
|
||||
|
@ -243,7 +239,6 @@ void qsyndrome(uint8_t *p, uint8_t *q, uint8_t **sources, int disks, int size)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The following was taken from linux/drivers/md/mktables.c, and modified
|
||||
* to create in-memory tables rather than C code
|
||||
|
@ -436,11 +431,9 @@ int raid6_check_disks(int data_disks, int start, int chunk_size,
|
|||
if((Px != 0) && (Qx == 0))
|
||||
curr_broken_disk = diskP;
|
||||
|
||||
|
||||
if((Px == 0) && (Qx != 0))
|
||||
curr_broken_disk = diskQ;
|
||||
|
||||
|
||||
if((Px != 0) && (Qx != 0)) {
|
||||
data_id = (raid6_gflog[Qx] - raid6_gflog[Px]);
|
||||
if(data_id < 0) data_id += 255;
|
||||
|
|
1
sha1.c
1
sha1.c
|
@ -50,7 +50,6 @@
|
|||
64-byte boundary. (RFC 1321, 3.1: Step 1) */
|
||||
static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
|
||||
|
||||
|
||||
/* Take a pointer to a 160 bit block of data (five 32 bit ints) and
|
||||
initialize it to the start constants of the SHA1 algorithm. This
|
||||
must be called before using hash in the call to sha1_hash. */
|
||||
|
|
3
sha1.h
3
sha1.h
|
@ -84,7 +84,6 @@ struct sha1_ctx
|
|||
sha1_uint32 buffer[32];
|
||||
};
|
||||
|
||||
|
||||
/* Initialize structure containing state of computation. */
|
||||
extern void sha1_init_ctx (struct sha1_ctx *ctx);
|
||||
|
||||
|
@ -111,7 +110,6 @@ extern void sha1_process_bytes (const void *buffer, size_t len,
|
|||
aligned for a 32 bits value. */
|
||||
extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
|
||||
|
||||
|
||||
/* Put result from CTX in first 20 bytes following RESBUF. The result is
|
||||
always in little endian byte order, so that a byte-wise output yields
|
||||
to the wanted ASCII representation of the message digest.
|
||||
|
@ -120,7 +118,6 @@ extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
|
|||
aligned for a 32 bits value. */
|
||||
extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
|
||||
|
||||
|
||||
/* Compute SHA1 message digest for bytes read from STREAM. The
|
||||
resulting message digest number will be written into the 20 bytes
|
||||
beginning at RESBLOCK. */
|
||||
|
|
|
@ -235,7 +235,6 @@ struct bbm_log {
|
|||
struct bbm_log_entry mapped_block_entries[BBM_LOG_MAX_ENTRIES];
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
|
||||
#ifndef MDASSEMBLE
|
||||
static char *map_state_str[] = { "normal", "uninitialized", "degraded", "failed" };
|
||||
#endif
|
||||
|
@ -249,7 +248,6 @@ static char *map_state_str[] = { "normal", "uninitialized", "degraded", "failed"
|
|||
* MIGR_REC_BUF_SIZE <= MIGR_REC_POSITION
|
||||
*/
|
||||
|
||||
|
||||
#define UNIT_SRC_NORMAL 0 /* Source data for curr_migr_unit must
|
||||
* be recovered using srcMap */
|
||||
#define UNIT_SRC_IN_CP_AREA 1 /* Source data for curr_migr_unit has
|
||||
|
@ -508,7 +506,6 @@ struct imsm_update_add_remove_disk {
|
|||
enum imsm_update_type type;
|
||||
};
|
||||
|
||||
|
||||
static const char *_sys_dev_type[] = {
|
||||
[SYS_DEV_UNKNOWN] = "Unknown",
|
||||
[SYS_DEV_SAS] = "SAS",
|
||||
|
@ -591,7 +588,6 @@ static struct sys_dev* find_disk_attached_hba(int fd, const char *devname)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int find_intel_hba_capability(int fd, struct intel_super *super,
|
||||
char *devname);
|
||||
|
||||
|
@ -2427,7 +2423,6 @@ static int imsm_create_metadata_checkpoint_update(
|
|||
return update_memory_size;
|
||||
}
|
||||
|
||||
|
||||
static void imsm_update_metadata_locally(struct supertype *st,
|
||||
void *buf, int len);
|
||||
|
||||
|
@ -2770,7 +2765,6 @@ static __u8 imsm_check_degraded(struct intel_super *super, struct imsm_dev *dev,
|
|||
static int imsm_count_failed(struct intel_super *super, struct imsm_dev *dev,
|
||||
int look_in_map);
|
||||
|
||||
|
||||
#ifndef MDASSEMBLE
|
||||
static void manage_second_map(struct intel_super *super, struct imsm_dev *dev)
|
||||
{
|
||||
|
@ -3130,7 +3124,6 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst)
|
|||
|
||||
}
|
||||
|
||||
|
||||
/* if 'first' is a spare promote it to a populated mpb with sec's
|
||||
* family number
|
||||
*/
|
||||
|
@ -4202,7 +4195,6 @@ imsm_thunderdome(struct intel_super **super_list, int len)
|
|||
return champion;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
get_sra_super_block(int fd, struct intel_super **super_list, char *devname, int *max, int keep_fd);
|
||||
static int get_super_block(struct intel_super **super_list, char *devnm, char *devname,
|
||||
|
@ -4211,7 +4203,6 @@ static int
|
|||
get_devlist_super_block(struct md_list *devlist, struct intel_super **super_list,
|
||||
int *max, int keep_fd);
|
||||
|
||||
|
||||
static int load_super_imsm_all(struct supertype *st, int fd, void **sbp,
|
||||
char *devname, struct md_list *devlist,
|
||||
int keep_fd)
|
||||
|
@ -4274,7 +4265,6 @@ static int load_super_imsm_all(struct supertype *st, int fd, void **sbp,
|
|||
free_imsm(s);
|
||||
}
|
||||
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -4291,7 +4281,6 @@ static int load_super_imsm_all(struct supertype *st, int fd, void **sbp,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
get_devlist_super_block(struct md_list *devlist, struct intel_super **super_list,
|
||||
int *max, int keep_fd)
|
||||
|
@ -5019,7 +5008,6 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int remove_from_super_imsm(struct supertype *st, mdu_disk_info_t *dk)
|
||||
{
|
||||
struct intel_super *super = st->sb;
|
||||
|
@ -5044,7 +5032,6 @@ static int remove_from_super_imsm(struct supertype *st, mdu_disk_info_t *dk)
|
|||
dd->next = super->disk_mgmt_list;
|
||||
super->disk_mgmt_list = dd;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -5201,7 +5188,6 @@ static int write_super_imsm(struct supertype *st, int doclose)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int create_array(struct supertype *st, int dev_idx)
|
||||
{
|
||||
size_t len;
|
||||
|
@ -5500,7 +5486,6 @@ static int is_raid_level_supported(const struct imsm_orom *orom, int level, int
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
active_arrays_by_format(char *name, char* hba, struct md_list **devlist,
|
||||
int dpa, int verbose)
|
||||
|
@ -5624,7 +5609,6 @@ get_devices(const char *hba_path)
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
dv = xcalloc(1, sizeof(*dv));
|
||||
dv->devname = xstrdup(buf);
|
||||
dv->next = devlist;
|
||||
|
@ -5806,7 +5790,6 @@ count_volumes_list(struct md_list *devlist, char *homehost,
|
|||
return count;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
count_volumes(char *hba, int dpa, int verbose)
|
||||
{
|
||||
|
@ -6563,7 +6546,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
|
|||
sb_errors = 1;
|
||||
}
|
||||
|
||||
|
||||
/* count spare devices, not used in maps
|
||||
*/
|
||||
for (d = super->disks; d; d = d->next)
|
||||
|
@ -6709,7 +6691,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
|
|||
return rest;
|
||||
}
|
||||
|
||||
|
||||
static __u8 imsm_check_degraded(struct intel_super *super, struct imsm_dev *dev,
|
||||
int failed, int look_in_map)
|
||||
{
|
||||
|
@ -7525,7 +7506,6 @@ static struct dl *imsm_add_spare(struct intel_super *super, int slot,
|
|||
return dl;
|
||||
}
|
||||
|
||||
|
||||
static int imsm_rebuild_allowed(struct supertype *cont, int dev_idx, int failed)
|
||||
{
|
||||
struct imsm_dev *dev2;
|
||||
|
@ -7753,7 +7733,6 @@ static int disks_overlap(struct intel_super *super, int idx, struct imsm_update_
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static struct dl *get_disk_super(struct intel_super *super, int major, int minor)
|
||||
{
|
||||
struct dl *dl = NULL;
|
||||
|
@ -7831,7 +7810,6 @@ static int add_remove_disk_update(struct intel_super *super)
|
|||
return check_degraded;
|
||||
}
|
||||
|
||||
|
||||
static int apply_reshape_migration_update(struct imsm_update_reshape_migration *u,
|
||||
struct intel_super *super,
|
||||
void ***space_list)
|
||||
|
@ -7991,7 +7969,6 @@ static int apply_size_change_update(struct imsm_update_size_change *u,
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
|
||||
static int apply_update_activate_spare(struct imsm_update_activate_spare *u,
|
||||
struct intel_super *super,
|
||||
struct active_array *active_array)
|
||||
|
@ -8955,7 +8932,6 @@ static int imsm_get_allowed_degradation(int level, int raid_disks,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Function: open_backup_targets
|
||||
* Description: Function opens file descriptors for all devices given in
|
||||
|
@ -9067,7 +9043,6 @@ void init_migr_record_imsm(struct supertype *st, struct imsm_dev *dev,
|
|||
migr_rec->post_migr_vol_cap = dev->size_low;
|
||||
migr_rec->post_migr_vol_cap_hi = dev->size_high;
|
||||
|
||||
|
||||
/* Find the smallest dev */
|
||||
for (sd = info->devs ; sd ; sd = sd->next) {
|
||||
sprintf(nm, "%d:%d", sd->disk.major, sd->disk.minor);
|
||||
|
@ -9611,7 +9586,6 @@ abort:
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* function: imsm_create_metadata_update_for_size_change()
|
||||
* Creates update for IMSM array for array size change.
|
||||
|
@ -10536,7 +10510,6 @@ struct superswitch super_imsm = {
|
|||
.match_metadata_desc = match_metadata_desc_imsm,
|
||||
.container_content = container_content_imsm,
|
||||
|
||||
|
||||
.external = 1,
|
||||
.name = "imsm",
|
||||
|
||||
|
|
5
super0.c
5
super0.c
|
@ -36,7 +36,6 @@
|
|||
* .. other stuff
|
||||
*/
|
||||
|
||||
|
||||
static unsigned long calc_sb0_csum(mdp_super_t *super)
|
||||
{
|
||||
unsigned long csum = super->sb_csum;
|
||||
|
@ -690,7 +689,6 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
|
|||
* host name
|
||||
*/
|
||||
|
||||
|
||||
static int init_super0(struct supertype *st, mdu_array_info_t *info,
|
||||
unsigned long long size, char *ignored_name, char *homehost,
|
||||
int *uuid, unsigned long long data_offset)
|
||||
|
@ -947,7 +945,6 @@ static int compare_super0(struct supertype *st, struct supertype *tst)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void free_super0(struct supertype *st);
|
||||
|
||||
static int load_super0(struct supertype *st, int fd, char *devname)
|
||||
|
@ -1118,7 +1115,6 @@ static int add_internal_bitmap0(struct supertype *st, int *chunkp,
|
|||
bitmap_super_t *bms = (bitmap_super_t*)(((char*)sb) + MD_SB_BYTES);
|
||||
int uuid[4];
|
||||
|
||||
|
||||
min_chunk = 4096; /* sub-page chunks don't work yet.. */
|
||||
bits = (size * 512) / min_chunk + 1;
|
||||
while (bits > max_bits) {
|
||||
|
@ -1150,7 +1146,6 @@ static int add_internal_bitmap0(struct supertype *st, int *chunkp,
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static void locate_bitmap0(struct supertype *st, int fd)
|
||||
{
|
||||
unsigned long long dsize;
|
||||
|
|
9
super1.c
9
super1.c
|
@ -411,7 +411,6 @@ static void examine_super1(struct supertype *st, char *homehost)
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
if (calc_sb_1_csum(sb) == sb->sb_csum)
|
||||
printf(" Checksum : %x - correct\n", __le32_to_cpu(sb->sb_csum));
|
||||
else
|
||||
|
@ -507,7 +506,6 @@ static void examine_super1(struct supertype *st, char *homehost)
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
static void brief_examine_super1(struct supertype *st, int verbose)
|
||||
{
|
||||
struct mdp_superblock_1 *sb = st->sb;
|
||||
|
@ -998,7 +996,6 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info, char *map)
|
|||
info->disk.state |= 1 << MD_DISK_REPLACEMENT;
|
||||
}
|
||||
|
||||
|
||||
if (sb->feature_map & __le32_to_cpu(MD_FEATURE_RECOVERY_OFFSET))
|
||||
info->recovery_start = __le32_to_cpu(sb->recovery_offset);
|
||||
else
|
||||
|
@ -1470,8 +1467,6 @@ static int store_super1(struct supertype *st, int fd)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (sb_offset != __le64_to_cpu(sb->super_offset) &&
|
||||
0 != __le64_to_cpu(sb->super_offset)
|
||||
) {
|
||||
|
@ -1589,7 +1584,6 @@ static int write_init_super1(struct supertype *st)
|
|||
goto error_out;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Calculate the position of the superblock.
|
||||
* It is always aligned to a 4K boundary and
|
||||
|
@ -1923,7 +1917,6 @@ static int load_super1(struct supertype *st, int fd, char *devname)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static struct supertype *match_metadata_desc1(char *arg)
|
||||
{
|
||||
struct supertype *st = xcalloc(1, sizeof(*st));
|
||||
|
@ -1993,7 +1986,6 @@ static __u64 _avail_size1(struct supertype *st, __u64 devsize,
|
|||
else
|
||||
devsize -= 8;
|
||||
|
||||
|
||||
if (st->minor_version < 0)
|
||||
/* not specified, so time to set default */
|
||||
st->minor_version = 2;
|
||||
|
@ -2069,7 +2061,6 @@ add_internal_bitmap1(struct supertype *st,
|
|||
bitmap_super_t *bms = (bitmap_super_t*)(((char*)sb) + MAX_SB_SIZE);
|
||||
int uuid[4];
|
||||
|
||||
|
||||
if (__le64_to_cpu(sb->data_size) == 0)
|
||||
/* Must be creating the array, else data_size would be non-zero */
|
||||
creating = 1;
|
||||
|
|
|
@ -47,7 +47,6 @@ int main(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i < 4096 ; i+=4) {
|
||||
char t = super[i];
|
||||
super[i] = super[i+3];
|
||||
|
@ -69,7 +68,6 @@ int main(int argc, char *argv[])
|
|||
super[32*4+10*4 +i] = t;
|
||||
}
|
||||
|
||||
|
||||
if (lseek64(fd, offset, 0) < 0LL) {
|
||||
perror("lseek64");
|
||||
exit(1);
|
||||
|
@ -81,5 +79,3 @@ int main(int argc, char *argv[])
|
|||
exit(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
2
sysfs.c
2
sysfs.c
|
@ -88,7 +88,6 @@ void sysfs_init(struct mdinfo *mdi, int fd, char *devnm)
|
|||
strcpy(mdi->sys_name, devnm);
|
||||
}
|
||||
|
||||
|
||||
struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options)
|
||||
{
|
||||
char fname[PATH_MAX];
|
||||
|
@ -771,7 +770,6 @@ int sysfs_disk_to_scsi_id(int fd, __u32 *id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int sysfs_unique_holder(char *devnm, long rdev)
|
||||
{
|
||||
/* Check that devnm is a holder of rdev,
|
||||
|
|
|
@ -23,4 +23,3 @@ mdadm -B $md0 -l linear -n5 $dev0 $dev1 $dev2 $dev3 $dev4
|
|||
check linear
|
||||
testdev $md0 5 $size 64
|
||||
mdadm -S $md0
|
||||
|
||||
|
|
|
@ -31,4 +31,3 @@ do
|
|||
done
|
||||
mdadm -S $md0
|
||||
done
|
||||
|
||||
|
|
|
@ -55,4 +55,3 @@ do
|
|||
done
|
||||
mdadm -S $md0
|
||||
done
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ mdadm -S $md0
|
|||
mdadm -A $md0 --name="Fred" $devlist
|
||||
#mdadm -Db $md0
|
||||
mdadm -S $md0
|
||||
|
||||
|
|
|
@ -11,4 +11,3 @@ mdadm -S $md0
|
|||
mdadm -CR $md0 -l1 -n3 --write-behind --bitmap=internal --bitmap-chunk=4 $dev0 $dev1 --write-mostly $dev2
|
||||
testdev $md0 1 $mdsize1a 64
|
||||
mdadm -S $md0
|
||||
|
||||
|
|
|
@ -43,4 +43,3 @@ do
|
|||
done
|
||||
done
|
||||
exit 0
|
||||
|
||||
|
|
|
@ -76,4 +76,3 @@ imsm_check_removal $container $dev0
|
|||
mdadm --add $container $dev4
|
||||
check wait
|
||||
imsm_check_hold $container $dev4
|
||||
|
||||
|
|
|
@ -28,4 +28,3 @@ vol0_new_num_comps=$((num_disks - 1))
|
|||
vol0_new_chunk=64
|
||||
|
||||
. tests/imsm-grow-template 1 1
|
||||
|
||||
|
|
|
@ -18,7 +18,4 @@ vol0_new_level=0
|
|||
vol0_new_num_comps=$vol0_num_comps
|
||||
vol0_new_chunk=256
|
||||
|
||||
|
||||
. tests/imsm-grow-template 0 1
|
||||
|
||||
|
||||
|
|
|
@ -11,4 +11,3 @@ then
|
|||
echo "ERROR: size is wrong for $dev: $cnt * $size (chunk=$chunk) = $rasize, not `/sbin/blockdev --getsize $dev`"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue