dm log userspace: trap all errors from failed log construction
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.
Signed-off-by Jonathan Brassow <[email protected]>
Signed-off-by Mike Snitzer <[email protected]>
--- 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
@@ -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