Project

General

Profile

Actions

Cleanup #4262

closed

libceph: drop redundant page info assignments

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

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

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

In calc_layout(), there are some assignments to osd request
fields r_num_pages and r_page_alignment. These assignments
turn out to be immediately reassigned in the caller, so they
are unnecessary. They also could be assigning a different
value than is assigned in the caller, so the assignment here
makes things confusing.

Clean up that bit of code and get rid of the redundant
assingmnents.

(This work is already done, basically, I've just decided
it's worth keeping and I'm posting it for review.)

Actions #1

Updated by Alex Elder about 11 years ago

Three patches implement this change. The net result is
that calc_layout() becomes focused only on filling in the
osd op it is provided the the object-relative offset and
length, the object truncate size, and (for a write operation)
the payload length. It returns to the caller the object
number based on the file layout, and informs the caller if
the length of the request has been truncated because it
exceeded the size of the target object.

The caller is then responsible for formatting the name of
the object in the osd request.

Actions #2

Updated by Alex Elder about 11 years ago

  • Status changed from In Progress to 4

These patches have been posted for review (marking
this "Feedback").

[PATCH 0/3] libceph: focus calc_layout() on filling in the osd op
[PATCH 1/3] libceph: pass object number back to calc_layout() caller
[PATCH 2/3] libceph: format target object name in caller
[PATCH 3/3] libceph: don't pass request to calc_layout()

Actions #3

Updated by Ian Colle about 11 years ago

  • Status changed from 4 to Fix Under Review
Actions #4

Updated by Ian Colle about 11 years ago

  • Target version set to v0.59
Actions #5

Updated by Sage Weil about 11 years ago

  • Status changed from Fix Under Review to Resolved
Actions #6

Updated by Alex Elder about 11 years ago

These have been committed.

5038c43 libceph: don't pass request to calc_layout()
3ed9489 libceph: format target object name in caller
d21e431 libceph: pass object number back to calc_layout() caller

Actions

Also available in: Atom PDF