From: NeilBrown <neilb@suse.de>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-raid <linux-raid@vger.kernel.org>,
Mike Snitzer <msnitzer@redhat.com>,
Jes Sorensen <Jes.Sorensen@redhat.com>
Subject: Re: [PATCH] md faulty: use disk_stack_limits()
Date: Mon, 22 Oct 2012 10:45:56 +1100 [thread overview]
Message-ID: <20121022104556.2ddcb2f3@notabene.brown> (raw)
In-Reply-To: <5081E5B1.3070903@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
On Fri, 19 Oct 2012 18:43:45 -0500 Eric Sandeen <sandeen@redhat.com> wrote:
> 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>
> ---
>
> diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
> index 45135f6..5e7dc77 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;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2012-10-21 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 23:43 [PATCH] md faulty: use disk_stack_limits() Eric Sandeen
2012-10-21 23:45 ` NeilBrown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121022104556.2ddcb2f3@notabene.brown \
--to=neilb@suse.de \
--cc=Jes.Sorensen@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=msnitzer@redhat.com \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.