Project

General

Profile

Actions

Bug #4402

closed

libceph: no need to clear bio_iter field any more

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

This became obvious as I was refactoring some messenger
code in order to support multiple sources of data (4125).

I'm about to post this for review.

libceph: don't clear bio_iter in prepare_write_message()

At one time it was necessary to clear a message's bio_iter field to
avoid a bad pointer dereference in write_partial_msg_pages().

That no longer seems to be the case. Here's why.

The message's bio fields represent (in this case) outgoing data.
Between where the bio_iter is made NULL in prepare_write_message()
and the call in that function to prepare_message_data(), the
bio fields are never used.

In prepare_message_data(), init-bio_iter() is called, and the result
of that overwrites the value in the message's bio_iter field.

Because it gets overwritten anyway, there is no need to set it to
NULL. So don't do it.

Signed-off-by: Alex Elder <>

Actions #1

Updated by Alex Elder about 11 years ago

  • Status changed from In Progress to Fix Under Review

This has been posted for review:

[PATCH] libceph: don't clear bio_iter in prepare_write_message()

Actions #2

Updated by Alex Elder about 11 years ago

  • Status changed from Fix Under Review to Resolved

Josh reviewed this and it has been committed to the testing branch.
b0e22c9 libceph: don't clear bio_iter in prepare_write_message()

Actions

Also available in: Atom PDF