Merge from develop

This commit is contained in:
Sebastian Messmer 2017-02-18 13:22:43 +00:00
commit d84e65ad76
7 changed files with 16 additions and 11 deletions

View File

@ -7,7 +7,12 @@ New Features:
Improvements: Improvements:
* Performance improvements * Performance improvements
Version 0.9.7 (unreleased) Version 0.9.8 (unreleased)
--------------
Fixed bugs:
* `du` shows correct file system size
Version 0.9.7
-------------- --------------
Compatibility: Compatibility:
* Runs on FreeBSD * Runs on FreeBSD

View File

@ -35,8 +35,8 @@ void CryOpenFile::flush() {
void CryOpenFile::stat(struct ::stat *result) const { void CryOpenFile::stat(struct ::stat *result) const {
_device->callFsActionCallbacks(); _device->callFsActionCallbacks();
_parent->statChildExceptSize(_fileBlob->key(), result);
result->st_size = _fileBlob->size(); result->st_size = _fileBlob->size();
_parent->statChildWithSizeAlreadySet(_fileBlob->key(), result);
} }
void CryOpenFile::truncate(off_t size) const { void CryOpenFile::truncate(off_t size) const {

View File

@ -56,8 +56,8 @@ public:
return _base->statChild(key, result); return _base->statChild(key, result);
} }
void statChildExceptSize(const blockstore::Key &key, struct ::stat *result) const { void statChildWithSizeAlreadySet(const blockstore::Key &key, struct ::stat *result) const {
return _base->statChildExceptSize(key, result); return _base->statChildWithSizeAlreadySet(key, result);
} }
void updateAccessTimestampForChild(const blockstore::Key &key) { void updateAccessTimestampForChild(const blockstore::Key &key) {

View File

@ -135,11 +135,11 @@ off_t DirBlob::lstat_size() const {
} }
void DirBlob::statChild(const Key &key, struct ::stat *result) const { void DirBlob::statChild(const Key &key, struct ::stat *result) const {
statChildExceptSize(key, result);
result->st_size = _getLstatSize(key); result->st_size = _getLstatSize(key);
statChildWithSizeAlreadySet(key, result);
} }
void DirBlob::statChildExceptSize(const Key &key, struct ::stat *result) const { void DirBlob::statChildWithSizeAlreadySet(const Key &key, struct ::stat *result) const {
auto childOpt = GetChild(key); auto childOpt = GetChild(key);
if (childOpt == boost::none) { if (childOpt == boost::none) {
throw fspp::fuse::FuseErrnoException(ENOENT); throw fspp::fuse::FuseErrnoException(ENOENT);

View File

@ -58,7 +58,7 @@ namespace cryfs {
void statChild(const blockstore::Key &key, struct ::stat *result) const; void statChild(const blockstore::Key &key, struct ::stat *result) const;
void statChildExceptSize(const blockstore::Key &key, struct ::stat *result) const; void statChildWithSizeAlreadySet(const blockstore::Key &key, struct ::stat *result) const;
void updateAccessTimestampForChild(const blockstore::Key &key); void updateAccessTimestampForChild(const blockstore::Key &key);

View File

@ -52,8 +52,8 @@ public:
return _base->statChild(key, result); return _base->statChild(key, result);
} }
void statChildExceptSize(const blockstore::Key &key, struct ::stat *result) const { void statChildWithSizeAlreadySet(const blockstore::Key &key, struct ::stat *result) const {
return _base->statChildExceptSize(key, result); return _base->statChildWithSizeAlreadySet(key, result);
} }
void updateAccessTimestampForChild(const blockstore::Key &key) { void updateAccessTimestampForChild(const blockstore::Key &key) {