1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

cmirrord: add missing checks for kernel_send

Log errors if kernel_send fails.
This commit is contained in:
Zdenek Kabelac 2012-06-19 23:28:59 +02:00
parent ac8a931889
commit 461eb1ac6a
3 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.97 - Version 2.02.97 -
=============================== ===============================
Add tests for kernel_send() errors in cmirrod.
Print clean_bits in pull_state, fix cut&paste typo in cmirrord. Print clean_bits in pull_state, fix cut&paste typo in cmirrord.
Add tests for errors from closedir(), close() in cmirrord. Add tests for errors from closedir(), close() in cmirrord.
Fix missing sync of filesystem when creating thin volume snapshot. Fix missing sync of filesystem when creating thin volume snapshot.

View File

@ -910,8 +910,9 @@ static int resend_requests(struct clog_cpg *entry)
rq->u_rq.seq); rq->u_rq.seq);
rq->u_rq.data_size = 0; rq->u_rq.data_size = 0;
kernel_send(&rq->u_rq); if (kernel_send(&rq->u_rq))
LOG_ERROR("Failed to respond to kernel [%s]",
RQ_TYPE(rq->u_rq.request_type));
break; break;
default: default:
@ -1346,7 +1347,9 @@ static void cpg_leave_callback(struct clog_cpg *match,
dm_list_del(&rq->u.list); dm_list_del(&rq->u.list);
if (rq->u_rq.request_type == DM_ULOG_POSTSUSPEND) if (rq->u_rq.request_type == DM_ULOG_POSTSUSPEND)
kernel_send(&rq->u_rq); if (kernel_send(&rq->u_rq))
LOG_ERROR("Failed to respond to kernel [%s]",
RQ_TYPE(rq->u_rq.request_type));
free(rq); free(rq);
} }

View File

@ -279,7 +279,9 @@ static int do_local_work(void *data __attribute__((unused)))
if (r) { if (r) {
u_rq->data_size = 0; u_rq->data_size = 0;
u_rq->error = r; u_rq->error = r;
kernel_send(u_rq); if (kernel_send(u_rq))
LOG_ERROR("Failed to respond to kernel [%s]",
RQ_TYPE(u_rq->request_type));
} }
break; break;