diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-09-04 13:00:39 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-09-04 13:00:39 +0000 |
commit | 4deab46f5e6c5f209f85e66cfb62b95143033c41 (patch) | |
tree | 1064892a14c68884b82c8bab063d85f3ab35c168 /ufs | |
parent | 176b24ab0535a80d697f915223538ea70d92c49c (diff) |
1999-09-04 Thomas Bushnell, BSG <tb@mit.edu>
* pager.c (find_address): If !ISREAD, then don't return errors for
access past NP->allocsize, and clear *ADDR and *DISKSIZE. These
can happen through harmless races against truncate.
(pager_write_page): Don't print annoying messages for writes to
unallocated disk. These can happen through harmless races against
truncate, and so we should not pester the console with them.
Diffstat (limited to 'ufs')
-rw-r--r-- | ufs/ChangeLog | 9 | ||||
-rw-r--r-- | ufs/pager.c | 17 |
2 files changed, 18 insertions, 8 deletions
diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 869840b8..1375fede 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,12 @@ +1999-09-04 Thomas Bushnell, BSG <tb@mit.edu> + + * pager.c (find_address): If !ISREAD, then don't return errors for + access past NP->allocsize, and clear *ADDR and *DISKSIZE. These + can happen through harmless races against truncate. + (pager_write_page): Don't print annoying messages for writes to + unallocated disk. These can happen through harmless races against + truncate, and so we should not pester the console with them. + 1999-07-10 Roland McGrath <roland@baalperazim.frob.com> * ufs.h: Add #include <sys/mman.h> for munmap decl. diff --git a/ufs/pager.c b/ufs/pager.c index e703bfd2..3038932d 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -121,7 +121,14 @@ find_address (struct user_pager_info *upi, { if (*nplock) rwlock_reader_unlock (*nplock); - return EIO; + if (isread) + return EIO; + else + { + *addr = 0; + *disksize = 0; + return 0; + } } if (offset + __vm_page_size > np->allocsize) @@ -216,13 +223,7 @@ pager_write_page (struct user_pager_info *pager, err = EIO; } else - { - printf ("Attempt to write unallocated disk\n."); - printf ("Object %p\tOffset %#x\n", pager, page); - fflush (stdout); - err = 0; /* unallocated disk; - error would be pointless */ - } + err = 0; if (nplock) rwlock_reader_unlock (nplock); |