Project

General

Profile

Actions

Cleanup #26960

open

mds: avoid modification of const Messages

Added by Patrick Donnelly over 5 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Category:
Correctness/Safety
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Component(FS):
MDS
Labels (FS):
Pull request ID:

Description

PR #22555 (https://github.com/ceph/ceph/pull/22555/) converted all Message handling to use const to avoid potential errors with re-processing messages that have been changed elsewhere or (in the future) by another thread.

There were a few instances which were not resolved in the interest of getting #22555 done:

~/ceph/src/messages$ git grep mutable
MClientRequest.h:  mutable struct ceph_mds_request_head head; /* XXX HACK! */
MClientRequest.h:    mutable ceph_mds_request_release item;
MClientRequest.h:  mutable vector<Release> releases; /* XXX HACK! */
MClientRequest.h:  mutable bool queued_for_replay = false;
MDirUpdate.h:  mutable int tried_discover = 0; // XXX HACK
MMDSSlaveRequest.h:  mutable __u16 flags; /* XXX HACK for mark_interrupted */
MMDSSlaveRequest.h:  mutable bufferlist straybl;  // stray dir + dentry

Mostly, these are state the MDS uses when reprocessing a Message (after acquiring locks for instance). The MDS should split this state off into a Context and keep the Message purely const.


Related issues 1 (0 open1 closed)

Related to CephFS - Bug #24306: mds: use intrusive_ptr to manage Message life-timeResolvedPatrick Donnelly

Actions
Actions #1

Updated by Patrick Donnelly over 5 years ago

  • Tracker changed from Bug to Cleanup
Actions #2

Updated by Patrick Donnelly over 5 years ago

  • Related to Bug #24306: mds: use intrusive_ptr to manage Message life-time added
Actions #3

Updated by Patrick Donnelly about 5 years ago

  • Target version changed from v14.0.0 to v15.0.0
Actions #4

Updated by Patrick Donnelly about 5 years ago

  • Target version deleted (v15.0.0)
Actions #5

Updated by Patrick Donnelly almost 3 years ago

  • Priority changed from High to Normal
  • Target version set to v17.0.0
Actions #6

Updated by Ramana Raja over 2 years ago

  • Assignee set to Ramana Raja
Actions #7

Updated by Patrick Donnelly almost 2 years ago

  • Target version deleted (v17.0.0)
Actions #8

Updated by Venky Shankar over 1 year ago

  • Assignee changed from Ramana Raja to Neeraj Pratap Singh

Neeraj, please take this one.

Actions

Also available in: Atom PDF