diff options
author | Miles Bader <miles@gnu.org> | 1995-10-20 23:30:19 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-10-20 23:30:19 +0000 |
commit | 075122653ab078d87aac136ca51944bcf6684091 (patch) | |
tree | fc37b801601794f887f5ce2825ffc3508aea8db9 /ext2fs | |
parent | 62c948919f2947a12541851757831a82b9aaca8a (diff) |
(struct user_pager_info): Add max_prot field, remove p.
(struct disknode): Replace fileinfo field with pager.
(pokel_flush, flush_node_pager): New declarations.
(disk_pager): Type changed to struct pager.
(sync_global_ptr): Use DISK_PAGER, not DISK_PAGER->p.
(device_arg, device_name, device_port, device_start,
device_size, device_block_size): Declarations removed.
(MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_SYNCHRONOUS, MS_REMOUNT,
S_APPEND, S_IMMUTABLE, IS_APPEND, IS_IMMUTABLE): Macros deleted.
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/ext2fs.h | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h index 77e87ddb..321d4b9b 100644 --- a/ext2fs/ext2fs.h +++ b/ext2fs/ext2fs.h @@ -68,6 +68,9 @@ void pokel_add (struct pokel *pokel, void *loc, vm_size_t length); /* Sync all the modified pieces of disk */ void pokel_sync (struct pokel *pokel, int wait); + +/* Flush (that is, drop on the ground) all pending pokes in POKEL. */ +void pokel_flush (struct pokel *pokel); /* ---------------------------------------------------------------- */ /* Bitmap routines. */ @@ -152,8 +155,8 @@ struct disknode /* Random extra info used by the ext2 routines. */ struct ext2_inode_info info; - /* The upi structure for this file's file pager. */ - struct user_pager_info *fileinfo; + /* This file's pager. */ + struct pager *pager; /* True if the last page of the file has been made writable, but is only partially allocated. */ @@ -168,19 +171,19 @@ struct disknode struct user_pager_info { - struct node *node; enum pager_type { DISK, FILE_DATA, } type; - struct pager *p; + struct node *node; + vm_prot_t max_prot; }; /* ---------------------------------------------------------------- */ /* pager.c */ -struct user_pager_info *disk_pager; +struct pager *disk_pager; mach_port_t disk_pager_port; void *disk_image; @@ -194,33 +197,12 @@ void drop_pager_softrefs (struct node *node); /* Call this when we should turn on caching because it's no longer important for unused memory object ports to get freed. */ void allow_pager_softrefs (struct node *node); - -/* ---------------------------------------------------------------- */ -/* - * These are the fs-independent mount-flags: up to 16 flags are supported - */ -#define MS_RDONLY 1 /* mount read-only */ -#define MS_NOSUID 2 /* ignore suid and sgid bits */ -#define MS_NODEV 4 /* disallow access to device special files */ -#define MS_NOEXEC 8 /* disallow program execution */ -#define MS_SYNCHRONOUS 16 /* writes are synced at once */ -#define MS_REMOUNT 32 /* alter flags of a mounted FS */ - -/* Inode flags. */ -#define S_APPEND 256 /* append-only file */ -#define S_IMMUTABLE 512 /* immutable file */ - -#define IS_APPEND(node) ((node)->dn->info.i_flags & S_APPEND) -#define IS_IMMUTABLE(node) ((node)->dn->info.i_flags & S_IMMUTABLE) +/* Invalidate any pager data associated with NODE. */ +void flush_node_pager (struct node *node); /* ---------------------------------------------------------------- */ -char *device_name; -mach_port_t device_port; -off_t device_size; -unsigned device_block_size; - /* Our in-core copy of the super-block. */ struct ext2_super_block *sblock; /* True if sblock has been modified. */ @@ -236,8 +218,8 @@ unsigned long block_size; /* The log base 2 of BLOCK_SIZE. */ unsigned log2_block_size; -/* log2 of the number of device blocks (DEVICE_BLOCK_SIZE) in a filesystem - block (BLOCK_SIZE). */ +/* log2 of the number of device blocks (DISKFS_DEVICE_BLOCK_SIZE) in a + filesystem block (BLOCK_SIZE). */ unsigned log2_dev_blocks_per_fs_block; /* log2 of the number of stat blocks (512 bytes) in a filesystem block. */ @@ -393,7 +375,7 @@ sync_global_ptr (void *bptr, int wait) { vm_offset_t boffs = trunc_block (bptr_offs (bptr)); global_block_modified (boffs_block (boffs)); - pager_sync_some (disk_pager->p, trunc_page (boffs), vm_page_size, wait); + pager_sync_some (disk_pager, trunc_page (boffs), vm_page_size, wait); } /* This records a modification to one of a file's indirect blocks. */ |