All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Checkin 7404ad3b6d04efbd918e9e2e776bf560fbedf47d breaks boot on KVM
Date: Tue, 14 Oct 2008 11:04:46 -0700	[thread overview]
Message-ID: <48F4DF3E.2050903@zytor.com> (raw)
In-Reply-To: <1223990609.12440.8.camel@localhost.localdomain>

James Bottomley wrote:
>>
>> :040000 040000 98fc7ae95211b8d16e2e8ca46997be660ad9ba93 
>> 2d35d0a2b6232411b840a9ccf6a52b946172566e M      drivers
>>
>> However, simply reverting this commit caused a panic on boot (not 
>> entirely surprising.)
> 
> Actually, it is surprising.  That patch takes the default arithmetic for
> calculating the disk size out of sd and uses a routine to do it more
> efficiently in lib/string_helpers.c
> 
> So there are two problems:  Why does it panic on revert (could you post
> the oops) and what does kvm object to in string_get_size ... it's a
> fairly innocuous routine as I read it ... your symptoms sound like the
> for loop isn't terminating.
> 

Looks like it's trying to print a zero.  I made a diff to print out the 
raw numbers, and did indeed get zero.

Now, *why* it is printing a zero is another matter (as is why using 
ffz() instead of ilog2() there...).  Some quick investigation showed 
that sdkp->capacity is a 32-bit quantity in this configuration, and 
shifting it left by 9 of course ends up with zero; being a virtual disk, 
it's an exact power of two.

Still, it is bad that string_get_size() hangs on passing zero.

The spinlock lockup is still happening, so I'm assuming it is an 
unrelated bug that was masked by the string_get_size issue.

Patch series will follow shortly.

	-hpa

  parent reply	other threads:[~2008-10-14 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14  0:03 Checkin 7404ad3b6d04efbd918e9e2e776bf560fbedf47d breaks boot on KVM H. Peter Anvin
2008-10-14 13:23 ` James Bottomley
2008-10-14 16:00   ` H. Peter Anvin
2008-10-14 18:00     ` Marcin Slusarz
2008-10-14 18:04   ` H. Peter Anvin [this message]
2008-10-14 18:34     ` [PATCH 1/2] scsi: fix computation of the full size of the device H. Peter Anvin
2008-10-14 18:34       ` [PATCH 2/2] string_get_size(): don't hang on zero; no decimals on exact H. Peter Anvin
2008-10-14 18:35     ` Checkin 7404ad3b6d04efbd918e9e2e776bf560fbedf47d breaks boot on KVM James Bottomley

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=48F4DF3E.2050903@zytor.com \
    --to=hpa@zytor.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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.