Project

General

Profile

Actions

Bug #3268

closed

osd: localize reads handling is incorrect

Added by Josh Durgin over 11 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
OSD
Target version:
-
% Done:

0%

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

Description

Found by code inspection when changing the way MOSDOp->rmw_flags is populated.
The only place that checks for CEPH_OSD_FLAG_LOCALIZE_READS is in ReplicatedPG on an error condition.
rmw_flags is checked for CEPH_OSD_FLAG_LOCALIZE_READS, but rmw_flags is cleared by OSD::init_osd_op_flags so it cannot include this flag.
From the history I can't see this check ever being reachable.

rmw_flags should just be used by OSD internal flags. The flags given by the client should be checked for CEPH_OSD_FLAG_LOCALIZE_READS instead.
Additionally, if the client does not set CEPH_OSD_FLAG_LOCALIZE_READS on an op, the OSD should reject it if it is not the primary.
Tests should be added for each of these cases.

Actions

Also available in: Atom PDF