From b637b72e15a14beb83c1df2b8194e3d502cb57df Mon Sep 17 00:00:00 2001 From: Pawel Dziepak Date: Fri, 21 Feb 2014 02:48:50 +0100 Subject: [PATCH] nfs4: Notify listeners when file grows --- src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp b/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp index 643fb4659b..4801e8e575 100644 --- a/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp @@ -75,7 +75,13 @@ void MetadataCache::GrowFile(size_t newSize) { MutexLocker _(fLock); + off_t oldSize = fStatCache.st_size; fStatCache.st_size = max_c((off_t)newSize, fStatCache.st_size); + + if (oldSize != fStatCache.st_size) { + notify_stat_changed(fInode->GetFileSystem()->DevId(), fInode->ID(), + B_STAT_SIZE); + } }