Fri Nov 11 11:45:38 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* hyper.c (diskfs_set_hypermetadata): Always use dev_write_sync to
	avoid device_write bug that says you can't modify the buffer until
	device_write returns.  Also remember to deallocate BUF.

Thu Nov 10 13:27:09 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* main.c (main): Issue decent prompt.

	* hyper.c (diskfs_set_hypermetadata): Copy CSUM into a
	page-aligned page-sized buffer for disk write to avoid inane
	kernel bug.

Wed Nov  9 05:43:14 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* main.c (main): Behave more reasonably if we can't open DEVNAME.

Tue Nov  8 00:03:20 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* pager.c (pager_write_page): Use %p for printing PAGER.

	* ufs.h: Declare copy_sblock.

Wed Nov  2 16:06:10 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* hyper.c (copy_sblock): Don't copy csum here.
	(diskfs_set_hypermetadata): Write csum directly to disk here.

Thu Oct 27 20:58:08 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* dir.c (diskfs_lookup): diskfs_get_filemap returns a send right,
	so don't create an additional one here.
	(diskfs_dirempty): Likewise.
	* sizes.c (diskfs_truncate): Likewise.
	(diskfs_grow): Likewise.

Tue Oct 25 12:49:41 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* hyper.c (copy_sblock): Call record_poke for csum and superblock
	after modifying them. 

	* pager.c (diskfs_shutdown_pager): Call copy_sblock.
	(diskfs_sync_everything): Likewise.

	* alloc.c (ffs_fragextend): Call record_poke for CG after
	modifying it.  Also set CSUM_DIRTY and SBLOCK_DIRTY.
	(ffs_alloccg): Likewise.
	(ffs_alloccgblk): Likewise.
	(ffs_nodealloccg): Likewise.
	(ffs_blkfree): Likewise.
	(diskfs_free_node): Likewise.

Fri Oct  7 01:32:56 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* main.c (diskfs_init_completed): Don't call _hurd_proc_init.
	(saved_argv): Variable removed.
	(main): Don't set saved_argv.  Pass ARGV to diskfs_start_bootstrap.

Wed Oct  5 22:18:46 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* inode.c (read_disknode): If we are the bootstrap filesystem,
	then getpid changes once proc starts up.  So only call getpid
	once, thus not allowing st_dev values to mysteriously change.

Wed Oct  5 12:56:53 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* alloc.c (diskfs_alloc_node): Abort if free inode has
	translator attached.

Tue Oct  4 18:33:35 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* pager.c (pager_unlock_page): Call diskfs_catch_exception.

Tue Oct  4 00:16:04 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* inode.c (diskfs_lost_hardrefs): Comment out body.
	* ufs.h (node2pagelock): New variable.
	* pager.c (node2pagelock): Initialize.
	(diskfs_get_filemap): Don't let node hold a reference to the pager.
	(pager_clear_user_data): Acquire node2pagelock and clear
	the node's reference to the pager.
	(diskfs_file_update): Hold node2pagelock for reference 
	of NP->dn->fileinfo.
	(drop_pager_softrefs): Likewise.
	(allow_pager_softrefs): Likewise.
	(diskfs_get_filemap): Likewise.  
	* sizes.c (diskfs_truncate): Likewise.

	* Makefile (SRCS): Added pokeloc.c.

Mon Oct  3 15:03:38 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* sizes.c (diskfs_truncate): Rewritten.

	* bmap.c (fetch_indir_spec): Initialize OFFSET values to -2, 
	meaning that the entry is not needed.  If LBN is negative,
	then don't set values for the data block.

	* inode.c (write_node): Call record_poke after writing
	dinode.
	(create_symlink_hook): Likewise.
	(diskfs_set_translator): Likewise.
	* pager.c (pager_unlock_page): Likewise.
	* sizes.c (diskfs_truncate): Likewise.
	* pager.c (pager_unlock_page): Call record_poke after writing
	indirect block.
	* sizes.c (diskfs_grow): Likewise.
	(diskfs_grow): Likewise.
	* pager.c (diskfs_sync_everything) [sync_one]: If this is the
	disk pager, call sync_disk instead.
	* pokeloc.c: New file.

Fri Sep 30 11:25:36 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* dir.h: Delete DT_* definitions; they are now in <dirent.h>.
	* dir.c (diskfs_get_directs): Set USERP->d_type as DT_UNKNOWN.
	When the bugs in the type fields are fixed (dealing with
	multiple links and mode changes) then this can actually return
	the value.

Thu Sep 29 17:16:58 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* main.c (main): Test getpid()>0 to decide we are a normal
	translator instead of the boot fs.  Fetch bootstrap port after
	possibly calling diskfs_parse_bootargs, not before.

Tue Sep 27 15:24:58 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* sizes.c (diskfs_grow) [computation of newallocsize]: Last block
	number is one less than the total number of blocks.

Tue Sep 27 11:58:44 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* bmap.c (fetch_indir_spec): Single indirect block pointer is
	in the INDIR_SINGLE slot, not the INDIR_DOUBLE slot.

Mon Sep 26 20:47:30 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* Makefile (SRCS): Added bmap.c.

	* main.c (main): Don't call pager_init.

	* inode.c (diskfs_get_translator): Repair to read translator
	correctly.

	* sizes.c (diskfs_grow): Compute block numbers in a more clean
	(and confidently correct) fashion.
	(diskfs_truncate): Set NP->allocsize from a properly rounded
	value.

Mon Sep 26 12:50:38 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* inode.c (diskfs_lost_hardrefs): "Know" that a pager starts 
	with a portinfo; we don't actually have access to the pager
	struct here.

Fri Sep 23 14:21:55 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	[ Continuing yesterday's changes. ]
	* ufs.h (struct dirty_indir): New type.
	(struct disknode): New member `dirty'.
	* inode.c (iget): Initialize DN->dirty.
	* bmap.c (mark_indir_dirty): New function.
	* pager.c (pager_unlock_page): Call mark_indir_dirty before
	writing into indirect blocks.
	(diskfs_file_update): Sync indirect blocks here.
	(pager_traverse): Simplify; do FILE_DATA and diskpager.
	(pager_init): Removed function.
	(create_disk_pager): New function.
	* sizes.c: Completely rewritten.
	* main.c (main): Spawn first thread sooner so we can 
	map and look at the disk image.
	* hyper.c (get_hypermetadata): Moved firewall asserts 
	here from pager_init.

Thu Sep 22 11:28:46 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	[This long series of changes deletes the DINODE, CG, SINDIR,
	and DINDIR pagers and adds a new pager type DISK.]
	* ufs.h (struct disknode) Removed DINLOCK, SINLOCK, and
        SININFO members.  New member ALLOCPTRLOCK renamed from DATALOCK.
	Removed SINLOC, DINLOC, SINLOCLEN, and DINLOCLEN.
	(struct user_pager_info) [enum pager_type]: Removed types
	DINODE, CG, SINDIR and DINDIR; added type DISK.
	(dinpager, dinodepager, cgpager): Deleted vars.
	(diskpager): New var.
	(dinmaplock, sinmaplock, pagernplock): Deleted vars.
	(sblock_dirty, csum_dirty, cgs, dinodes): Deleted vars.
	(fsaddr): New macro.
	(dino, indir_block, cg_locate): New inline functions.
	(sync_disk_blocks, sync_dinode): New inline functions.
	(struct iblock_spec): New type.
	* pager.c (dinport, dinodeport, cgport, sinlist): Deleted vars.
	(filepagerlist): Renamed from filelist.
	(pagernplock): Deleted variable.
	(find_address): Removed switch; support only DISK and FILE_DATA.
	(pager_report_extent): Likewise.
	(pager_unlock_page): Removed switch.  Return without comment for
	DISK; allocate indirect blocks as necessary right here for
	FILE_DATA.
	(sin_map, sin_remap, sin_unmap, din_map, din_unmap): Deleted 
	functions.
	(indir_alloc, sync_dinode): Deleted functions.
	(enqueue_pager, dequeue_pager): Deleted functions.
	(diskfs_file_update): No longer lock pagernplock; nothing
	to do with sininfo.  
	(drop_pager_softrefs): Likewise.
	(allow_pager_softrefs): Likewise.
	(diskfs_get_filemap): Put pager on filepagerlist right here
	instead of through pager_enqueue.
	(pager_clear_user_data): Likewise, mutatis mutandis.
	* main.c (main): Call create_disk_pager and then map the
	entire disk into disk_image.
	* hyper.c (get_hypermetadata): Use bcopy instead of dev_read_sync.
	(diskfs_set_hypermetadata): NOP out function.
	(copy_sblock): New function, substance of code is from old
	diskfs_set_hypermetadata.
	* inode.c (iget): Don't initialize deleted disknode fields.
	(diskfs_node_norefs): Don't verify that deleted disknode
	fields are not set.
	(read_disknode): Get dinode from DINO, not DINODES array.
	(write_node): Likewise.
	(create_symlink_hook): Likewise.
	(read_symlink_hook): Likewise.
	(diskfs_set_translator): Likewise.
	(diskfs_get_translator): Likewise.
	(diskfs_node_translated): Likewise.
	* alloc.c (ffs_realloccg): Likewise.
	(ffs_fragextend): Use cg_locate instead of cgs array.
	(ffs_alloccg): Likewise.
	(ffs_nodealloccg): Likewise.
	(ffs_blkfree): Likewise.
	(diskfs_free_node): Likewise.
	* inode.c (diskfs_set_translator): Use bcopy and sync_disk_blocks
	instead of dev_write_sync.
	(diskfs_get_translator): Likewise, mutatis mutandis.
	(read_disknode): Initialize NP->istranslated.
	(diskfs_set_translator): Set/clear NP->istranslated as appropriate.
	(diskfs_node_translated): Removed function.
	* bmap.c: New file.
	
	[This improves the RWLOCK mechanism and makes it more
	orthogonal.  It should probably be moved into a library.]
	* ufs.h (struct rwlock): Added MASTER and WAKEUP members.
	(struct disknode): Removed RWLOCK_MASTER and RWLOCK_WAKEUP
	fields.  
	(rwlock_reader_lock): Ommitted arg DN; use new MASTER and WAKEUP
	members inside LOCK instead.
	(rwlock_writer_lock): Likewise.
	(rwlock_reader_unlock): Likewise.
	(rwlock_init): Initialize new MASTER and WAKEUP fields.
	* inode.c (iget): Don't deal with RWLOCK_MASTER and RWLOCK_WAKEUP.
	* pager.c (find_address): Deleted arg DNP.  Only pass one
	arg to rwlock functions. 
	(pager_read_page): Deleted var DN; only pass one arg to rwlock
	functions.
	(pager_write_page): Likewise.

Wed Sep 21 00:26:25 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* pager.c (allow_pager_softrefs): Unlock PAGERNPLOCK when
	we're done with it.
	(sin_map): Hold PAGERNPLOCK all the way until we're done
	with the sininfo pointer.
	(pagernplock): No longer static.
	* ufs.h (pagernplock): Declare here.

	* sizes.c (diskfs_grow): Don't call diskfs_file_update here.  
	This was done to prevent too much dirty data from accumulating
	and then overwhelming the pager later.  But that's really the
	pager's responsibility.

	* ufs.h (struct disknode): New members `dinloclen' and `sinloclen'.
	* inode.c (iget): Initialize DN->dinloclen and DN->sinloclen.
	(diskfs_node_norefs): Verify that DN->dinloclen and DN->sinloclen
	are both zero.
	* pager.c (find_address) [SINDIR]: Verify that reference is 
	within bounds of NP->dn->dinloc.
	(pager_unlock_page) [SINDIR]: Likewise.
	(din_map): Set NP->dn->dinloclen.
	(din_unmap): Clear NP->dn->dinloclen.
	(find_address) [FILE_DATA]: Verify that reference is within
	bounds of NP->dn->sinloc.
	(pager_unlock_page) [FILE_DATE]: Likewise.
	(sin_map): Set NP->dn->sinloclen.
	(sin_remap): Reset NP->dn->sinloclen.
	(sin_unmap): Clean NP->dn->sinloclen.

	* pager.c (pager_write_page): Flush stdout after printf.
	(pager_unlock_page) [FILE_DATA]: Likewise.

	* sizes.c (diskfs_truncate): In all references to sinloc and
	dinloc arrays, verify that references are within allocated bounds.
	(diskfs_grow): Likewise.
	(sindir_drop): Likewise.

	* pager.c: Create new mapping with extent NEWSIZE, not SIZE (which
	was the old size of the mapping).

Tue Sep 20 15:51:35 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* pager.c (pager_report_extent) [SINDIR]: Remove erroneous extra 
	division by block size.
	(sin_remap): Likewise.

Mon Sep 19 17:34:11 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* inode.c (create_symlink_hook): Write assert test correctly.

	* dir.c (diskfs_direnter) [EXTEND]: Reference file size only
	*once*; don't rely on the behavior if diskfs_grow vis a vis
	file size.

Fri Sep 16 10:29:42 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* dir.c (dirscanblock): Compute offset correctly for mangled
	entry notice.

	* dir.c (diskfs_direnter) [EXTEND]: Reference file size only
	once before calling diskfs_grow in case diskfs_grow actually
	increases the size.

	* inode.c (diskfs_set_statfs): Set fsid from getpid. 
	(read_disknode): Likewise.

	* dir.h (struct directory_entry): Renamed from struct direct.
	* dir.c: All uses of struct direct changed to use 
	struct directory_entry.
	(diskfs_get_directs): New var `userp'.  Copy from *ENTRYP into
	it (set at DATAP) more cleanly.

Mon Sep 12 11:30:48 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* hyper.c (diskfs_set_hypermetadata): Don't frob clean and dirty
	bits if we are readonly.

Sat Sep 10 11:41:06 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* main.c (main): When started up as a passive translator,
	open fds 0, 1, and 2 on /dev/console for debugging messages.
	Call diskfs_init_diskfs with no args; after warp_root, call
	diskfs_startup_diskfs on BOOTSTRAP.  Compare BOOTSTRAP to
	MACH_PORT_NULL instead of zero.

Fri Sep  9 13:02:33 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* main.c (trans_parse_args): Fix and enable.

Tue Sep  6 11:29:55 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* inode.c (iget): Remove old assert test that checked for bad
	inode block allocations.

Thu Sep  1 11:39:12 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* tables.c: Don't include "ufs.h"; include <sys/types.h>.  Then
	this file can be used unmodified by fsck.

Tue Aug 30 13:36:37 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* inode.c (diskfs_set_translator): ffs_blkfree doesn't have
	a return value.

Mon Aug 29 12:49:17 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* inode.c (diskfs_set_translator): If NAMELEN is zero, then
	make the node have no translator. 

Fri Aug 26 12:28:20 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* inode.c (read_disknode): 4.4 fsck sometimes sets the author
	field to -1 to mean "ignore old uid location"; take that to mean
	"author == uid".
	(diskfs_set_translator): If we are allocating a new block for
	the translator, then account for it in st_blocks.

Thu Aug 18 12:41:12 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* Makefile (HURDLIBS): Use short version.

	* alloc.c (diskfs_alloc_node): Bother to set *NPP before
	returning.

Tue Aug 16 10:48:04 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* Makefile (LDFLAGS): New variable.

Fri Aug  5 15:51:09 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>

	* dir.c (diskfs_direnter) [EXTEND]: Crash if the entry won't 
	fit in the new block.
	(diskfs_lookup): Return ENAMETOOLONG if the name is bigger than
	MAXNAMLEN.

	* dir.c (diskfs_get_directs): Set USERD->d_reclen correctly.

Fri Jul 22 15:12:35 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* Makefile: Rewritten in accord with new scheme.

Wed Jul 20 13:28:38 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* main.c (main): Don't set diskfs_dotdot_file.

Tue Jul 19 21:51:54 1994  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)

	* ufs.h: Removed defns of u_quad_t, quad_t; now in <sys/types.h>.
	Removed defn of struct timespec; now in <sys/time.h>.

Tue Jul 19 12:47:31 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* main.c (main): Deleted var `diskfs_dotdot_file'.
	(trans_parse_args): Don't set diskfs_dotdot_file; don't expect
	dotdot from fsys_getroot.

	* Makefile (LDFLAGS): Moved to rule for `ufs' and commented out.
	(ufs): Don't use variable $(link) anymore.

Mon Jul 18 14:55:17 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* dir.c (diskfs_get_directs): Return data to user in old format.
	Add new code for new format, maintaining compatibility correctly,
	but comment it out until the library is ready.

	* hyper.c (diskfs_set_hypermetadata): If we presumed to 
	set new values of fs_maxfilesize, fs_qbmask, and fs_qfmask,
	then restore the originals before writing out the superblock.

	* pager.c (diskfs_get_filemap): Test should be S_ISLNK, not
	S_ISSOCK.

	* hyper.c (get_hypermetadata): Set new constants in filesystems
	which don't have them yet.
	(get_hypermetadata): Cast MAXSYMLINKLEN to long to avoid
	converting sblock->fs_maxsymlinklen into an unsigned.

	* subr.c (scanc, skipc): New functions.
	(ffs_setblock): Use assert instead of panic.

	* inode.c (read_disknode): Set old stat structure until the header
	file gets changed.

Fri Jul 15 12:07:15 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* sizes.c: Include <string.h> for bzero.
	* fs.h (blksize): Comment out dblksize macro.  In blksize
	macro, use NP->allocsize instead of IP->i_size.

	* dinode.h (INDIR_SINGLE, INDIR_DOUBLE, INDIR_TRIPLE): New macros.

	* inode.c (read_disknode, write_node): Use new stat and dinode
	fields for times.

	* ufs.h: Change `nextgennumber' to be `u_long' instead of int.
	Change prototypes of some alloc.c functions.
	* alloc.c (ffs_alloc): Declare to return error_t.
	(ffs_realloccg): Likewise.
	(ffs_hashalloc, ffs_alloccg, ffs_fragextend, ffs_alloccg,
	ffs_dirpref, ffs_nodealloccg, ffs_allccgblk, ffs_mapsearch,
	ffs_clusteracct): Provide forward declarations.
	(ffs_realloccg): Use printf instead of log.
	Make BPREF volatile for setjmp safety.
	(diskfs_alloc_node): Use diskfs global variable instead of TIME.
	(ffs_nodealloccg): Likewise.
	(ffs_blkfree): Likewise.
	(diskfs_free_node): Likewise.
	(ffs_blkfree, ffs_clusteracct): Declare as void.
	(ffs_alloccg, ffs_nodealloccg): Declare as u_long.

	* ufs.h: Change prototypes of some subr.c functions.
	* subr.c (ffs_isblock): Use assert instead of panic.
	(ffs_clrblock): Likewise.

	* hyper.c: Include "dinode.h".

	* dinode.h (LINK_MAX): New macro, from BSD sys/sys/syslimits.h.
	* fs.h (MAXBSIZE, MAXFRAG): New macros, from BSD sys/sys/param.h.

	* hyper.c (get_hypermetadata): Provide first arg in call to
	fsbtodb.
	(diskfs_set_hypermetadata): Likewise.
	* inode.c (diskfs_set_translator): Likewise.
	(diskfs_get_translator): Likewise.
	* pager.c (find_address): Likewise.
	(indir_alloc): Likewise.
	* inode.c (iget): Provide first arg in call to lblkno.
	* sizes.c (diskfs_truncate): Likewise.
	* pager.c (find_address): Likewise.
	* sizes.c (diskfs_grow): Likewise.
	* inode.c (iget): Provide first arg in call to fragroundup.
	* sizes.c (diskfs_trucate): Likewise.
	* sizes.c (diskfs_grow): Likewise.
	* inode.c (iget): Provide first arg in call to blkroundup.
	* pager.c (pager_unlock_page): Likewise.
	* sizes.c (diskfs_truncate): Likewise.
	* sizes.c (diskfs_grow): Likewise.
	* pager.c (find_address): Provide first arg in call to cgtod.
	* pager.c (find_address): Provide first arg in call to cgimin.
	* pager.c (find_address): Provide first arg in call to blktofrags.
	* pager.c (find_address): Provide first arg in call to blkoff.
	* sizes.c (diskfs_truncate): Likewise.
	* sizes.c (diskfs_grow): Likewise.
	* sizes.c (diskfs_truncate): Provide first arg in call to blksize.
	* sizes.c (diskfs_grow): Likewise.
	* sizes.c (diskfs_truncate): Provide first arg in call to numfrags.

	* ufs.h: Added temporary declarations of `u_quad_t', `quad_t', and
	`struct timespec'.

	* pager.c (diskfs_get_filemap): Make sure that this is 
	a kind of node that can be validly read.

	* inode.c (create_symlink_hook): Renamed from symlink_hook.
	(read_symlink_hook): New function.  
	(diskfs_read_symlink_hook): Initialize.

Thu Jul 14 12:23:45 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* alloc.c: New from 4.4 BSD; BSD version `8.8  2/21/94'.
	Remove old includes; include "ufs.h", "fs.h", "dinode.h",
	and <stdio.h>.  Replace panics with asserts and comment out
	uprintfs.  Use prototypes throughout.  Replace calls
	to ffs_fserr with printf.
	(alloclock): New variable.
	(ffs_alloc): Variable struct inode *IP is now struct node *NP; 
	refer to it appropriately.  Initialize FS to sblock.
	Lock alloclock around actual allocation steps.  Reverse order
	of BNP and CRED arguments; declare CRED as a protid and use
	accordingly.  Permit CRED to be null.
	(ffs_realloccg): Variable struct inode *IP is now struct node *NP;
	refer to it accordingly.  Comment out U*x buffer management code.
	Lock alloclock around actual allocation steps.  Initialize FS
	from sblock.  Declare CRED as a protid and use it accordingly.
	Change BUF arg to PBN (physical block number); return new block
	there.
	(ffs_reallocblks): Comment out.
	(diskfs_alloc_node): Renamed from ialloc. Initialize FS from
	sblock.  Use calling sequence from <hurd/diskfs.h>.  Acquire
	alloclock aroud actual allocation steps.  Deleted vars
	`pip', `pvp' (use dir instead).  Use iget instead of VFS_VGET.
	Var struct inode *IP now struct node *NP.  Lock gennumberlock
	around frobbing of nextgennumber.
	(ffs_blkpref): Arg struct inode *ip is now struct node *np;
	refer to it accordingly.  Initialize FS to sblock.  Lock
	alloclock during actual work.  Use csum instead of fs_cs macro.
	(ffs_hashalloc): Arg struct inode *IP is now struct node *NP;
	use it accordingly.  Initialize FS from sblock.
	(ffs_fragextend): Arg struct inode *IP is now struct node *NP;
	use it accordingly.  Initialize FS from sblock.  Initialize
	CGP from cgs array; don't use bread.  Comment out calls to brelse
	and bdwrite.  Set CGP->time from diskfs global var.  Use csum
	instead of fs_cs macro.
	(ffs_alloccg): Arg struct inode *IP is now struct node *NP.
	Initialize FS from sblock.  Initialize CGP from cgs array;
	don't use bread.  Comment out calls to brelse and bdwrite.
	Set CGP->time from diskfs global var.  Use csum instead of
	fs_cs macro.
	(ffs_nodealloccg): Arg struct inode *IP is now struct node *NP.
	Initialize FS from sblock.  Initialize CGP from cgs array;
	don't use bread.  Comment out calls to brelse and bdwrite.  Use
	csum instead of fs_cs macro.
	(ffs_blkfree): Arg struct inode *IP is now struct node *NP.
	Initialize FS from sblock.  Initialize CGP from cgs array;
	don't use bread.  Comment out calls to brelse and bdwrite.  Use
	csum instead of fs_cs macro.
	(diskfs_free_node): Renamed from ffs_vfree.  Use calling
	sequence from <hurd/diskfs.h>.  Initialize FS from sblock.
	Deleted vars pip,pvp (use NP instead).  Initialize CGP from
	cgs array; don't use bread.  Comment out calls to brelse and
	bdwrite.  Use csum instead of fs_cs macro.
	(ffs_fserr): Commented out.
	(ffs_dirpref): Use csum instead of fs_cs macro.

	* ufs.h (ffs_alloc): Renamed from alloc; all callers changed.
	(ffs_blkfree): New arg NP; renamed from blkfree; all callers changed.
	(ffs_blkpref): Renamed from blkpref; all callers changed.
	(ffs_realloocg): Rename from realloccg; all callers changed.

	* fs.h: New from 4.4 BSD; BSD version `8.7  4/19/94'.
	(fs_cs): Don't use fs_csp; use global csum instead.

	* subr.c: New from 4.4 BSD; BSD version `8.2  9/21/93'.
	Remove old includes.  Include "ufs.h" and "fs.h".
	(ffs_blkatoff, ffs_checkoverlap): Comment out.

	* tables.c: New from 4.4 BSD; BSD version `8.1  6/11/93'.
	Don't include <param.h>; do include "ufs.h" and "fs.h".

	* dinode.h: New from 4.4 BSD; BSD version `8.3  1/21/94'.
	Remove oldids/inum union; replace with author.
	Renamed di_mode to be di_model; allocated di_modeh from spare.
	Allocate di_trans from spare.
	(di_inumber): Remove macro.
	* inode.c (read_disknode): Fetch uid and gid from new (long)
	fields in dinode unless we are the old inode format, in which
	case fetch them from the old fields.
	(write_node): Only set new uid and gid fields if we are not
	COMPAT_BSD4.  Set old fields if the superblock says to.
	(symlink_hook): New function.
	(diskfs_create_symlink_hook): Initialize.
	* sizes.c (diskfs_truncate): Deal with truncation of short
	symlink properly.

	* dir.h: New from 4.4 BSD; BSD version `8.2  1/21/94'.
	Substitute our version of DIRSIZ which uses the namelen.
	Comment out declarations of struct dirtemplate and struct
	odirtemplate.
	(DIRECT_TYPE, DIRECT_NAMLEN): New macros.
	* ufs.h (direct_symlink_extension): New variable.
	* hyper.c (get_hypermetadata): Set direct_symlink_extension.
	* dir.c (dirscanblock): Use DIRECT_NAMLEN instead of d_namlen.
	(diskfs_direnter): Likewise.
	(diskfs_dirempty): Likewise.
	(diskfs_get_directs): Likewise.
	(diskfs_direnter): Set d_type field of new slot if 
	direct_symlink_extension is set.
	(diskfs_dirrewrite): Likewise.

	* ufs.h (compat_mode): New variable.
	* main.c (main): Set compat_mode to zero if we are the bootstrap
	filesystem.
	* inode.c (diskfs_set_translator): Return error if compat_mode
	is set.
	(write_node): Don't set GNU dinode field extensions unless
	compat_mode is COMPAT_GNU.

Mon Jul 11 18:14:26 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* dir.c (diskfs_get_directs): When copying entries into DATAP,
	set the d_reclen parameter of the copy to the minimum length 
	(because that's all we use) rather than the size that it had
	in the directory itself.

Wed Jul  6 14:41:48 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* dir.c (dirscanblock): In main loop, initialize PREVOFF
	to zero, not BLOCKADDR.  Otherwise, the wrong value is
	stored into DS->prevoff and then diskfs_dirremove crashes.

Tue Jul  5 14:07:38 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* dinode.h: Include <endian.h> before test of BYTE_ORDER.

	* Makefile (TAGSLIBS): New variable.

Tue Jun 21 13:45:04 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* dir.c (diskfs_direnter): Update dirents of DP, not NP.

Mon Jun 20 16:43:48 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* dir.c (diskfs_direnter) [case SHRINK]: NEW should be set to 
	OLDNEEDED past DS->entry, not to the start of the next entry.

	* dir.c (diskfs_direnter) [case EXTEND]: Cast in assignment 
	to NEW needs proper scope.

	* inode.c (diskfs_node_norefs): Free dirents list of structure
	being deallocated.  Also add assert checks to make sure other
	state is already clean.

Thu Jun 16 11:38:17 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* dir.c (diskfs_dirempty): Map directory contents ourselves
	instead of using diskfs_node_rdwr.
	(struct dirstat): New structure to cache mapping between
	lookup and commit operation and avoid use of diskfs_node_rdwr.
	(diskfs_lookup): Map directory ourselves.  Keep mapping in
	DS if DS is nonzero and we might use it in direnter, dirremove,
	or dirrewrite.  Deallocate mapped buffer if we return some
	error (other than ENOENT), or if DS is zero, or if there is
	no possible commit operation to follow.  When setting DS->stat
	to EXTEND, do it the new way.
	(dirscanblock): Changed BLKOFF to be virtual address of mapped
	block and renamed it BLKADDR.  New arg IDX.  Use mapped block
	instead of calling diskfs_node_rdwr.  Set DS according to the new
	rules.
	(diskfs_direnter): Interpret new dirstat format.
	(diskfs_dirremove): Likewise.
	(diskfs_dirrewrite): Likewise.
	(diskfs_drop_dirstat): Deallocate cached mapping here.

	* dir.c (dirscanblock): When we find the node for type CREATE,
	invalidate DS by setting type to LOOKUP, not LOOKING.

	* dir.c (diskfs_direnter, diskfs_dirremove, diskfs_dirrewrite):
	Call diskfs_notice_dirchange when appropriate.

	* dir.c (diskfs_get_directs): Deal properly with case where 
	BUFSIZ==0 and where NENTRIES==-1.

Wed Jun 15 16:40:12 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* main.c (main): Check device sector size and media size
	on startup.

Tue Jun 14 14:41:17 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* ufs.h (struct disknode) [dirents]: New member.
	* inode.c (iget): Initialize DN->dirents.
	* dir.c (diskfs_direnter, diskfs_dirremove): Keep track
	of dirents member.
	(dirscanblock): New var `nentries'; use it to count the
	number of directory entries in this block and set it if
	we end up scanning the entire block.
	(count_dirents): New function.
	(diskfs_get_directs): New function.

Mon Jun 13 13:50:00 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* ufs.h (sinmaplock, dinmaplock): New global vars.
	* inode.c (inode_init): Initialize sinmaplock and dinmaplock.
	* pager.c (find_address, pager_unlock_page): Protect use
	if dinloc array with dinmaplock.
	(din_map, din_unmap): Doc fix.
	(find_address, pager_unlock_page): Protect use of sinloc array
	with sinmaplock.
	(sin_map, sin_remap, sin_unmap): Doc fix.
	(pager_clear_user_data): Acquire sinmaplock and dinmaplock
	instead of NP->dn->datalock and NP->dn->sinlock respectively.

	* sizes.c (diskfs_truncate, diskfs_grow): Protect use of sinloc
	and sindir mapping functions with sinmaplock.
	(sindir_drop): Protect use of dinloc and dindir mapping functions
	with dinmaplock.

	* ufs.h (struct rwlock): New type.
	(struct disknode) [dinlock, sinlock, datalock]: Use read-write lock.
	Change comments so that these don't lock dinloc and sinloc anymore.
	[rwlock_master, rwlock_wakeup]: New members.
	(rwlock_reader_lock, rwlock_writer_lock, rwlock_reader_unlock,
	rwlock_writer_unlock, rwlock_init): New functions.
	* inode.c (iget): Initialize DN->rwlock_master and
	DN->rwlock_wakeup.  Change initialization of DN->dinlock,
	DN->sinlock, and DN->datalock to use rwlock_init.
	* pager.c (find_address): Lock NP->dn->dinlock, NP->dn->sinlock,
	and NP->dn->datalock with rwlock_reader_lock.  Change type of 
	parameter NPLOCK to be a read-write lock.  New parm DNP.  Callers
	changed.
	(pager_read_page, pager_write_page): Change type of NPLOCK to be
	read-write lock; call rwlock_reader_unlock instead of
	mutex_unlock.  New variable DN.
	(pager_unlock_page): Use rwlock_writer_lock to lock
	NP->dn->dinlock, NP->dn->sinlock, and NP->dn->datalock.
	* sizes.c (diskfs_truncate, diskfs_grow): Change locks of DATALOCK
	field to use rwlock_writer_{un,}lock.
	(sindir_drop): Ditto for SINLOCK field.
	(dindir_drop): Ditto for DINLOCK field.

Mon Jun  6 19:23:26 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* sizes.c (diskfs_grow): After realloccg, zero new data (which I'm
	not sure is really necessary, but until I figure it out, this is
	safest).  Also poke old data (the latter only if the block has
	moved)--otherwise the kernel won't know to page it out to the new
	location.
	(poke_pages): When poking, be careful not to actually change the data.
	LEN should be end - start, not start - end.

Fri Jun  3 12:37:27 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* inode.c (iget): When we find the node in the table, acquire the
	mutex *after* incrementing NP->references and unlocking
	diskfs_node_refcnt_lock; otherwise we can deadlock against 
	diskfs_nput.

Thu Jun  2 12:16:09 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* ufs.h (sblock_dirty, csum_dirty, alloclock): New global variables.
	* alloc.c (alloclock): Remove static keyword..
	* alloc.c (realloccg): Set sblock_dirty after changing sblock.
	(blkpref): Likewise.
	(fragextend): Likewise.
	(alloccg): Likewise.
	(alloccgblk): Likewise.
	(ialloccg): Likewise.
	(blkfree): Likewise.
	(diskfs_free_node): Likewise.
	* hyper.c (diskfs_set_hypermetadata): Likewise.
	* alloc.c (fragextend): Set csum_dirty after changi csum.
	(alloccg): Likewise.
	(alloccgblk): Likewise.
	(ialloccg): Likewise.
	(blkfree): Likewise.
	(diskfs_free_node): Likewise.
	* hyper.c (diskfs_set_hypermetadata): Acquire alloclock while 
	writing hypermetadata.  Only write csum and sblock if
	csum_dirty or sblock_dirty, respectively, is set, and then
	clear it after starting the write.

	* main.c (main): Likewise.

	* sizes.c (diskfs_truncate): Don't turn off caching; the new
	light reference system takes care of this.
	* pager.c (diskfs_get_filemap): No longer necessary to turn
	on caching here, because truncate no longer turns it off.

	* inode.c (diskfs_lost_hardrefs, diskfs_new_hardrefs): New functions.
	* pager.c (drop_pager_softrefs, allow_pager_softrefs): New functions.
	(sin_map): Use diskfs_nref_light, not diskfs_nref.
	(diskfs_get_filemap): Use diskfs_nref_light, not diskfs_nref.
	(pager_clear_user_data): Use diskfs_nrele_light, not diskfs_nrele.
	* ufs.h (drop_pager_softrefs, allow_pager_softrefs): New
	declarations.

Wed Jun  1 13:35:11 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* sizes.c (diskfs_truncate): After calling sin_unmap, turn
	off caching on the sininfo pager so that it gets freed promptly
	(there's generally no value in keeping it around because there 
	is no live fileinfo pager).
	* pager.c (diskfs_get_filemap): Make sure we turn caching back on
	here, however, if we start using the file pager.

	* pager.c (sin_map): When np->dn->sininfo is set, we have
	to insert a valid send right after fetching the receive name.

	* pager.c (sin_unmap, din_unmap): New functions.
	(pager_clear_user_data): Call sin_unmap and din_unmap
	instead of doing it right here.

	* sizes.c (diskfs_truncate): Call sin_unmap instead of
	doing it right here.
	(sindir_drop): Call din_unmap instead of doing it right
	here.  Also, call it always, not just when wo do dindir_drop.

	* sizes.c (diskfs_grow): After alloc into sindir area,
	unmap it if we don't have an active data pager.
	* ufs.h (sin_unmap, din_unmap): New declarations.

	* sizes.c (diskfs_grow): In computing OSIZE in the realloc
	case of lbn < NDADDR, deal correctly with the case where
	np->allocsize is already an integral number of blocks.

	* sizes.c (diskfs_grow): Compute SIZE correctly.

	* alloc.c (alloc, realloccg, blkfree): When checking validity
	of size arguments, also make sure the size isn't zero.

	* alloc.c (diskfs_alloc_node): Lock ALLOCLOCK before checking
	sblock->fs_cstotal.cs_nifree.

Tue May 31 18:47:42 1994  Roland McGrath  (roland@geech.gnu.ai.mit.edu)

	* ufs.h (DONT_CACHE_MEMORY_OBJECTS): Define it.

	* dir.c (diskfs_direnter: case TAKE): Assert that OLD->d_reclen >=
	NEEDED, not that it is strictly >.

Tue May 31 11:10:28 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* sizes.c (diskfs_grow): Call diskfs_node_update (but don't wait)
	after successful completion to prevent old data from hanging around
	too long and getting flushed all at once from the kernel.

	* sizes.c (diskfs_grow): Change SIZE to be the size of the last
	block allocated.  Delete variable NSIZE; use SIZE instead.

Fri May 27 13:15:26 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* sizes.c (diskfs_truncate): Set NP->dn_stat_dirty after each
	modification of NP->dn_stat.

	* sizes.c (diskfs_truncate): Compute new value of NP->allocsize
	correctly.

	* inode.c (iget): Set NP->allocsize to be the *actual* allocsize.

Thu May 26 11:51:45 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* sizes.c (diskfs_truncate): In blkfree loop of blocks past
	NDADDR, subtract NDADDR from idx to index correctly into
	sinloc array.  Start this loop with idx not less than NDADDR.
	(diskfs_truncate): If olastblock == NDADDR, then we also
	need to truncate blocks (one) mapped by single indirect blocks.
	(diskfs_truncate): New variable `first2free'.  Use in place
	of older losing calculations involving lastblock.
	(sindir_drop): Rename parameters to be FIRST and LAST.  Change
	interpretation of FIRST by one to correspond with changed call
	in diskfs_truncate.

	* pager.c (sin_remap): When computing NEWSIZE, round up to
	a page boundary, thus mimicing the SINDIR computation in
	pager_report_extent properly.
	
	* pager.c (pager_unlock_page) [case SINDIR; vblkno == 0]: Read
	from ....di_ib[INDIR_SINGLE] rather than invalid data before
	NP->dn->dinloc.

	* alloc.c (alloc) [nospace]: Unlock alloclock.
	(realloccg): Unlock alloclock before jumping to nospace.
	(blkpref) [!(lbn < NDADDR)]: Unlock alloclock before returning
	success.

	* sizes.c (diskfs_grow): When allocing a block past NDADDR, the
	tbl arg to blkpref is the table of direct block pointers
	NP->dn->sinloc, not the table of indirect block pointers
	...->di_ib. 

	* sizes.c (diskfs_grow): When writing into the SINDIR area, call
	sin_map instead of sin_remap if the sindir isn't already mapped.
	Also set np->allocsize *before* calling sin_map, but *after*
	calling sin_remap, to meet the requirements of those separate
	routines.

	* sizes.c (diskfs_grow): If END isn't bigger than NP->allocsize,
	then don't try and do anything.  In computation of LBN and the
	first use of NB, round up to block boundary correctly.  Don't
	attempt to realloc an old block if the size is 0 (in which case
	NB is -1 and unsigned comparison rules might foul things up).

Mon May 23 13:18:33 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* Makefile (ufs): Give -n in the proper order to rsh.

	* main.c: Include <hurd/startup.h>.

	* ufs.h (DONT_CACHE_MEMORY_OBJECTS): New compilation flag.
	* pager.c (pager_report_attributes): Deleted function.
	(MAY_CACHE): New macro; more useful form for using
	DONT_CACHE_MEMORY_OBJECTS.
	(sin_map, pager_init, diskfs_get_filemap): Provide new
	args in calls to pager_create.
	* sizes.c (MAY_CACHE): New macro; more useful form for
	using DONT_CACHE_MEMORY_OBJECTS.
	(diskfs_truncate): Use MAY_CACHE in calls to pager_change_attributes.

Fri May 20 18:52:41 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* sizes.c (diskfs_truncate): Force any delayed copies of the
	vanishing region to be taken immediately before stopping, and
	prevent any new delayed copies from being made until we are done
	manipulating things.
	(poke_pages): New function.
	* pager.c (pager_report_attributes): New function.

Wed May 18 15:51:40 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* alloc.c (alloc, realloccg, diskfs_alloc_node, alloccgblk,
	blkfree, diskfs_free_node, mapsearch): Added helpful strings to 
	asserts.
	(realloccg): Split up assert.

Tue May 17 13:26:22 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* main.c (main): Delete unused variable PROC.

Mon May 16 15:32:07 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* alloc.c (realloccg): When fragextend succeeds, bother to set
	*PBN.

	* sizes.c (diskfs_grow): In fragment growth case, NSIZE should 
	not be the amount to hold SIZE (SIZE is the amount the file is
	growing by), but rather the old size of the fragment plus the
	SIZE.

	* dir.c (diskfs_direnter case COMPRESS): Rewrite loop to deal
	properly with the case where from and to overlap.

Mon May  9 16:51:44 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* main.c (ufs_version): New variable.
	(save_argv): New variable.
	(main): Set save_argv.
	(diskfs_init_completed): New function.

Thu May  5 19:06:54 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* Makefile (exec_server_image.o): Use -n when calling rsh.

Thu May  5 07:39:38 1994  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)

	* Makefile ($(OBJS)): Use $(includedir) instead of $(headers) in deps.

