~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/md/faulty.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
#define MaxFault        50
65
65
#include <linux/blkdev.h>
66
66
#include <linux/raid/md_u.h>
 
67
#include <linux/slab.h>
67
68
#include "md.h"
68
69
#include <linux/seq_file.h>
69
70
 
168
169
                conf->nfaults = n+1;
169
170
}
170
171
 
171
 
static int make_request(struct request_queue *q, struct bio *bio)
 
172
static int make_request(mddev_t *mddev, struct bio *bio)
172
173
{
173
 
        mddev_t *mddev = q->queuedata;
174
 
        conf_t *conf = (conf_t*)mddev->private;
 
174
        conf_t *conf = mddev->private;
175
175
        int failit = 0;
176
176
 
177
177
        if (bio_data_dir(bio) == WRITE) {
210
210
                }
211
211
        }
212
212
        if (failit) {
213
 
                struct bio *b = bio_clone(bio, GFP_NOIO);
 
213
                struct bio *b = bio_clone_mddev(bio, GFP_NOIO, mddev);
214
214
                b->bi_bdev = conf->rdev->bdev;
215
215
                b->bi_private = bio;
216
216
                b->bi_end_io = faulty_fail;
224
224
 
225
225
static void status(struct seq_file *seq, mddev_t *mddev)
226
226
{
227
 
        conf_t *conf = (conf_t*)mddev->private;
 
227
        conf_t *conf = mddev->private;
228
228
        int n;
229
229
 
230
230
        if ((n=atomic_read(&conf->counters[WriteTransient])) != 0)
327
327
 
328
328
static int stop(mddev_t *mddev)
329
329
{
330
 
        conf_t *conf = (conf_t *)mddev->private;
 
330
        conf_t *conf = mddev->private;
331
331
 
332
332
        kfree(conf);
333
333
        mddev->private = NULL;
360
360
module_init(raid_init);
361
361
module_exit(raid_exit);
362
362
MODULE_LICENSE("GPL");
 
363
MODULE_DESCRIPTION("Fault injection personality for MD");
363
364
MODULE_ALIAS("md-personality-10"); /* faulty */
364
365
MODULE_ALIAS("md-faulty");
365
366
MODULE_ALIAS("md-level--5");