Skip to content

mds: include cleanup - #62870

Merged
MaxKellermann merged 41 commits into
ceph:mainfrom
MaxKellermann:mds_includes
Apr 22, 2025
Merged

MaxKellermann merged 41 commits into
ceph:mainfrom
MaxKellermann:mds_includes

Conversation

@MaxKellermann

Copy link
Copy Markdown
Member

Another PR split from #60490

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
This avoids the heavy include in a commonly used header.

Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
By un-inlining the constructor and destructor, the header dependency
on "common/bloom_filter.hpp" can be eliminated.

Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Mutation.h and SimpleLock.h have a circular dependency and we have to
resolve it using forward-declarations.  To make that possible, move
print() to Mutation.cc.

Signed-off-by: Max Kellermann <[email protected]>
Un-inline the destructor to eliminate a few more dependencies from the
public header.

Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Defaulting a `MDRequestRef` parameter works only if the type is fully
defined and thus disallows forward declarations.

Signed-off-by: Max Kellermann <[email protected]>
Commit e8bc284 added a forward declaration for `MutationRef` but
that doesn't work as long as the header constructs and destructs
instances, causing errors such as:

 build/debug/boost/include/boost/smart_ptr/intrusive_ptr.hpp: In instantiation of ‘boost::intrusive_ptr<T>::~intrusive_ptr() [with T = MutationImpl]’:
 src/mds/SimpleLock.h:424:5:   required from here
   424 |     ceph_assert(!get_xlock_by());
       |                  ~~~~~~~~~~~~^~
 build/debug/boost/include/boost/smart_ptr/intrusive_ptr.hpp:100:44: error: ‘intrusive_ptr_release’ was not declared in this scope; did you mean ‘ceph::common::intrusive_ptr_release’?
   100 |         if( px != 0 ) intrusive_ptr_release( px );
       |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~
       |                       ceph::common::intrusive_ptr_release

This never occurred previously because `Mutation.h` happened to be
already included by somebody else.

Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
Prepare for eliminating the header dependency on MDSContext.h.

Signed-off-by: Max Kellermann <[email protected]>
@github-actions github-actions Bot added the cephfs Ceph File System label Apr 17, 2025

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

@MaxKellermann

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

@batrick

batrick commented Apr 21, 2025

Copy link
Copy Markdown
Member

@MaxKellermann

Copy link
Copy Markdown
Member Author

@MaxKellermann
MaxKellermann merged commit 06b6b33 into ceph:main Apr 22, 2025
@MaxKellermann
MaxKellermann deleted the mds_includes branch April 22, 2025 15:28
joscollin pushed a commit to joscollin/ceph that referenced this pull request Apr 24, 2026
Fixes: https://tracker.ceph.com/issues/70723
Signed-off-by: Milind Changire <[email protected]>
(cherry picked from commit fe3b415)

Conflicts:
	src/mds/CDentry.h
	src/mds/CDir.h
	src/mds/CInode.h
	src/mds/LogEvent.h
	src/mds/MDCache.cc
	src/mds/MDCache.h
	src/mds/MDLog.h
	src/mds/MDSTableClient.h
	src/mds/Migrator.h
	src/mds/Mutation.h
	src/mds/Server.h
        - Conflicts due to Max Kellermann's cleanup PRs in main not being backported to squid.
        - mainly ceph#61682 and ceph#62870
mkogan1 pushed a commit to mkogan1/ceph that referenced this pull request Jun 10, 2026
Resolves: IBMCEPH-14093

Fixes: https://tracker.ceph.com/issues/70723
Signed-off-by: Milind Changire <[email protected]>
(cherry picked from commit fe3b415)

Conflicts:
	src/mds/CDentry.h
	src/mds/CDir.h
	src/mds/CInode.h
	src/mds/LogEvent.h
	src/mds/MDCache.cc
	src/mds/MDCache.h
	src/mds/MDLog.h
	src/mds/MDSTableClient.h
	src/mds/Migrator.h
	src/mds/Mutation.h
	src/mds/Server.h
	- Conflicts due to Max Kellermann's cleanup PRs in main not being backported to squid.
	- mainly ceph#61682 and ceph#62870

(cherry picked from commit 0c4e6f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants