summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/pager.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index bab2e791..a1066223 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -114,6 +114,8 @@ file_pager_read_page (struct node *node, vm_offset_t page,
return 0;
}
+ *writelock = 0;
+
if (page >= node->allocsize)
{
err = EIO;
@@ -130,6 +132,8 @@ file_pager_read_page (struct node *node, vm_offset_t page,
if (err)
break;
+ RECORD_LAST (&node->dn, LAST_READ, page);
+
if (block != pending_blocks + num_pending_blocks)
{
err = do_pending_reads ();
@@ -280,6 +284,9 @@ file_pager_write_page (struct node *node, vm_offset_t offset, vm_address_t buf)
err = find_block (node, offset, &block, &lock);
if (err)
break;
+
+ RECORD_LAST (&node->dn, LAST_WRITE, offset);
+
assert (block);
pending_blocks_add (&pb, block);
offset += block_size;
@@ -418,6 +425,8 @@ pager_unlock_page (struct user_pager_info *pager, vm_offset_t page)
rwlock_writer_lock (&dn->alloc_lock);
+ RECORD_LAST (dn, LAST_UNLOCK, page);
+
partial_page = (page + vm_page_size > node->allocsize);
err = diskfs_catch_exception ();
@@ -491,6 +500,8 @@ diskfs_grow (struct node *node, off_t size, struct protid *cred)
rwlock_writer_lock (&dn->alloc_lock);
+ RECORD_LAST (dn, LAST_GROW, size);
+
old_size = node->allocsize;
new_size = round_block (size);