Cleanup #4262
closedlibceph: drop redundant page info assignments
0%
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.)
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.
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()
Updated by Ian Colle about 11 years ago
- Status changed from 4 to Fix Under Review
Updated by Sage Weil about 11 years ago
- Status changed from Fix Under Review to Resolved
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