mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user