[dm-devel] Re: [PATCH][RFC] Emulate BLKRRPART on device-mapper

Milan Broz mbroz at redhat.com
Wed Jul 22 08:12:56 UTC 2009


Hannes Reinecke wrote:
>> +	/* partitions handled in userspace, just send change event */
>> +	if (disk_userspace_partitions(disk)) {
>> +		kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE);
>> +		return 0;
>> +	}
>> +
> Wrong. If you do it here, you'll never be able to catch any size changes
> of the disk. You'll have to move it to after the 'bdev->bd_invalidated = 0'
> line.

Yes, for non-DM devices which want to use that flag.

For device-mapper device, size can change only by mapping table change
which always generate change uevent.

> I would suggest renaming it to GENHD_FL_USERSPACE_PARTITIONS, as this is
> more in line with the function of the flag.

no problem here:-)

Milan




More information about the dm-devel mailing list