Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@joka921
Copy link

@joka921 joka921 commented Oct 22, 2019

-Store File/Dir Metadata (everything retrieved by stat()) in the respective FsBlobs (previously : stored in parent directory)

  • Adapted all Filesystem operations to this new format and adapted all test cases.

  • Added locking in the FsBlobView class for all operations that update the metadata

  • Implemented link() to create hardlinks and adapted unlink() to the concept of hardlinks.

  • For directories, the number of nlinks is the number of children + 2 (for . and ..) as usual in POSIX.

  • Added / extended test cases for the correct creation/deletion of hard links.

  • Updated the implementation of rename : we are only allowed to rename a dir to another existing directory`s name if that target directory is empty.

  • Several refactorings: Removed now unused functions and added suggestions from ClangTidy.

  • TODO: Thorough self and external review + possibly More test cases

  • Implement relatime / noatime

  • Do we need an "atomic" rename, that first increases the link count by one, then does the rename and then decreases it again? This would require a link() and unlink() without updating access times.

-Store File/Dir Metadata (everything retrieved by `stat()`) in the respective FsBlobs (previously : stored in parent directory)
- Adapted all Filesystem operations to this new format and adapted all test cases.
- Added locking in the `FsBlobView` class for all operations that update the metadata
- Implemented `link()` to create hardlinks and adapted `unlink()` to the concept of hardlinks.
- For directories, the number of `nlinks` is the number of children + 2 (for `.` and `..`) as usual in POSIX.
- Added / extended test cases for the correct creation/deletion of hard links.
- Updated the implementation of `rename` : we are only allowed to rename a `dir` to another existing directory`s name if that target directory is empty.
- Several refactorings: Removed now unused functions and added suggestions from ClangTidy.

- TODO: Thorough self and external review + possibly More test cases
- Implement relatime / noatime
- Do we need an "atomic" rename, that first increases the link count by one, then does the rename and then decreases it again? This would require a `link()` and `unlink()` without updating access times.
@joka921 joka921 force-pushed the f.hardlinksProperly branch from 808ac6e to a88ac87 Compare October 22, 2019 15:07
# Conflicts:
#	src/cryfs/impl/filesystem/CryDir.cpp
#	src/fspp/fs_interface/Dir.h
#	src/fspp/fstest/FsppDirTest.h
#	src/fspp/fstest/FsppNodeTest_Rename.h
#	test/fspp/fuse/readDir/testutils/FuseReadDirTest.cpp
#	test/fspp/testutils/FuseTest.h
@smessmer
Copy link
Member

smessmer commented Nov 7, 2019

Cool, thanks for implementing this. Let me know when you think this is ready for review, I can take a look then. Note that there have been some changes in the develop branch since you created this PR and they probably affect you.

  • CryFS now uses Conan to install dependencies
  • atime/relatime/noatime/strictatime/diratime mount options have been implemented

@smessmer
Copy link
Member

Are you still working on this?

@func0der
Copy link

@joka921 Hey. Thanks for your work.
Any plans on finishing the implementation? :)
I know there are some people from #44 out there counting on you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants