Am 05.03.2010 10:32, schrieb Christoph Hellwig:
> On Fri, Mar 05, 2010 at 10:26:21AM +0100, Kevin Wolf wrote:
>> Is there a check anywhere that the user didn't give us an odd block
>> size? We could get an interesting bit mask otherwise.
> 
> Not yet.  I used to have such a check in the first incarnation of
> the block topology patches, but I have no idea how to do it in a
> centralized way using the qdev attributs.
> 
> Does anyone know if there's a better way to do this than just
> duplicating the check in every driver?

We could probably introduce a new qdev property type that says "unsigned
16 bit integer, but only powers of two", and doing this looks quite
easy. On the other hand, having a new type for each possible restriction
sounds a bit silly...

Kevin


Reply via email to