On Thu, Apr 18, 2024 at 09:47 AM -0500, Jonathon Jongsma <[email protected]>
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> From: Boris Fiuczynski <[email protected]>
>>
>> When an udev add event occurs the mdev active config data requires an
>> update via mdevctl as the udev does not contain all config data.
>> This update needs to occur immediate and to be finished before the
>
> s/immediate/immediately/
Will change.
[…snip…]
>>
>> + /* The added mdev needs an immediate active config update before
>> + * the event is issued to allow sane API usage. */
>
> How about simply something like "so that full device information is
> available at the time that the 'created' event is emitted"
Okay, thanks.
>
>> + if (is_mdev && (nodeDeviceUpdateMediatedDevices() < 0)) {
>> + VIR_WARN("Update of mediated device %s failed",
>> + NULLSTR_EMPTY(sysfs_path));
>> + }
>> + > ret = 0;
>>
>> cleanup:
>> @@ -1758,19 +1769,12 @@ nodeStateCleanup(void)
>> static int
>> udevHandleOneDevice(struct udev_device *device)
>> {
>> - virNodeDevCapType dev_cap_type;
>> const char *action = udev_device_get_action(device);
>>
>> VIR_DEBUG("udev action: '%s': %s", action,
>> udev_device_get_syspath(device));
>>
>> - if (STREQ(action, "add") || STREQ(action, "change")) {
>> - int ret = udevAddOneDevice(device);
>> - if (ret == 0 &&
>> - udevGetDeviceType(device, &dev_cap_type) == 0 &&
>> - dev_cap_type == VIR_NODE_DEV_CAP_MDEV)
>> - scheduleMdevctlUpdate(driver->privateData, false);
>> - return ret;
>> - }
>> + if (STREQ(action, "add") || STREQ(action, "change"))
>> + return udevAddOneDevice(device);
>>
>> if (STREQ(action, "remove"))
>> return udevRemoveOneDevice(device);
>
> Reviewed-by: Jonathon Jongsma <[email protected]>
Thanks.
>
--
Kind regards / Beste Grüße
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]