mirror of
https://github.com/drasko/codezero.git
synced 2026-04-18 09:49:05 +02:00
Removed vm_object printfs that were for testing exit().
File open was failing when using 2 files with same name. TODO: Look at it in the future. Need to increase writeable file size in fs0. 16 pages don't work.
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
#include INC_SUBARCH(mm.h)
|
#include INC_SUBARCH(mm.h)
|
||||||
|
|
||||||
/* Abort debugging conditions */
|
/* Abort debugging conditions */
|
||||||
#define DEBUG_ABORTS
|
// #define DEBUG_ABORTS
|
||||||
#if defined (DEBUG_ABORTS)
|
#if defined (DEBUG_ABORTS)
|
||||||
#define dbg_abort(...) dprintk(__VA_ARGS__)
|
#define dbg_abort(...) dprintk(__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ int vma_drop_merge_delete(struct vm_area *vma, struct vm_obj_link *link)
|
|||||||
BUG_ON(!(prev->obj->flags & VM_OBJ_SHADOW));
|
BUG_ON(!(prev->obj->flags & VM_OBJ_SHADOW));
|
||||||
BUG_ON(!(prev->obj->flags & VM_WRITE));
|
BUG_ON(!(prev->obj->flags & VM_WRITE));
|
||||||
BUG_ON(--obj->shadows < 0);
|
BUG_ON(--obj->shadows < 0);
|
||||||
vm_object_print(obj);
|
// vm_object_print(obj);
|
||||||
|
|
||||||
/* Remove prev from current object's shadow list */
|
/* Remove prev from current object's shadow list */
|
||||||
BUG_ON(list_empty(&prev->obj->shref));
|
BUG_ON(list_empty(&prev->obj->shref));
|
||||||
@@ -389,7 +389,7 @@ int vma_drop_merge_delete(struct vm_area *vma, struct vm_obj_link *link)
|
|||||||
if (next && obj->flags & VM_OBJ_SHADOW) {
|
if (next && obj->flags & VM_OBJ_SHADOW) {
|
||||||
BUG_ON(obj->orig_obj != next->obj);
|
BUG_ON(obj->orig_obj != next->obj);
|
||||||
BUG_ON(--next->obj->shadows < 0);
|
BUG_ON(--next->obj->shadows < 0);
|
||||||
vm_object_print(next->obj);
|
// vm_object_print(next->obj);
|
||||||
list_del_init(&obj->shref);
|
list_del_init(&obj->shref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -496,8 +496,7 @@ struct page *copy_on_write(struct fault_data *fault)
|
|||||||
shadow->flags = VM_OBJ_SHADOW | VM_WRITE;
|
shadow->flags = VM_OBJ_SHADOW | VM_WRITE;
|
||||||
shadow->pager = &swap_pager;
|
shadow->pager = &swap_pager;
|
||||||
vmo_link->obj->shadows++;
|
vmo_link->obj->shadows++;
|
||||||
printf("%s: ", __FUNCTION__);
|
// vm_object_print(vmo_link->obj);
|
||||||
vm_object_print(vmo_link->obj);
|
|
||||||
dprintf("%s: Created a shadow:\n", __TASKNAME__);
|
dprintf("%s: Created a shadow:\n", __TASKNAME__);
|
||||||
// vm_object_print(shadow);
|
// vm_object_print(shadow);
|
||||||
dprintf("%s: Original object:\n", __TASKNAME__);
|
dprintf("%s: Original object:\n", __TASKNAME__);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ int mmaptest(void)
|
|||||||
void *base;
|
void *base;
|
||||||
int x = 0x1000;
|
int x = 0x1000;
|
||||||
|
|
||||||
if ((fd = open("./newfile.txt", O_CREAT | O_TRUNC | O_RDWR, S_IRWXU)) < 0)
|
if ((fd = open("./newfile3.txt", O_CREAT | O_TRUNC | O_RDWR, S_IRWXU)) < 0)
|
||||||
perror("open:");
|
perror("open:");
|
||||||
else
|
else
|
||||||
printf("open: Success.\n");
|
printf("open: Success.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user