Project

General

Profile

Actions

Bug #4802

closed

krbd: walk through error paths and fix them

Added by Alex Elder about 11 years ago. Updated almost 11 years ago.

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

0%

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

Description

I have encountered a few places where the kernel rbd
code does not handle error conditions exactly right.
There appears to be handling in place for almost
all possible errors, but in a few cases I've seen
they should be changed or rearranged in order to
correctly clean up after errors.

This could be ongoing, but I'd like to get as many
done as I can before the end of this sprint.


Related issues 2 (0 open2 closed)

Related to rbd - Bug #4800: krbd: avoid dropping extra reference in rbd_free_disk()ResolvedAlex Elder04/23/2013

Actions
Related to rbd - Bug #4803: krbd: memory leaks while testing layered imagesResolvedAlex Elder04/24/2013

Actions
Actions #1

Updated by Alex Elder about 11 years ago

  • Project changed from Ceph to rbd
  • Target version deleted (v0.62a)

Fixed project.

Actions #2

Updated by Alex Elder about 11 years ago

I think it may be hard to describe exactly what the problems
of this type are. I do a fairly good job of it in the patch
descriptions though, and it would be nice if I could simply
refer to those for further information.

Anyway, one of the things I'm doing as I review the code is
making sure functions never change any externally-visible
state until/unless they are going to return success. These
are very minor changes--in a lot of cases just holding values
in local variables until we know we'll succeed and then making
externally-visible assignments from the locals after that.
That sort of fits here, so I guess I'll try to record things
of that type here as I find them.

I just posted a series of patches for review, and at least one
of them (3/6) is of that type.

[PATCH 1/6] rbd: fix leak of snapshots during initial probe
[PATCH 2/6] rbd: make snap_size order parameter optional
[PATCH 3/6] rbd: only update values on snap_info success
[PATCH 4/6] rbd: rename __rbd_add_snap_dev()
[PATCH 5/6] rbd: fix leak of format 2 snapshot names
[PATCH 6/6] rbd: use rbd_obj_method_sync() return value

I also mention these patches in and marked "need review"
this issue: http://tracker.ceph.com/issues/4802

Actions #3

Updated by Alex Elder almost 11 years ago

  • Status changed from In Progress to Resolved

This code walk-through process is and will be ongoing.
I have committed all the patches mentioned above, and
I'm basically done preparing everything for the 3.10
pull request to Linus.

So I'm going to just mark this resolved. If/when I
find other bugs as I look things over I'll open up
new, more focused bugs.

Actions

Also available in: Atom PDF