aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-09-30 02:02:19 -0400
committerNeilBrown <neilb@suse.de>2014-10-13 22:08:29 -0400
commit2cbbca5e7c38d0c776497f586688464f8cfb1583 (patch)
treebc5e50b40c6d3c2dca1004f5bb2ad3066e4f2014 /drivers/md
parent403df4788837cdaceaa55bcfae1c6eade2abdb5b (diff)
md: discard PRINT_RAID_DEBUG ioctl
All the interesting information printed by this ioctl is provided in /proc/mdstat and/or sysfs. So it isn't needed and isn't used and would be best if it didn't exist. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c138
1 files changed, 0 insertions, 138 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9c33f052c848..fdd2d3fe1c6c 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -66,8 +66,6 @@ static void autostart_arrays(int part);
66static LIST_HEAD(pers_list); 66static LIST_HEAD(pers_list);
67static DEFINE_SPINLOCK(pers_lock); 67static DEFINE_SPINLOCK(pers_lock);
68 68
69static void md_print_devices(void);
70
71static DECLARE_WAIT_QUEUE_HEAD(resync_wait); 69static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
72static struct workqueue_struct *md_wq; 70static struct workqueue_struct *md_wq;
73static struct workqueue_struct *md_misc_wq; 71static struct workqueue_struct *md_misc_wq;
@@ -2171,136 +2169,6 @@ static void export_array(struct mddev *mddev)
2171 mddev->major_version = 0; 2169 mddev->major_version = 0;
2172} 2170}
2173 2171
2174static void print_desc(mdp_disk_t *desc)
2175{
2176 printk(" DISK<N:%d,(%d,%d),R:%d,S:%d>\n", desc->number,
2177 desc->major,desc->minor,desc->raid_disk,desc->state);
2178}
2179
2180static void print_sb_90(mdp_super_t *sb)
2181{
2182 int i;
2183
2184 printk(KERN_INFO
2185 "md: SB: (V:%d.%d.%d) ID:<%08x.%08x.%08x.%08x> CT:%08x\n",
2186 sb->major_version, sb->minor_version, sb->patch_version,
2187 sb->set_uuid0, sb->set_uuid1, sb->set_uuid2, sb->set_uuid3,
2188 sb->ctime);
2189 printk(KERN_INFO "md: L%d S%08d ND:%d RD:%d md%d LO:%d CS:%d\n",
2190 sb->level, sb->size, sb->nr_disks, sb->raid_disks,
2191 sb->md_minor, sb->layout, sb->chunk_size);
2192 printk(KERN_INFO "md: UT:%08x ST:%d AD:%d WD:%d"
2193 " FD:%d SD:%d CSUM:%08x E:%08lx\n",
2194 sb->utime, sb->state, sb->active_disks, sb->working_disks,
2195 sb->failed_disks, sb->spare_disks,
2196 sb->sb_csum, (unsigned long)sb->events_lo);
2197
2198 printk(KERN_INFO);
2199 for (i = 0; i < MD_SB_DISKS; i++) {
2200 mdp_disk_t *desc;
2201
2202 desc = sb->disks + i;
2203 if (desc->number || desc->major || desc->minor ||
2204 desc->raid_disk || (desc->state && (desc->state != 4))) {
2205 printk(" D %2d: ", i);
2206 print_desc(desc);
2207 }
2208 }
2209 printk(KERN_INFO "md: THIS: ");
2210 print_desc(&sb->this_disk);
2211}
2212
2213static void print_sb_1(struct mdp_superblock_1 *sb)
2214{
2215 __u8 *uuid;
2216
2217 uuid = sb->set_uuid;
2218 printk(KERN_INFO
2219 "md: SB: (V:%u) (F:0x%08x) Array-ID:<%pU>\n"
2220 "md: Name: \"%s\" CT:%llu\n",
2221 le32_to_cpu(sb->major_version),
2222 le32_to_cpu(sb->feature_map),
2223 uuid,
2224 sb->set_name,
2225 (unsigned long long)le64_to_cpu(sb->ctime)
2226 & MD_SUPERBLOCK_1_TIME_SEC_MASK);
2227
2228 uuid = sb->device_uuid;
2229 printk(KERN_INFO
2230 "md: L%u SZ%llu RD:%u LO:%u CS:%u DO:%llu DS:%llu SO:%llu"
2231 " RO:%llu\n"
2232 "md: Dev:%08x UUID: %pU\n"
2233 "md: (F:0x%08x) UT:%llu Events:%llu ResyncOffset:%llu CSUM:0x%08x\n"
2234 "md: (MaxDev:%u) \n",
2235 le32_to_cpu(sb->level),
2236 (unsigned long long)le64_to_cpu(sb->size),
2237 le32_to_cpu(sb->raid_disks),
2238 le32_to_cpu(sb->layout),
2239 le32_to_cpu(sb->chunksize),
2240 (unsigned long long)le64_to_cpu(sb->data_offset),
2241 (unsigned long long)le64_to_cpu(sb->data_size),
2242 (unsigned long long)le64_to_cpu(sb->super_offset),
2243 (unsigned long long)le64_to_cpu(sb->recovery_offset),
2244 le32_to_cpu(sb->dev_number),
2245 uuid,
2246 sb->devflags,
2247 (unsigned long long)le64_to_cpu(sb->utime) & MD_SUPERBLOCK_1_TIME_SEC_MASK,
2248 (unsigned long long)le64_to_cpu(sb->events),
2249 (unsigned long long)le64_to_cpu(sb->resync_offset),
2250 le32_to_cpu(sb->sb_csum),
2251 le32_to_cpu(sb->max_dev)
2252 );
2253}
2254
2255static void print_rdev(struct md_rdev *rdev, int major_version)
2256{
2257 char b[BDEVNAME_SIZE];
2258 printk(KERN_INFO "md: rdev %s, Sect:%08llu F:%d S:%d DN:%u\n",
2259 bdevname(rdev->bdev, b), (unsigned long long)rdev->sectors,
2260 test_bit(Faulty, &rdev->flags), test_bit(In_sync, &rdev->flags),
2261 rdev->desc_nr);
2262 if (rdev->sb_loaded) {
2263 printk(KERN_INFO "md: rdev superblock (MJ:%d):\n", major_version);
2264 switch (major_version) {
2265 case 0:
2266 print_sb_90(page_address(rdev->sb_page));
2267 break;
2268 case 1:
2269 print_sb_1(page_address(rdev->sb_page));
2270 break;
2271 }
2272 } else
2273 printk(KERN_INFO "md: no rdev superblock!\n");
2274}
2275
2276static void md_print_devices(void)
2277{
2278 struct list_head *tmp;
2279 struct md_rdev *rdev;
2280 struct mddev *mddev;
2281 char b[BDEVNAME_SIZE];
2282
2283 printk("\n");
2284 printk("md: **********************************\n");
2285 printk("md: * <COMPLETE RAID STATE PRINTOUT> *\n");
2286 printk("md: **********************************\n");
2287 for_each_mddev(mddev, tmp) {
2288
2289 if (mddev->bitmap)
2290 bitmap_print_sb(mddev->bitmap);
2291 else
2292 printk("%s: ", mdname(mddev));
2293 rdev_for_each(rdev, mddev)
2294 printk("<%s>", bdevname(rdev->bdev,b));
2295 printk("\n");
2296
2297 rdev_for_each(rdev, mddev)
2298 print_rdev(rdev, mddev->major_version);
2299 }
2300 printk("md: **********************************\n");
2301 printk("\n");
2302}
2303
2304static void sync_sbs(struct mddev *mddev, int nospares) 2172static void sync_sbs(struct mddev *mddev, int nospares)
2305{ 2173{
2306 /* Update each superblock (in-memory image), but 2174 /* Update each superblock (in-memory image), but
@@ -6285,7 +6153,6 @@ static inline bool md_ioctl_valid(unsigned int cmd)
6285 case GET_DISK_INFO: 6153 case GET_DISK_INFO:
6286 case HOT_ADD_DISK: 6154 case HOT_ADD_DISK:
6287 case HOT_REMOVE_DISK: 6155 case HOT_REMOVE_DISK:
6288 case PRINT_RAID_DEBUG:
6289 case RAID_AUTORUN: 6156 case RAID_AUTORUN:
6290 case RAID_VERSION: 6157 case RAID_VERSION:
6291 case RESTART_ARRAY_RW: 6158 case RESTART_ARRAY_RW:
@@ -6331,11 +6198,6 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
6331 err = get_version(argp); 6198 err = get_version(argp);
6332 goto out; 6199 goto out;
6333 6200
6334 case PRINT_RAID_DEBUG:
6335 err = 0;
6336 md_print_devices();
6337 goto out;
6338
6339#ifndef MODULE 6201#ifndef MODULE
6340 case RAID_AUTORUN: 6202 case RAID_AUTORUN:
6341 err = 0; 6203 err = 0;