Project

General

Profile

Feature #38849

mds: proactively merge orphaned inodes into a remaining parent after deleting primary hard link

Added by Greg Farnum 6 months ago. Updated 6 months ago.

Status:
Duplicate
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

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

Description

https://www.mail-archive.com/ceph-users@lists.ceph.com/msg53368.html

While we move an unlinked file into the stray directory, we don't actually delete it if the inode has remaining hard links to other dentries.
Unfortunately, we also don't do anything to proactively re-link the inode into one of its remaining dentries, so it potentially takes up a spot in the stray directory forever. This can lead to denied deletes and the filesystem user has no obvious reason why!

We need some way of proactively finding the remaining parents and merging stray inodes back in-tree even if they're not touched from the other side.


Related issues

Duplicates fs - Feature #20196: mds: early reintegration of strays on hardlink deletion New

History

#1 Updated by Greg Farnum 6 months ago

Sage suggests that forward scrub probably touches the remote hard link locations enough to force re-integrating the stray, and I suspect that's correct.

Of course it requires scrub to actually be run, which we don't do proactively at this time. And even if we did run it automatically, users could do unlinks faster than the scrub can find remote links to pull them out of the stray dir.

#2 Updated by Patrick Donnelly 6 months ago

  • Subject changed from MDS needs to proactively merge orphaned inodes into a remaining parent after deleting primary hard link to mds: proactively merge orphaned inodes into a remaining parent after deleting primary hard link
  • Start date deleted (03/22/2019)
  • Source set to Development

Another approach may be to allow the stray directory to fragment. Are there any downsides to doing that?

#3 Updated by Patrick Donnelly 6 months ago

  • Status changed from New to Duplicate

#4 Updated by Patrick Donnelly 6 months ago

  • Duplicates Feature #20196: mds: early reintegration of strays on hardlink deletion added

Also available in: Atom PDF