mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:58:10 +00:00
Kernel: Stop trying to keep InodeVMObject in sync with disk changes
As it turns out, Dr. POSIX doesn't require that post-mmap() changes to a file are reflected in the memory mappings. So we don't actually have to care about the file size changing (or the contents.) IIUC, as long as all the MAP_SHARED mappings that refer to the same inode are in sync, we're good. This means that VMObjects don't need resizing capabilities. I'm sure there are ways we can take advantage of this fact.
This commit is contained in:
parent
9547846a18
commit
2871df6f0d
6 changed files with 0 additions and 69 deletions
|
@ -137,20 +137,6 @@ void Inode::will_be_destroyed()
|
|||
flush_metadata();
|
||||
}
|
||||
|
||||
void Inode::inode_contents_changed(off_t offset, ssize_t size, const UserOrKernelBuffer& data)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
if (auto shared_vmobject = this->shared_vmobject())
|
||||
shared_vmobject->inode_contents_changed({}, offset, size, data);
|
||||
}
|
||||
|
||||
void Inode::inode_size_changed(size_t old_size, size_t new_size)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
if (auto shared_vmobject = this->shared_vmobject())
|
||||
shared_vmobject->inode_size_changed({}, old_size, new_size);
|
||||
}
|
||||
|
||||
int Inode::set_atime(time_t)
|
||||
{
|
||||
return -ENOTIMPL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue