Project

General

Profile

Actions

Bug #70794

closed

mds: use subvolume directory snap realm for COW'ing old_inodes

Added by Venky Shankar 12 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Urgent
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Development
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Tags (freeform):
snaprealm, old_inode, read-only
Fixed In:
v20.3.0-1843-g82603e90ea
Released In:
Upkeep Timestamp:
2025-07-24T05:09:22+00:00

Description

This proposal is for working around https://tracker.ceph.com/issues/67102 ("mds: read-only file system due to large old_inodes"). Since hardlnks are disallowed across cephfs subvolumes (directory marked with ceph.dir.subvolume) xattr, it would suffice to use the sequence number of the subvolume directory snaprealm when deciding to COW old_inodes for files under the subvolume. The function of interest is MDCache::predirty_journal_parents() which traverse from the leaf inode to the root and for each ancestor path calls CInode::pre_cow_old_inode(). Currently, CInode::pre_cow_old_inode() uses the global snaprealm sequence number for deciding to COW the old_inode. So, for ancestors path component under the cephfs subvolume directory, use the subvolume directory snaprealm sequence number and once "outside" the subvolume directory, fallback using the global snaprealm sequence number. This would workaround the bug for users using the file system purely in subvolume mode, and preserve status-quo behaviour of others. Also, close the loop by disallowing marking a directory as a subvolume if the directory has existing files. This is bug BTW.

For now, it doesn't look like this functionality should be optional and only be enabled via a config switch - let's reassess that once we run tests and experiments.


Related issues 1 (1 open0 closed)

Related to CephFS - Bug #67102: mds: read-only file system due to large old_inodesIn ProgressVenky Shankar

Actions
Actions #1

Updated by Venky Shankar 12 months ago

  • Related to Bug #67102: mds: read-only file system due to large old_inodes added
Actions #2

Updated by Kotresh Hiremath Ravishankar 12 months ago

  • Pull request ID set to 62682
Actions #3

Updated by Kotresh Hiremath Ravishankar 9 months ago

  • Backport deleted (squid)
Actions #4

Updated by Patrick Donnelly 9 months ago

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

Updated by Venky Shankar 8 months ago

  • Status changed from In Progress to Resolved
  • Target version set to v21.0.0

Not a bckport candidate as this change is an optimization for a pure subvolume file system use.

Actions #6

Updated by Upkeep Bot 8 months ago

  • Merge Commit set to 82603e90ea8effa303e3dd68233e19628cfe81e1
  • Fixed In set to v20.3.0-1843-g82603e90ea
  • Upkeep Timestamp set to 2025-07-24T05:09:22+00:00
Actions

Also available in: Atom PDF