Re: New boot time message: detected capacity change

From: Jens Axboe
Date: Thu May 19 2011 - 03:27:43 EST


On 2011-05-19 08:01, Tejun Heo wrote:
> Hello, again.
>
> On Thu, May 19, 2011 at 07:29:03AM +0200, Tejun Heo wrote:
>> The commit message is incomplete rather than misleading. The problem
>> has been there for a long time but hasn't affected cdrom so not many
>> people have noticed it. The changes to media revalidation exposed the
>> bug for cdrom too, so it became a regression for 2.6.38. Please refer
>> to the following thread.
>>
>> https://lkml.org/lkml/2011/3/31/436
>>
>> As the root cause was the same as the 2009 bug, I just referenced that
>> one. I should have included the link to the newer thread or explained
>> how it affected recent conversion from ->media_changed to
>> ->check_events. My bad.
>
> I was a bit confused here, so there were two separate problems. One
> affected sr, which was fixed by bf2253a6f0 and the other affecting
> partition scan on sd fixed by 02e352287a. The two were mixed in my
> head, and I explained the wrong one.
>
> The cdrom problem was a plain kernel regression. The latter (the one
> being shouted at in this thread) is slightly more complex. Due to the
> way devices were polled for media change from userland, the problem
> wasn't noticeable. The kernel misbehaved but userland polling masked
> it. 2.6.38 added in-kernel polling and the userland workaround no
> longer applied and the problem became visible - similar story with the
> cdrom problem but involves userland behavior change too.
>
> Both were very simliar in the cause too. cdrom was unnecessarily
> skipping check_disk_change() while the block layer was unnecessarily
> skipping partition check.
>
> Anyways, I'll go to my office and look into the warning message, but
> please revert 02e352287a if necessary. We can do that with -stable
> later.

It's too late at this point really, since 2.6.39 is tagged and done. The
capacity message should be purely harmless, even if it does look
somewhat odd. The placement is fairly logical, so should not cause too
many confused users.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/