Skip to content

squid: mds: Fix readdir when osd is full. - #65347

Open
joscollin wants to merge 2 commits into
ceph:squidfrom
joscollin:wip-72802-squid
Open

joscollin wants to merge 2 commits into
ceph:squidfrom
joscollin:wip-72802-squid

Conversation

@joscollin

Copy link
Copy Markdown
Member

@joscollin joscollin added this to the squid milestone Sep 3, 2025
@joscollin joscollin added the cephfs Ceph File System label Sep 3, 2025
@github-actions github-actions Bot added the tests label Sep 3, 2025
@joscollin

Copy link
Copy Markdown
Member Author

jenkins test make check

@joscollin

Copy link
Copy Markdown
Member Author

@batrick batrick modified the milestones: squid, v19.2.4 Mar 18, 2026
@batrick batrick modified the milestones: v19.2.4, v19.2.5 Apr 22, 2026
@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label May 14, 2026
@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-fail Release engineering: failed backport verification audit. labels May 14, 2026
@batrick batrick modified the milestones: v19.2.5, v19.2.6 Jul 21, 2026
@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Jul 21, 2026
@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. needs-rebase and removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-pass Release engineering: passed backport verification audit. labels Jul 21, 2026
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@batrick batrick modified the milestones: v19.2.7, squid Aug 26, 2026
@batrick

batrick commented Aug 26, 2026

Copy link
Copy Markdown
Member

@joscollin needs rebased

Problem:
The readdir wouldn't list all the entries in the directory
when the osd is full with rstats enabled.

Cause:
The issue happens only in multi-mds cephfs cluster. If rstats
is enabled, the readdir would request 'Fa' cap on every dentry,
basically to fetch the size of the directories. Note that 'Fa' is
CEPH_CAP_GWREXTEND which maps to CEPH_CAP_FILE_WREXTEND and is
used by CEPH_STAT_RSTAT.

The request for the cap is a getattr call and it need not go to
the auth mds. If rstats is enabled, the getattr would go with
the mask CEPH_STAT_RSTAT which mandates the requirement for
auth-mds in 'handle_client_getattr', so that the request gets
forwarded to auth mds if it's not the auth. But if the osd is full,
the indode is fetched in the 'dispatch_client_request' before
calling the  handler function of respective op, to check the
FULL cap access for certain metadata write operations. If the inode
doesn't exist, ESTALE is returned. This is wrong for the operations
like getattr, where the inode might not be in memory on the non-auth
mds and returning ESTALE is confusing and client wouldn't retry. This
is introduced by the commit 6db81d8 which fixes subvolume
deletion when osd is full.

Fix:
Fetch the inode required for the FULL cap access check for the
relevant operations in osd full scenario. This makes sense because
all the operations would mostly be preceded with lookup and load
the inode in memory or they would handle ESTALE gracefully.

Fixes: https://tracker.ceph.com/issues/72260
Introduced-by: 6db81d8
Signed-off-by: Kotresh HR <[email protected]>
(cherry picked from commit 1ca8f33)
@github-actions github-actions Bot removed the releng-audit-pass Release engineering: passed backport verification audit. label Aug 31, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added releng-audit-fail Release engineering: failed backport verification audit. and removed needs-rebase labels Aug 31, 2026
@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Oct 20, 2026
@github-actions github-actions Bot removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. labels Oct 20, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #65347 SOURCE PR SOURCE STATUS
ef0fd53 mds: Fix readdir when osd is full. PR #64663 1ca8f33 mds: Fix readdir when osd is full.
e1870a2 qa: Add test for subvolume_ls on osd full 8547e57 qa: Add test for subvolume_ls on osd full

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport e1870a2 (cherry-pick of 8547e57)

Affected File(s)

Range Diff

Click to expand
--- Original (8547e57e)
+++ Backport (e1870a28)
@@ -2,3 +2,4 @@
 
 Fixes: https://tracker.ceph.com/issues/72260
 Signed-off-by: Kotresh HR <[email protected]>
+(cherry picked from commit 8547e57ebc4022ca6750149f49b68599a8af712e)

================================================================================
RANGE DIFF
================================================================================

1:  8547e57ebc4 ! 1:  e1870a28e09 qa: Add test for subvolume_ls on osd full
    @@ Commit message
     
         Fixes: https://tracker.ceph.com/issues/72260
         Signed-off-by: Kotresh HR <[email protected]>
    +    (cherry picked from commit 8547e57ebc4022ca6750149f49b68599a8af712e)
     
      ## qa/cephfs/clusters/1-node-1-mds-1-osd.yaml => qa/cephfs/clusters/1-node-4-mds-1-osd.yaml ##
     @@
    @@ qa/suites/fs/full/tasks/mgr-osd-full.yaml
     @@ qa/suites/fs/full/tasks/mgr-osd-full.yaml: tasks:
          clients:
            client.0:
    -         - fs/full/subvolume_snapshot_rm.sh
    +         - fs/full/subvol_rm_retained_snap_when_cluster_is_full.sh
     +- workunit:
     +    cleanup: true
     +    clients:

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System needs-qa releng-audit-fail Release engineering: failed backport verification audit. tests wip-jcollin-testing-squid6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants