qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regarding commit a9bcedd (SD card size has to be power of 2)


From: Tom Yan
Subject: Regarding commit a9bcedd (SD card size has to be power of 2)
Date: Mon, 7 Jun 2021 16:29:54 +0800

Hi philmd (and others),

So I just noticed your commit of requiring the size of an emulated SD
card to be a power of 2, when I was trying to emulate one for an
actual one (well, it's a microSD, but still), as it errored out.

You claim that the kernel will consider it to be a firmware bug and
"correct" the capacity by rounding it up. Could you provide a concrete
reference to the code that does such a thing? I'm not ruling out that
some crazy code could have gone upstream because some reviewers might
not be doing their job right, but if that really happened, it's a
kernel bug/regression and qemu should not do an equally-crazy thing to
"fix" it.

No offense but what you claimed really sounds absurd and ridiculous.
Although I don't have hundreds of SD cards in hand, I owned quite a
few at least, like most people do, with capacities ranging from ~2G to
~128G, and I don't even recall seeing a single one that has the
capacity being a power of 2. (Just like vendors of HDDs and SSDs, they
literally never do that AFAICT, for whatever reasons.)

Besides, even if there's a proper reason for the kernel to "fix" the
capacity, there's no reason for it to round it up either, because
obviously there will never be actual storage for the "virtual blocks".
I've never seen such a behavior so far either with the "mmcblk" hosts
I've used so far.

Regards,
Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]