dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: agk@redhat.com
Cc: dm-devel@redhat.com
Subject: [PATCH v2 1/4] dm log userspace: trap all errors from failed log construction
Date: Fri,  3 Dec 2010 18:12:47 -0500	[thread overview]
Message-ID: <1291417970-5626-2-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1291417970-5626-1-git-send-email-snitzer@redhat.com>

From: Jonathan Brassow <jbrassow@redhat.com>

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

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
 drivers/md/dm-log-userspace-base.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-log-userspace-base.c b/drivers/md/dm-log-userspace-base.c
index 1ed0094..ae7aa4b 100644
--- a/drivers/md/dm-log-userspace-base.c
+++ b/drivers/md/dm-log-userspace-base.c
@@ -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;
 	}
 
-- 
1.7.2.3

  reply	other threads:[~2010-12-03 23:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 23:12 [PATCH v2 0/4] dm log userspace: a fix and other improvements Mike Snitzer
2010-12-03 23:12 ` Mike Snitzer [this message]
2010-12-03 23:12 ` [PATCH v2 2/4] dm log userspace: split flush queue Mike Snitzer
2010-12-03 23:12 ` [PATCH v2 3/4] dm log userspace: group clear and mark requests Mike Snitzer
2010-12-03 23:12 ` [PATCH v2 4/4] dm log userspace: add version number to communication structure Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291417970-5626-2-git-send-email-snitzer@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).