Project

General

Profile

Bug #58185

flatten swallows EINVAL errors (goes for other maintenance ops/other errors as well)

Added by Ilya Dryomov about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This became noticeable with the new encryption-aware flatten code which can return EINVAL error from many different places (e.g. luks::Magic methods).

  r = invoke_async_request(OPERATION_FLATTEN,
                           exclusive_lock::OPERATION_REQUEST_TYPE_GENERAL,
                           false,
                           boost::bind(&Operations<I>::execute_flatten, this,
                                       boost::ref(prog_ctx), _1),
                           boost::bind(&ImageWatcher<I>::notify_flatten,
                                       m_image_ctx.image_watcher, request_id,
                                       boost::ref(prog_ctx), _1));

  if (r < 0 && r != -EINVAL) {
    return r;
  }
  ldout(cct, 20) << "flatten finished" << dendl;
  return 0;

With commit 96bc20445afb ("librbd: track complete async operation return code") in place, this should be vestigial and can probably just be removed.

Also available in: Atom PDF