Skip to contentSkip to conversation

dm log userspace: trap all errors from failed log construction

PATCH RESEND New Mike Snitzer 1 participant 1 message Dec 9, 2010 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/4 dm log userspace: trap all errors from failed log construction

From: Jonathan Brassow <[email protected]>

When constructing a mirror log, it is possible for the initial request to fail for other reasons besides -ESRCH. These must be handled too.

---
 drivers/md/dm-log-userspace-base.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

NOTE: resending in attempt to get this in patchwork

drivers/md/dm-log-userspace-base.c +5 -2
index 1ed0094..ae7aa4b 100644
@@ -181,8 +181,11 @@ static int userspace_ctr(struct dm_dirty_log *log, struct dm_target *ti,
 	r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_CTR,
 				 ctr_str, str_size, NULL, NULL);
 
-	if (r == -ESRCH) {
-		DMERR("Userspace log server not found");
+	if (r < 0) {
+		if (r == -ESRCH)
+			DMERR("Userspace log server not found");
+		else
+			DMERR("Userspace log server failed to create log");
 		goto out;
 	}
 
Signature · 1 line
1.7.2.3