From b5e3d1901f95cf14c40864a91cbfd9abd77ce8de Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 14 Dec 2006 17:30:53 +1100 Subject: [PATCH] Remove some unused interfaces to the metadata handlers. This stuff has never been used (at least as far as git history can see). I wonder why it was there... --- mdadm.h | 1 - super0.c | 17 ----------------- super1.c | 20 -------------------- 3 files changed, 38 deletions(-) diff --git a/mdadm.h b/mdadm.h index 20537ede..f8abf099 100644 --- a/mdadm.h +++ b/mdadm.h @@ -315,7 +315,6 @@ extern struct superswitch { int (*update_super)(struct mdinfo *info, void *sbv, char *update, char *devname, int verbose, int uuid_set, char *homehost); - __u64 (*event_super)(void *sbv); int (*init_super)(struct supertype *st, void **sbp, mdu_array_info_t *info, unsigned long long size, char *name, char *homehost); void (*add_to_super)(void *sbv, mdu_disk_info_t *dinfo); int (*store_super)(struct supertype *st, int fd, void *sbv); diff --git a/super0.c b/super0.c index 2060e93d..600aae02 100644 --- a/super0.c +++ b/super0.c @@ -442,16 +442,6 @@ static int update_super0(struct mdinfo *info, void *sbv, char *update, rv = 1; } } - if (strcmp(update, "newdev") == 0) { - int d = info->disk.number; - memset(&sb->disks[d], 0, sizeof(sb->disks[d])); - sb->disks[d].number = d; - sb->disks[d].major = info->disk.major; - sb->disks[d].minor = info->disk.minor; - sb->disks[d].raid_disk = info->disk.raid_disk; - sb->disks[d].state = info->disk.state; - sb->this_disk = sb->disks[d]; - } if (strcmp(update, "grow") == 0) { sb->raid_disks = info->array.raid_disks; sb->nr_disks = info->array.nr_disks; @@ -503,12 +493,6 @@ static int update_super0(struct mdinfo *info, void *sbv, char *update, return rv; } -static __u64 event_super0(void *sbv) -{ - mdp_super_t *sb = sbv; - return md_event(sb); -} - /* * For verion-0 superblock, the homehost is 'stored' in the * uuid. 8 bytes for a hash of the host leaving 8 bytes @@ -977,7 +961,6 @@ struct superswitch super0 = { .uuid_from_super = uuid_from_super0, .getinfo_super = getinfo_super0, .update_super = update_super0, - .event_super = event_super0, .init_super = init_super0, .add_to_super = add_to_super0, .store_super = store_super0, diff --git a/super1.c b/super1.c index bf26cfa4..c8a57025 100644 --- a/super1.c +++ b/super1.c @@ -517,18 +517,6 @@ static int update_super1(struct mdinfo *info, void *sbv, char *update, rv = 1; } } -#if 0 - if (strcmp(update, "newdev") == 0) { - int d = info->disk.number; - memset(&sb->disks[d], 0, sizeof(sb->disks[d])); - sb->disks[d].number = d; - sb->disks[d].major = info->disk.major; - sb->disks[d].minor = info->disk.minor; - sb->disks[d].raid_disk = info->disk.raid_disk; - sb->disks[d].state = info->disk.state; - sb->this_disk = sb->disks[d]; - } -#endif if (strcmp(update, "grow") == 0) { sb->raid_disks = __cpu_to_le32(info->array.raid_disks); /* FIXME */ @@ -576,13 +564,6 @@ static int update_super1(struct mdinfo *info, void *sbv, char *update, return rv; } - -static __u64 event_super1(void *sbv) -{ - struct mdp_superblock_1 *sb = sbv; - return __le64_to_cpu(sb->events); -} - static int init_super1(struct supertype *st, void **sbp, mdu_array_info_t *info, unsigned long long size, char *name, char *homehost) { @@ -1249,7 +1230,6 @@ struct superswitch super1 = { .uuid_from_super = uuid_from_super1, .getinfo_super = getinfo_super1, .update_super = update_super1, - .event_super = event_super1, .init_super = init_super1, .add_to_super = add_to_super1, .store_super = store_super1, -- 2.39.2