1 |
/* pager.c - Pager for fatfs. |
/* pager.c - Pager for fatfs. |
2 |
Copyright (C) 1997, 1999, 2002, 2003 Free Software Foundation, Inc. |
Copyright (C) 1997, 1999, 2002, 2003, 2005 Free Software Foundation, Inc. |
3 |
Written by Thomas Bushnell, n/BSG and Marcus Brinkmann. |
Written by Thomas Bushnell, n/BSG and Marcus Brinkmann. |
4 |
|
|
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
596 |
return 0; |
return 0; |
597 |
} |
} |
598 |
|
|
599 |
|
void |
600 |
|
pager_notify_evict (struct user_pager_info *pager, |
601 |
|
vm_offset_t page) |
602 |
|
{ |
603 |
|
assert (!"unrequested notification on eviction"); |
604 |
|
} |
605 |
|
|
606 |
/* Grow the disk allocated to locked node NODE to be at least SIZE |
/* Grow the disk allocated to locked node NODE to be at least SIZE |
607 |
bytes, and set NODE->allocsize to the actual allocated size. (If |
bytes, and set NODE->allocsize to the actual allocated size. (If |
608 |
the allocated size is already SIZE bytes, do nothing.) CRED |
the allocated size is already SIZE bytes, do nothing.) CRED |
759 |
struct user_pager_info *upi = malloc (sizeof (struct user_pager_info)); |
struct user_pager_info *upi = malloc (sizeof (struct user_pager_info)); |
760 |
upi->type = FAT; |
upi->type = FAT; |
761 |
pager_bucket = ports_create_bucket (); |
pager_bucket = ports_create_bucket (); |
762 |
diskfs_start_disk_pager (upi, pager_bucket, MAY_CACHE, |
diskfs_start_disk_pager (upi, pager_bucket, MAY_CACHE, 0, |
763 |
bytes_per_sector * sectors_per_fat, |
bytes_per_sector * sectors_per_fat, |
764 |
&fat_image); |
&fat_image); |
765 |
} |
} |
801 |
diskfs_nref_light (node); |
diskfs_nref_light (node); |
802 |
node->dn->pager = |
node->dn->pager = |
803 |
pager_create (upi, pager_bucket, MAY_CACHE, |
pager_create (upi, pager_bucket, MAY_CACHE, |
804 |
MEMORY_OBJECT_COPY_DELAY); |
MEMORY_OBJECT_COPY_DELAY, 0); |
805 |
if (node->dn->pager == 0) |
if (node->dn->pager == 0) |
806 |
{ |
{ |
807 |
diskfs_nrele_light (node); |
diskfs_nrele_light (node); |