Set cache entry to dirty when timestamps are changed. Otherwise, it wouldn't be written back.

This commit is contained in:
Sebastian Messmer 2016-06-09 17:32:35 -07:00
parent da187e3142
commit c5ccd9c2d1
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@ CryOpenFile::~CryOpenFile() {
void CryOpenFile::flush() {
_device->callFsActionCallbacks();
_fileBlob->flush();
_parent->flush();
}
void CryOpenFile::stat(struct ::stat *result) const {
@ -59,6 +60,7 @@ void CryOpenFile::write(const void *buf, size_t count, off_t offset) {
void CryOpenFile::fsync() {
_device->callFsActionCallbacks();
_fileBlob->flush();
_parent->flush();
}
void CryOpenFile::fdatasync() {

View File

@ -161,11 +161,13 @@ void DirBlob::statChildExceptSize(const Key &key, struct ::stat *result) const {
void DirBlob::updateAccessTimestampForChild(const Key &key) {
std::unique_lock<std::mutex> lock(_mutex);
_entries.updateAccessTimestampForChild(key);
_changed = true;
}
void DirBlob::updateModificationTimestampForChild(const Key &key) {
std::unique_lock<std::mutex> lock(_mutex);
_entries.updateModificationTimestampForChild(key);
_changed = true;
}
void DirBlob::chmodChild(const Key &key, mode_t mode) {