diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-09-23 21:49:57 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-09-23 21:49:57 +0000 |
commit | d7c2d027981d86ff9d5370dbd424650ea2c37fbc (patch) | |
tree | e9d7bb9fdb8274de907e05682ed440362a9131e8 | |
parent | 422856454093ef77ba75ed7d23c3a50743e1fa1c (diff) |
Formerly ufs.h.~24~
-rw-r--r-- | ufs/ufs.h | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -23,6 +23,7 @@ #include <hurd/ioserver.h> #include <hurd/diskfs.h> #include <assert.h> +#include "fs.h" /* Define this if memory objects should not be cached by the kernel. @@ -54,6 +55,8 @@ struct disknode struct rwlock allocptrlock; + struct dirty_indir *dirty; + struct user_pager_info *fileinfo; }; @@ -85,6 +88,14 @@ struct iblock_spec int offset; }; +/* Identifies an indirect block owned by this file which + might be dirty. */ +struct dirty_indir +{ + daddr_t bno; /* Disk address of block. */ + struct dirty_indir *next; +}; + /* Get a writer lock on reader-writer lock LOCK for disknode DN */ extern inline void rwlock_writer_lock (struct rwlock *lock) @@ -202,7 +213,7 @@ int direct_symlink_extension; extern inline struct dinode * dino (ino_t inum) { - return (struct disknode *) + return (struct dinode *) (disk_image + fsaddr (sblock, ino_to_fsba (sblock, inum)) + ino_to_fsbo (sblock, inum)); @@ -212,21 +223,21 @@ dino (ino_t inum) extern inline daddr_t * indir_block (daddr_t bno) { - return (daddr_t *) (disk_image + fsaddr (fsbtodb (bno))); + return (daddr_t *) (disk_image + fsaddr (sblock, bno)); } /* Convert a cg number to the cylinder group. */ extern inline struct cg * cg_locate (int ncg) { - return (struct cg *) (disk_image + fsaddr (cgtod (sblock, ncg))); + return (struct cg *) (disk_image + fsaddr (sblock, cgtod (sblock, ncg))); } /* Sync part of the disk */ extern inline void sync_disk_blocks (daddr_t blkno, size_t nbytes, int wait) { - pager_sync_some (diskpager->p, fsaddr (blkno), nbytes, wait); + pager_sync_some (diskpager->p, fsaddr (sblock, blkno), nbytes, wait); } /* Sync an disk inode */ |