* Fixed (or rather, worked around) a deadlock in the VM: when a file was
resized but still had dirty pages to be written back, vm_cache_resize() (which is called with the inode lock being held) deadlocked with the page writer. * Now, I reintroduced busy_writing: it'll be set by everything that writes back pages (vm_page_write_modified(), and the page writer), and will be checked for in vm_cache_resize() - other functions are not affected for now, AFAICT. * vm_cache_resize() will clear that flag, and the writer will check it again after it wrote back the page (which will fail when it's outside the file bounds), and if it's cleared, it will get rid of the page (if the file has been resized again in the mean time, writing it will succeed then, and we'll keep the page around). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23334 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -100,6 +100,7 @@ struct vm_page {
|
||||
|
||||
uint8 is_cleared : 1;
|
||||
// is currently only used in vm_page_allocate_page_run()
|
||||
uint8 busy_writing : 1;
|
||||
|
||||
uint16 wired_count;
|
||||
int8 usage_count;
|
||||
|
||||
Reference in New Issue
Block a user