mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +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
Notes:
sideshowbarker
2024-07-18 21:43:04 +09:00
Author: https://github.com/awesomekling
Commit: 2871df6f0d
6 changed files with 0 additions and 69 deletions
|
@ -889,7 +889,6 @@ ssize_t Ext2FSInode::write_bytes(off_t offset, ssize_t count, const UserOrKernel
|
|||
bool allow_cache = !description || !description->is_direct();
|
||||
|
||||
const size_t block_size = fs().block_size();
|
||||
u64 old_size = size();
|
||||
u64 new_size = max(static_cast<u64>(offset) + count, (u64)size());
|
||||
|
||||
auto resize_result = resize(new_size);
|
||||
|
@ -930,10 +929,6 @@ ssize_t Ext2FSInode::write_bytes(off_t offset, ssize_t count, const UserOrKernel
|
|||
}
|
||||
|
||||
dbgln_if(EXT2_VERY_DEBUG, "Ext2FS: After write, i_size={}, i_blocks={} ({} blocks in list)", m_raw_inode.i_size, m_raw_inode.i_blocks, m_block_list.size());
|
||||
|
||||
if (old_size != new_size)
|
||||
inode_size_changed(old_size, new_size);
|
||||
inode_contents_changed(offset, count, data);
|
||||
return nwritten;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue