Commit 4bd28bde authored by Alexander Saoutkin's avatar Alexander Saoutkin Committed by Fabian Vogt

Don't change file size overzealously

parent 61a7d1db
......@@ -1054,7 +1054,8 @@ void KIOFuseVFS::write(fuse_req_t req, fuse_ino_t ino, const char *buf, size_t s
}
remoteNode->m_cacheSize = std::max(remoteNode->m_cacheSize, off_t(offset + size));
remoteNode->m_stat.st_size = remoteNode->m_cacheSize;
// Don't set it to a lower value, in case the cache is incomplete
remoteNode->m_stat.st_size = std::max(remoteNode->m_stat.st_size, remoteNode->m_cacheSize);
// Update [cm] time as without writeback caching,
// the kernel doesn't do this for us.
clock_gettime(CLOCK_REALTIME, &remoteNode->m_stat.st_mtim);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment