MR proposes a rename approach using the existing SYMLINK architecture.
HAS_RENAMEdirective enables the needed code and checks.
- We use the block count in the metadata (disabled by default) to store a -1 if the file is renamed.
- We use the target_path of the symlink architecture (without the IS_LINK flag) to store the original file path.
- All the renamed files can't be used (metadata exists but they are not accessible again)
The approach needs a redirection, so a decrease in the performance of the renamed files operations are expected. A new RPC, adding create and update metadata can increase the rename speed.
MDTest benchmark that includes a rename operation works.
Tests are included in the MR.
The rename works in a chain of renames (filea->b->c->d).
Enable the filea->fileb to fileb->filea rename. We should check the target_path.
Truncate operation works.
Lseek operation works (All ops should work now, if they use open)
Conditional testing when rename is enabled.
HAS_RENAME is enabled we check for blocks and target_path in some operations, there are some operations that are not implemented or tested yet.
Introducing the rename check in the get_metadata function reduces modifications along the code, but needs extra parameters similar to the follow_links feature. For now, we consider rename operation as an extra operation that should not be used as default (due to all performance implications). All operations that go thru the open call should work.
It solves #212 (closed)