The explanation about the root cause and surrounding details:
The disk devices are supposed to expose the device and block size related information via properties, as described in size(9P), so there are two distinct cases - disk as whole with total size, and disk sliced to partitions.
For total size or whole disk, there should be properties:
device-nblocks
device-blksize (optional)
In case the disk driver will not add properties listed above, the device framework will create those properties.
For partitions, every partition is represented by device minor node and should have following properties:
Nblocks (for block device)
Size (for character or raw device).
In case of disks, the label framework (cmlb driver) will create and update Nblocks and Size automatically based on partition sizes and/or changes to partitions. Also in case of labeled lofi, since the disk label support in lofi is implemented by stacking cmlb, the cmlb does manage Nblocks and Size properties for minor nodes representing the partitions.
However, if the traditional, unlabeled lofi mapping is used, the lofi driver must create Nblocks and Size properties with proper values and bind those properties with proper minor node associated with mapped file. The bug was caused by fact that I did not realize the importance of minor number related to those properties.
The fix for the issue does not create property "device-nblocks" in lofi driver as it will be created by device framework, and makes sure the non-labeled mapping will get the properties "Nblocks" and "Size" created and bound to proper minor node. This creation is only applied in case of non-labeled mapping, because for labeled mapping, the cmlb driver will manage mentioned properties.