From: Hannes Reinecke <hare@suse.de>
To: Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel@redhat.com, Hannes Reinecke <hare@suse.com>
Subject: [PATCH RESEND] dm-raid: Do not call BUG() in __rdev_sectors()
Date: Wed, 28 Jun 2017 10:04:17 +0200 [thread overview]
Message-ID: <1498637057-23221-1-git-send-email-hare@suse.de> (raw)
__rdev_sectors() might be called for an invalid/non-existing
RAID set during raid_ctr(), which is perfectly fine and no
reason to panic.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
drivers/md/dm-raid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 7d89322..9bbb596 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -1571,7 +1571,8 @@ static sector_t __rdev_sectors(struct raid_set *rs)
return rdev->sectors;
}
- BUG(); /* Constructor ensures we got some. */
+ /* No valid raid devices */
+ return 0;
}
/* Calculate the sectors per device and per array used for @rs */
--
1.8.5.6
next reply other threads:[~2017-06-28 8:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 8:04 Hannes Reinecke [this message]
2017-06-28 17:18 ` [PATCH RESEND] dm-raid: Do not call BUG() in __rdev_sectors() Mike Snitzer
2017-06-29 14:09 ` Heinz Mauelshagen
2017-06-30 7:33 ` Johannes Thumshirn
2017-06-30 12:33 ` Heinz Mauelshagen
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=1498637057-23221-1-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=dm-devel@redhat.com \
--cc=hare@suse.com \
--cc=snitzer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox