diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-10-22 01:44:55 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-22 01:44:55 +0200 |
commit | 0be1fecd7ee61b5a6d2b2e94b052b8a070b946ef (patch) | |
tree | f77875630f9081d381838db0ce82aa1e6686e3ff /drivers/md | |
parent | Merge tag 'disintegrate-raid-20121009' of git://git.infradead.org/users/dhowe... (diff) | |
download | linux-0be1fecd7ee61b5a6d2b2e94b052b8a070b946ef.tar.xz linux-0be1fecd7ee61b5a6d2b2e94b052b8a070b946ef.zip |
md faulty: use disk_stack_limits()
in:
fe86cdce block: do not artificially constrain max_sectors for stacking drivers
max_sectors defaults to UINT_MAX. md faulty wasn't using
disk_stack_limits(), so inherited this large value as well.
This triggered a bug in XFS when stressed over md_faulty, when
a very large bio_alloc() failed.
That was on an older kernel, and I can't reproduce exactly the
same thing upstream, but I think the fix is appropriate in any
case.
Thanks to Mike Snitzer for pointing out the problem.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/faulty.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 45135f69509c..5e7dc772f5de 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c @@ -315,8 +315,11 @@ static int run(struct mddev *mddev) } conf->nfaults = 0; - rdev_for_each(rdev, mddev) + rdev_for_each(rdev, mddev) { conf->rdev = rdev; + disk_stack_limits(mddev->gendisk, rdev->bdev, + rdev->data_offset << 9); + } md_set_array_sectors(mddev, faulty_size(mddev, 0, 0)); mddev->private = conf; |