Project

General

Profile

Actions

Bug #10164

closed

Dirfrag objects for deleted dir not purged until MDS restart

Added by John Spray over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Seen while playing with the #9881 flush functionality: the dirfrag objects for deleted directories are never cleaned up after the directory is unlinked.

On a fresh vstart FS client mount:
$ mkdir alpha
$ rmdir alpha
$ sync

./ceph daemon mds.a flush journal
./rados -p cephfs_metadata ls | grep 10000000000
10000000000.00000000

...the object is still there for the dirfrag (including after waiting a while).

Restart the MDS, and the object is removed during MDCache::scan_stray_dir.

The log output from eval_stray indicates it's failing the in->dirfrags.empty() condition.

There is also another case where if there was a child file, and the client still holds the cap for the directory it just deleted (as the fuse client does), eval_stray fails on the in->is_any_caps condition.

Actions

Also available in: Atom PDF