Project

General

Profile

Actions

Bug #4762

closed

libceph: fix two messenger bugs

Added by Alex Elder about 11 years ago. Updated about 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

While getting copyup functionality working I found two
bugs in the messenger that previously were not triggered.

- In ceph_msg_data_pagelist_cursor_init(), the cursor's
last_piece field was being checked against the length
supplied. This was OK until this commit:
ccba6d98 libceph: implement multiple data items in a message
That commit changed the cursor init routines to allow
lengths to be supplied that exceeded the size of the
current data item. Because of this, we have to use
the assigned cursor resid field rather than the provided
length in determining whether the cursor points to the
last piece of a data item.
- In ceph_msg_data_add_pages(), a BUG_ON() was erroneously
catching attempts to add page data to a message if the
message already had data assigned to it. That was OK
until that same commit, at which point it was fine for
messages to have multiple data items. It slipped through
because that BUG_ON() call was present twice in that
function. (You can never be too careful.)

In addition there are two other minor changes:
- In ceph_msg_data_cursor_init(), the local variable "data"
was getting assigned twice.
- In ceph_msg_data_advance(), it was assumed that the
type-specific advance routine would set new_piece to true
after it advanced past the last piece. That may have been
fine, but since we check for that case we might as well
set it explicitly in ceph_msg_data_advance().

Actions #1

Updated by Alex Elder about 11 years ago

  • Status changed from In Progress to Fix Under Review

The following has been posted for review:

[PATCH] libceph: fix two messenger bugs

Actions #2

Updated by Alex Elder about 11 years ago

  • Status changed from Fix Under Review to Resolved

The following has been committed to the ceph-client "testing"
branch:

68423cc libceph: fix two messenger bugs

Actions

Also available in: Atom PDF