Project

General

Profile

Bug #43644

mds: Empty directory check is done on the importer side (at import finish) during migration

Added by Sidharth Anupkrishnan 2 months ago. Updated about 1 month ago.

Status:
Rejected
Priority:
Urgent
Category:
Performance/Resource Usage
Target version:
% Done:

0%

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

Description

In the current MDS code, the migration of empty directories is prohibited but it is actually exported during the migration process and a check on the importer side during import_finish() (https://github.com/ceph/ceph/blob/master/src/mds/Migrator.cc#L3175) determines whether the directory empty and if so exports it back to the original exporter.

Why is this check not done on the exporter side? We can avoid unnecessary round trips between the exporter and the importing mds.

History

#1 Updated by Sidharth Anupkrishnan 2 months ago

  • Component(FS) MDS added

#2 Updated by Sidharth Anupkrishnan 2 months ago

Sidharth Anupkrishnan wrote:

In the current MDS code, the migration of empty directories is prohibited but it is actually exported during the migration process and a check on the importer side during import_finish() (https://github.com/ceph/ceph/blob/master/src/mds/Migrator.cc#L3175) determines whether the directory empty and if so exports it back to the original exporter.

Why is this check not done on the exporter side? We can avoid unnecessary round trips between the exporter and the importing mds.

Zheng and Patrick. Please take a look

#3 Updated by Zheng Yan 2 months ago

you are right. we can do the check a export_dir and export_frozen. If directory is empty, abort. But we still need to consider export_pin

#4 Updated by Patrick Donnelly 2 months ago

Zheng Yan wrote:

you are right. we can do the check a export_dir and export_frozen. If directory is empty, abort. But we still need to consider export_pin

As I discussed with Sidharth, it appears to me the prohibition on exporting empty directories is just a premature optimization to prevent moving metadata unnecessarily. I think it does make sense for a pinned directory. I'm suggesting we just undo this restriction entirely.

Sidharth, please submit a PR when you have time.

#5 Updated by Patrick Donnelly 2 months ago

  • Status changed from New to Triaged
  • Assignee set to Sidharth Anupkrishnan
  • Priority changed from Normal to Urgent
  • Target version set to v15.0.0
  • Source set to Development
  • Backport set to nautilus

#6 Updated by Patrick Donnelly 2 months ago

  • Status changed from Triaged to Fix Under Review
  • Backport deleted (nautilus)
  • Pull request ID set to 32792

#7 Updated by Patrick Donnelly about 1 month ago

  • Status changed from Fix Under Review to Rejected

Also available in: Atom PDF