From 2163383728c465c2edc3e60abef71ff104c81a57 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 28 Feb 2011 19:47:22 +0000 Subject: [PATCH] Test result of dm_task_set_uuid --- WHATS_NEW | 1 + daemons/dmeventd/dmeventd.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index b4e6b3692..e1e5feeb6 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.85 - =================================== + Add test for failed allocation from dm_task_set_uuid() in dmeventd. Improve pvremove error message when PV belongs to a VG. Extend normal policy to allow mirror logs on same PVs as images if necessary. Improve cling policy to recognise PVs already used during the transaction. diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 4ac5e25f5..32c69da5c 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -387,7 +387,9 @@ static int _fill_device_data(struct thread_status *ts) if (!dmt) return 0; - dm_task_set_uuid(dmt, ts->device.uuid); + if (!dm_task_set_uuid(dmt, ts->device.uuid)) + goto fail; + if (!dm_task_run(dmt)) goto fail; @@ -732,7 +734,8 @@ static struct dm_task *_get_device_status(struct thread_status *ts) if (!dmt) return NULL; - dm_task_set_uuid(dmt, ts->device.uuid); + if (!dm_task_set_uuid(dmt, ts->device.uuid)) + return NULL; if (!dm_task_run(dmt)) { dm_task_destroy(dmt); -- 2.43.5