eDevices (node_device_udev.c:1691)
==9104==by 0xBF639B5: nodeStateInitializeEnumerate (node_device_udev.c:2009)
==9104==by 0x49BDBFD: virThreadHelper (virthread.c:256)
==9104==by 0x5242069: start_thread (in /usr/lib64/libc.so.6)
Signed-off-by: Marc Hartmayer
---
src/conf/node_device_con
I'm not familiar with the code so I cannot decide if ignoring the return values
is a bug or not. At least, it looks awkward and should be annotated.
Signed-off-by: Marc Hartmayer
---
src/conf/node_device_conf.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src
Marc Hartmayer (2):
node_device_conf: virNodeDeviceGetSCSITargetCaps: fix memory leak
TODO virNodeDeviceUpdateCaps: checks missing?
src/conf/node_device_conf.c | 37 -
1 file changed, 16 insertions(+), 21 deletions(-)
--
2.34.1
vice() already schedules an
> mdevctl update thread to be run after this function (udevAddOneDevice())
> is called for a mediated device. So after this patch, a new udev event
> for a mediated device would result in the udev thread querying mdevctl
> immediately and then also spawnin
On Thu, Mar 28, 2024 at 03:55 PM +0100, Ján Tomko wrote:
> On a Wednesday in 2024, Marc Hartmayer wrote:
>>Make sure the old value in `scsi_target->wwpn` is free'd before replacing it.
>>While at it, simplify the code.
>>
>
> "While at it" usuall
On Thu, Mar 28, 2024 at 04:00 PM +0100, Ján Tomko wrote:
> On a Wednesday in 2024, Marc Hartmayer wrote:
>>I'm not familiar with the code so I cannot decide if ignoring the return
>>values
>>is a bug or not. At least, it looks awkward and should be annotated.
>>
On Thu, Mar 28, 2024 at 04:53 PM +0100, "Marc Hartmayer"
wrote:
> On Thu, Mar 28, 2024 at 04:00 PM +0100, Ján Tomko wrote:
>> On a Wednesday in 2024, Marc Hartmayer wrote:
>>>I'm not familiar with the code so I cannot decide if ignoring the return
>>&
)
==9104==by 0xBF639B5: nodeStateInitializeEnumerate (node_device_udev.c:2009)
==9104==by 0x49BDBFD: virThreadHelper (virthread.c:256)
==9104==by 0x5242069: start_thread (in /usr/lib64/libc.so.6)
Signed-off-by: Marc Hartmayer
---
src/conf/node_device_conf.c | 5 -
1 file ch
The first patch fixes a resource leak, the other patches are small improvements
and locking improvements.
Marc Hartmayer (5):
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Add comments about locking
caller of
`nodeDeviceUpdateMediatedDevices` must hold this lock.
Currently, that's not the case.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/node_device/node_device_udev.c
b/
The new thread name makes it easier to understand the purpose of the thread.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device
It is done a little differently everywhere in libvirt, but most common is to
test for != -1.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device
Since @driver->privateData is modified take the lock.
Question: In theory we could take the udevEventData->mdevctlLock?
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/node_
Remove the timeout when the udevEventData is disposed, analogous to priv->watch.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
in
On Wed, Apr 03, 2024 at 04:03 PM +0200, Marc Hartmayer
wrote:
> The new thread name makes it easier to understand the purpose of the thread.
>
> Signed-off-by: Marc Hartmayer
> ---
> src/node_device/node_device_udev.c | 14 +++---
> 1 file changed, 7 insertio
On Thu, Mar 28, 2024 at 03:55 PM +0100, Ján Tomko wrote:
> On a Wednesday in 2024, Marc Hartmayer wrote:
>>Make sure the old value in `scsi_target->wwpn` is free'd before replacing it.
>>While at it, simplify the code.
>>
>
> "While at it" usuall
On Wed, Apr 10, 2024 at 09:42 AM +0200, Ján Tomko wrote:
> On a Tuesday in 2024, Marc Hartmayer wrote:
>>On Thu, Mar 28, 2024 at 03:55 PM +0100, Ján Tomko wrote:
>>> On a Wednesday in 2024, Marc Hartmayer wrote:
>>>>Make sure the old value in `scsi_target->
On Thu, Apr 11, 2024 at 05:50 PM +0200, Boris Fiuczynski
wrote:
> Reviewed-by: Boris Fiuczynski
>
> On 4/3/24 16:03, Marc Hartmayer wrote:
>> Since @driver->privateData is modified take the lock.
>>
>> Question: In theory we could take the udevEventData->mdevc
diate update of active config on udev add
nodedev: reset active config data on udev remove event
Marc Hartmayer (12):
node_device_udev: Set @def to NULL
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Add comment
object will
only copy invalid data. Instead copying the defined config data will
store valid data into the newly added node object.
Signed-off-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Reviewed-by: Marc Hartmayer
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 2
@def to NULL after
the ownership has moved.
While at it, add comments to other code places why @def is set to NULL.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 4
src/test/test_driver.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff
From: Boris Fiuczynski
When a mdev device is destroyed or stopped the udev remove event
handling needs to reset the active config data of the node object
representing a persisted mdev.
Reviewed-by: Marc Hartmayer
Signed-off-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src
Remove the timeout when the udevEventData is disposed, analogous to priv->watch.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/node_device/node_device_udev.c
b/src/node_dev
It is done a little differently everywhere in libvirt, but most common is to
test for != -1.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/node_device
Commit a99d876a0f58 ("node_device: Use automatic mutex management") replaced the
locking mechanism and accidentally removed the comment with the reason why the
lock is taken. Restore this comment and add a new comment about the lock.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc
The new names make it easier to understand the purpose of the data.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 48 +++---
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/node_device
this change, scheduleMdevctlUpdate call is already called in
`udevAddOneDevice` and can therefore be removed in `udevHandleOneDevice`.
Signed-off-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 22 +-
1 file changed, 13 insertions
Since @driver->privateData is modified take the lock.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_dev
Use the proper driver functions for the node state shutdown preparation and
wait. In the next patch, these functions will be extended.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 54 +++---
1 file changed, 42 insertions(+), 12 deletions
There is only one case where force is true, therefore let's inline that case.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/node_device/node_device_udev.c
the code
+ improve error reporting
+ improve naming - e.g. rename more udevXXX functions?
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_driver.h | 2 +-
src/node_device/node_device_driver.c | 6 +-
src/node_device/node_device_udev.c | 295 +++
3 file
evice` and `udevRemoveOneDeviceSysPath` are only called by the
worker pool threads therefore it's possible to call the
`nodeDeviceUpdateMediatedDevices` directly without blocking the udev thread.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 16 +++-
1
Inline `udevRemoveOneDevice` as it's used only once.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
There is no reason to serialize the `mdevctl list` calls.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index 9282afdd3241
On Fri, Apr 12, 2024 at 03:36 PM +0200, Marc Hartmayer
wrote:
> From: Boris Fiuczynski
>
> Two situations will trigger an udev add event:
> 1) the mdev is created when started (transient) or
> 2) the mdev was defined and is started
> In case 1 there is no node object exis
On Thu, Apr 18, 2024 at 09:47 AM -0500, Jonathon Jongsma
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> From: Boris Fiuczynski
>>
>> When an udev add event occurs the mdev active config data requires an
>> update via mdevctl as the udev does not contain all
On Thu, Apr 18, 2024 at 10:03 AM -0500, Jonathon Jongsma
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> From: Boris Fiuczynski
>>
>> When a mdev device is destroyed or stopped the udev remove event
>> handling needs to reset the active config data of the no
On Thu, Apr 18, 2024 at 11:18 AM -0500, Jonathon Jongsma
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> Commit a99d876a0f58 ("node_device: Use automatic mutex management") replaced
>> the
>> locking mechanism and accidentally removed the comment with th
On Thu, Apr 18, 2024 at 01:48 PM -0500, Jonathon Jongsma
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> Since @driver->privateData is modified take the lock.
>>
[…snip…]
>>* signal if that event never comes */
>> -scheduleM
On Thu, Apr 18, 2024 at 05:01 PM -0500, Jonathon Jongsma
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> Use the proper driver functions for the node state shutdown preparation and
>> wait. In the next patch, these functions will be extended.
>>
>> Si
On Thu, Apr 18, 2024 at 05:19 PM -0500, Jonathon Jongsma
wrote:
> On 4/12/24 8:36 AM, Marc Hartmayer wrote:
>> Use a worker pool for processing the udev events and the initialization
>> instead
>> of a separate initThread and a mdevctl-thread. This has the large advanta
object will
only copy invalid data. Instead copying the defined config data will
store valid data into the newly added node object.
Signed-off-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Reviewed-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 2 +-
1 file changed, 1
te of active config on udev add
nodedev: reset active config data on udev remove event
Marc Hartmayer (17):
node_device_udev: Set @def to NULL
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Don't take `mdevc
@def to NULL after
the ownership has moved.
While at it, add comments to other code places why @def is set to NULL.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 4
src/test/test_driver.c | 3 ++-
2 files changed, 6
this change, scheduleMdevctlUpdate call is already called in
`udevAddOneDevice` and can therefore be removed in `udevHandleOneDevice`.
Reviewed-by: Jonathon Jongsma
Signed-off-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 23
It is done a little differently everywhere in libvirt, but most common is to
test for != -1.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff
From: Boris Fiuczynski
When a mdev device is destroyed or stopped the udev remove event
handling needs to reset the active config data of the node object
representing a persisted mdev.
Reviewed-by: Marc Hartmayer
Reviewed-by: Jonathon Jongsma
Signed-off-by: Boris Fiuczynski
---
src
Remove the timeout when the udevEventData is disposed, analogous to priv->watch.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/node_dev
Inline `udevRemoveOneDevice` as it's used only once.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/node_d
Since @driver->privateData is modified take the lock.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/node_dev
Everything is released in `udevEventDataDispose` except for the threads, change
this as this makes the code easier to read as it can be simplified a little.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions
er valid or maybe it never was. Therefore,
let's remove this lock and add a comment to `mdevCtl` what it protects.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/node_device/node_device_
Even if `priv->udev_monitor` was never initialized, the mdevctlLock, udevThread
were. Therefore let's match the order of releasing the resources the order of
allocating the resources in `nodeStateInitialize`.
In addition, use `g_steal_pointer` in `g_list_free_full`.
Signed-off-by: Marc H
The new names make it easier to understand the purpose of the data.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 48 +++---
1 file changed, 24 insertions(+), 24 deletions(-)
diff
these functions will be extended.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 84 ++
1 file changed, 63 insertions(+), 21 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index 1638a71
.
[1]
https://docs.gtk.org/gobject/signals.html#memory-management-of-signal-handlers
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index a3006
" and emitting the libvirt
nodedev events.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 244 +
1 file changed, 179 insertions(+), 65 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index e4
There is only one case where force is true, therefore let's inline that case.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/node_device/node_device_udev.c
It's better practice for all functions called by the threads to pass the driver
via parameter and not global variables. Easier to test and cleaner.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_driver.h | 2 +-
src/node_device/node_device_driver.c | 6 +--
src/node_d
Use this feature in `udevEventDataNew`.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index 0b255952a9f9
evice` and `udevRemoveOneDeviceSysPath` are only called by the
worker pool threads therefore it's possible to call the
`nodeDeviceUpdateMediatedDevices` directly without blocking the udev thread.
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 16 +++-
1
Instead of accessing the global `driver` object pass the `udevEventData` as
parameter to the thread handler and watch callback. This has the advantage that:
1. proper refcounting
2. easier to read and test
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 14
On Fri, Apr 19, 2024 at 04:49 PM +0200, Marc Hartmayer
wrote:
> Use a worker pool for processing the events (e.g. udev, mdevctl config
> changes)
> and the initialization instead of a separate initThread and a mdevctl-thread.
> This has the large advantage that we can leverage the
On Fri, Apr 19, 2024 at 04:49 PM +0200, Marc Hartmayer
wrote:
> Use a worker pool for processing the events (e.g. udev, mdevctl config
> changes)
> and the initialization instead of a separate initThread and a mdevctl-thread.
> This has the large advantage that we can leverage the
On Fri, Apr 19, 2024 at 02:23 PM -0500, Jonathon Jongsma
wrote:
> On 4/19/24 9:49 AM, Marc Hartmayer wrote:
>> It's better practice for all functions called by the threads to pass the
>> driver
>> via parameter and not global variables. Easier to te
On Mon, Apr 22, 2024 at 05:43 PM +0200, Boris Fiuczynski
wrote:
> This could be quashed with patch 3 but I am also fine with this if you
> do not want to spend the effort.
>
> Reviewed-by: Boris Fiuczynski
Will squash it.
[…snip]
--
Kind regards / Beste Grüße
Marc Ha
On Tue, Apr 23, 2024 at 09:10 AM +0100, Daniel P. Berrangé
wrote:
> On Tue, Apr 23, 2024 at 10:03:35AM +0200, Marc Hartmayer wrote:
>> On Fri, Apr 19, 2024 at 02:23 PM -0500, Jonathon Jongsma
>> wrote:
>> > On 4/19/24 9:49 AM, Marc Hartmayer wrote:
>> >> It
On Tue, Apr 23, 2024 at 10:06 AM +0100, Daniel P. Berrangé
wrote:
> On Tue, Apr 23, 2024 at 10:46:14AM +0200, Marc Hartmayer wrote:
>> On Tue, Apr 23, 2024 at 09:10 AM +0100, Daniel P. Berrangé
>> wrote:
>> > On Tue, Apr 23, 2024 at 10:03:35AM +0200, Marc Hartmayer wro
object will
only copy invalid data. Instead copying the defined config data will
store valid data into the newly added node object.
Signed-off-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Reviewed-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 2 +-
1 file changed, 1
of active config on udev events
nodedev: reset active config data on udev remove event
Marc Hartmayer (17):
node_device_udev: Set @def to NULL
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Don't tak
Remove the timeout when the udevEventData is disposed, analogous to priv->watch.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/node_dev
er valid or maybe it never was. Therefore,
let's remove this lock and add a comment to `mdevCtl` what it protects.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 6 ++
1 file changed, 2 insertions(+), 4
@def to NULL after
the ownership has moved.
While at it, add comments to other code places why @def is set to NULL.
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 4
src/test/test_driver.c | 3 ++-
2 files changed, 6
It is done a little differently everywhere in libvirt, but most common is to
test for != -1.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff
From: Boris Fiuczynski
When a mdev device is destroyed or stopped the udev remove event
handling needs to reset the active config data of the node object
representing a persisted mdev.
Reviewed-by: Marc Hartmayer
Reviewed-by: Jonathon Jongsma
Signed-off-by: Boris Fiuczynski
---
src
Since @driver->privateData is modified take the lock.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/node_device/node_device_udev.c
usage reliable.
After this change, scheduleMdevctlUpdate call is already called in
`udevAddOneDevice` and can therefore be removed in `udevHandleOneDevice`.
Signed-off-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 30 +++---
1
Everything is released in `udevEventDataDispose` except for the threads, change
this as this makes the code easier to read as it can be simplified a little.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 14
Inline `udevRemoveOneDevice` as it's used only once.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/node_d
.
[1]
https://docs.gtk.org/gobject/signals.html#memory-management-of-signal-handlers
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/node_devi
these functions will be extended.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 84 ++
1 file changed, 63 insertions(+), 21 deletions(-)
diff --git a/src/node_device/node_device_udev.c
Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index 9aab4340fa2d..906b
The new names make it easier to understand the purpose of the data.
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jonathon Jongsma
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 48 +++---
1 file changed, 24 insertions(+), 24 deletions(-)
diff
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/node_device/node_device_udev.c
b/src/node_device/node_device_udev.c
index 14d44d5bcd0e..cc725997a39e 100644
--- a/src/node_device/node_device_udev.c
+++ b
It's better practice for all functions called by the threads to pass the driver
via parameter and not global variables. Easier to test and cleaner.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_driver.h | 2 +-
Use this feature in `udevEventDataNew`.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/node_device/node_device_udev.c
b/src
There is only one case where force is true, therefore let's inline that case.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_udev.c | 25 +++--
1 file changed, 11 insertions(+), 14 dele
" and emitting the libvirt
nodedev events.
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
---
src/node_device/node_device_driver.c | 9 +-
src/node_device/node_device_udev.c | 241 +++
src/test/test_driver.c |
Instead of accessing the global `driver` object pass the `udevEventData` as
parameter to the thread handler and watch callback. This has the advantage that:
1. proper refcounting
2. easier to read and test
Reviewed-by: Jonathon Jongsma
Reviewed-by: Boris Fiuczynski
Signed-off-by: Marc Hartmayer
On Fri, Apr 19, 2024 at 04:49 PM +0200, Marc Hartmayer
wrote:
> Use a worker pool for processing the events (e.g. udev, mdevctl config
> changes)
> and the initialization instead of a separate initThread and a mdevctl-thread.
> This has the large advantage that we can leverage the
On Tue, Apr 23, 2024 at 08:08 PM +0200, Marc Hartmayer
wrote:
> When an udev event occurs for a mediated device (mdev) the mdev config data
> requires an update via mdevctl as the udev event does not contain all config
> data. This update needs to occur immediately and to be finished b
On Tue, Jun 18, 2024 at 08:59 AM -0500, Jonathon Jongsma
wrote:
> On 6/18/24 6:33 AM, Boris Fiuczynski wrote:
>> On 6/13/24 11:14 PM, Jonathon Jongsma wrote:
>>> On 6/13/24 6:13 AM, Marc Hartmayer wrote:
>>>> On Tue, Apr 23, 2024 at 08:08 PM +0200, Marc Hartmayer
&
92 matches
Mail list logo