nfs4: Notify listeners when file grows

This commit is contained in:
Pawel Dziepak 2014-02-21 02:48:50 +01:00
parent 90213f44ac
commit b637b72e15

View File

@ -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);
}
}