From 3a154d3cbff6b7110a67cf8a7dd12356a2a2a289 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jul 1996 22:55:08 +0000 Subject: Initial revision --- ufs/ChangeLog | 1586 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1586 insertions(+) create mode 100644 ufs/ChangeLog (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog new file mode 100644 index 00000000..368a2f59 --- /dev/null +++ b/ufs/ChangeLog @@ -0,0 +1,1586 @@ +Sat Jul 6 16:14:10 1996 Miles Bader + + * main.c (ufs_version): Variable removed. + +Sat Jul 6 12:45:36 1996 Michael I. Bushnell, p/BSG + + * inode.c (read_disknode): Don't set allocsize based on st->size + for kludged symlinks. + + * sizes.c (diskfs_truncate): Call record_poke after truncating a + kludged symlink. + +Wed Jul 3 13:27:04 1996 Michael I. Bushnell, p/BSG + + * main.c: Include . + (startup_parents, runtime_parents): Declare const. + +Tue Jun 25 14:02:02 1996 Miles Bader + + * main.c (diskfs_get_options): Include `--compat=' in options. + +Mon Jun 24 16:59:12 1996 Michael I. Bushnell, p/BSG + + * dir.c (diskfs_lookup_hard): Use diskfs_check_readonly instead of + diskfs_readonly. + (diskfs_dirempty): Likewise. + + * dir.c (diskfs_lookup_hard): Use diskfs_check_readonly instead of + diskfs_readonly. + (diskfs_dirempty): Likewise. + * inode.c (diskfs_cached_lookup): Likewise. + (read_symlink_hook): Likewise. + * sizes.c (diskfs_truncate): Call diskfs_check_readonly. + (diskfs_grow): Likewise. + * hyper.c (diskfs_set_hypermetadata): If CLEAN is not set, make + sure we clear the clean bit on disk. Always call sync_disk (with + appropriate WAIT). + (diskfs_readonly_changed): Don't do set_hypermetadata here. + (copy_sblock): Don't track clean state here. + + * pager.c (diskfs_shutdown_pager): Don't shutdown DISKPAGER ever, + just sync it instead. + +Sat Jun 22 17:45:34 1996 Miles Bader + + * main.c (diskfs_get_options): New function. + (options): Make const. + +Fri Jun 21 01:32:09 1996 Miles Bader + + * main.c (parse_opt): Handle runtime invalid selection of 4.2 mode. + Save select mode until we're done to correctly deal with external + errors at runtime. + (startup_parents, startup_argp, runtime_parents, runtime_argp): + New variables. + (main): Argp vars made global. + (argp_parents): diskfs_device_startup_argp --> + &diskfs_std_device_startup_argp. + +Sat Jun 15 13:57:27 1996 Miles Bader + + * main.c (options): New variable. + (parse_opt): New function. + (main): Parse ufs-specific options too. + : New include. + +Fri May 10 09:29:03 1996 Michael I. Bushnell, p/BSG + + * inode.c (diskfs_set_statfs): Fix one reference to old name of ST + member. + +Thu May 9 11:54:13 1996 Michael I. Bushnell, p/BSG + + * Makefile (ufs.static ufs): s/ioserver/iohelp/g + * ufs.h: ioserver.h -> iohelp.h. + + * inode.c (diskfs_set_statfs): Use and fill in new statfs + structure. + +Mon May 6 14:23:54 1996 Michael I. Bushnell, p/BSG + + * main.c (ufs_version): Upgrade to 0.0. + +Fri May 3 09:15:33 1996 Michael I. Bushnell, p/BSG + + * sizes.c (block_extended): Rewrite code that moves pages + to be more efficient, and not deadlock too, using unlocked + pagein permission feature (read "hack"). Return value + now indicates whether we expect a sync. + (diskfs_grow): If a call to block_extended returns nonzero, + then sync the file before returning. + * pager.c (diskfs_get_filemap): Initialize + UPI->allow_unlocked_pagein and UPI->unlocked_pagein_length. + (unlocked_pagein_lock): New variable. + (find_address): New parameter `isread'; all callers changed. + If ISREAD and we are in the unlocked pagein region, don't + attempt to acquire NP->dn->allocptrlock. + * ufs.h (struct user_pager_info): New members + `allow_unlocked_pagein' and `unlocked_pagein_length'. + (unlocked_pagein_lock): New variable. + +Thu May 2 10:56:10 1996 Michael I. Bushnell, p/BSG + + * sizes.c (offer_data): Offer pages at ADDR each time through the + loop, not the same page over and over. + (block_extended): When moving data, sync in-core pager both before + reading from disk and after providing data to kernel. + (diskfs_grow): Always call block_extended or offer_data before + adjusting block pointer. + +Tue Apr 30 13:38:42 1996 Michael I. Bushnell, p/BSG + + * sizes.c (diskfs_grow): In last offer_data, don't offer a block + number as an address. + +Fri Apr 26 15:35:53 1996 Michael I. Bushnell, p/BSG + + * Makefile (makemode): Now `servers'. + (targets): Renamed from `target'; now include ufs.static. + (ufs.static-LDFLAGS): Renamed from `LDFLAGS'. + (ufs.static): Depend on same things as `ufs'. + (include ../Makeconf): Must come before dependency information. + +Wed Apr 24 14:05:48 1996 Michael I. Bushnell, p/BSG + + * dir.h (DIRECT_NAMLEN) [! LITTLE_ENDIAN]: Deal correctly with the + case where it was written on a little endian machine without the + extension. + (DIRECT_NAMLEN) [LITTLE_ENDIAN]: Deal with case correctly where it + was written without the extension on a big endian machine. + * dir.c (dirscanblock): Use read/write_disk_entry when reading or + writing fields from directory entries. + (diskfs_direnter_hard): Likewise. + (diskfs_dirremove_hard): Likewise. + (diskfs_dirrewrite_hard): Likewise. + (diskfs_get_directs): Likewise. + (diskfs_dirempty): Likewise. + (count_dirents): Likewise. + +Tue Apr 23 11:28:42 1996 Michael I. Bushnell, p/BSG + + * dir.c (diskfs_dirempty): node_update -> diskfs_node_update. + + * hyper.c (swab_sblock, swab_csums): New functions. + (get_hypermetadata): If this is a swapped filesystem, set swab_disk. + Also swap csum and sblock after reading them. + (diskfs_set_hypermetadata): If swab_disk, swap the csums back before + writing them. + (copy_sblock): If swab_disk, swap the sblock before writing it. + * ufs.h (swab_disk): New variable. + (swab_short, swab_long, swab_long_long): New functions. + (read_disk_entry, write_disk_entry): New macros. + * alloc.c (ffs_realloccg): Use read/write_disk_entry when + reading/writing on-disk inode fields. + * bmap.c (fetch_indir_spec): Likewise. + * inode.c (read_disknode): Likewise. + (write_node): Likewise. + (diskfs_set_translator): Likewise. + (diskfs_get_translator): Likewise. + (diskfs_S_file_get_storage_info): Likewise. + * sizes.c (diskfs_truncate): Likewise. + (diskfs_grow): Likewise. + * pager.c (pager_unlock_page): Likewise. + * bmap.c (fetch_indir_spec): Use read/write_disk_entry when + reading/writing on-disk indirect blocks. + * sizes.c (diskfs_truncate): Likewise. + (indir_release): Likewise. + (diskfs_grow): Likewise. + * pager.c (pager_unlock_page): Likewise. + * alloc.c: Include + (ffs_blkpref): Use read_disk_entry when reading from BAP array. + (swab_cg, read_cg, release_cg): New functions. + (ffs_fragextend, ffs_alloccg, ffs_nodealloccg, ffs_blkfree, + diskfs_free_node): Use new cg access functions. + +Thu Apr 18 14:50:30 1996 Michael I. Bushnell, p/BSG + + * sizes.c (diskfs_grow): New variable `pagerpt'. + (offer_zeroes, block_extended): New functions. + (diskfs_grow): In initializing newly allocated data disk blocks with + zeroes, use less aggressive offer_zeroes instead of immediate + synchronous writes. After ffs_realloccg succeeds, use + block_extended to handle the magic. Get rid of old poke calls. + * alloc.c (ffs_realloccg): If we are allocating a new block, don't + actually free the old one here. + * sizes.c (diskfs_grow): New variable `pagerpt'. + (offer_zeroes, block_extended): New functions. + (diskfs_grow): In initializing newly allocated data disk blocks + with zeroes, use less aggressive offer_zeroes instead of immediate + synchronous writes. After ffs_realloccg succeeds, use + block_extended to handle the magic. Get rid of old poke calls. + +Tue Apr 16 15:20:07 1996 Michael I. Bushnell, p/BSG + + * dir.c (diskfs_lookup_hard): Set atime appropriately, and sync + the new atime if we are running synchronously (!). + (diskfs_dirempty): Likewise. + (diskfs_direnter_hard): Set mtime appropriately. + (diskfs_dirremove_hard): Likewise. + (diskfs_dirrewrite_hard): Likewise. + + * inode.c (diskfs_write_disknode): Only do sync if WAIT is set. + +Thu Apr 4 16:39:22 1996 Miles Bader + + * inode.c (diskfs_cached_lookup): Intialize NP->cache_id *after* + NP exists. + +Wed Apr 3 16:03:51 1996 Michael I. Bushnell, p/BSG + + * inode.c (diskfs_cached_lookup): Renamed from `iget'. All + callers changed. Initialize NP->cache_id. + +Fri Mar 29 16:52:31 1996 Michael I. Bushnell, p/BSG + + * sizes.c (diskfs_truncate): Cast DI->di_shortlink to correct type + before adding a character count to it. + +Mon Mar 25 13:08:10 1996 Michael I. Bushnell, p/BSG + + * dir.c (diskfs_null_dirstat): New function. + +Fri Mar 22 23:43:53 1996 Miles Bader + + * inode.c (read_symlink_hook): Only set NP's atime if !readonly. + +Wed Mar 20 14:36:31 1996 Michael I. Bushnell, p/BSG + + * dir.c (diskfs_lookup_hard): Don't do initial or final permission + checking here. + * dir.c (diskfs_dirrewrite_hard): Renamed from diskfs_dirrewrite. + No longer call modification tracking routines. + (diskfs_dirremove_hard): Renamed from diskfs_dirremove. No longer call + modification tracking routines. + (diskfs_direnter_hard): Renamed from diskfs_direnter. No longer call + modification tracking routines. + (diskfs_lookup_hard): Renamed from diskfs_lookup. + +Mon Mar 18 19:50:41 1996 Miles Bader + + * main.c (main): Pass new arg to argp_parse. + +Mon Mar 18 12:33:06 1996 Michael I. Bushnell, p/BSG + + * pager.c (diskfs_max_user_pager_prot) [add_pager_max_prot]: + (a == b) ? 1 : 0 ====> (a == b). + +Fri Feb 23 15:27:05 1996 Roland McGrath + + * hyper.c (get_hypermetadata): Use diskfs_device_arg in unclean msgs. + +Wed Feb 21 05:57:12 1996 Roland McGrath + + * hyper.c: Implement proper handling of the filesystem `clean bit'. + (ufs_clean): New variable. + (get_hypermetadata): Set it from the fs_clean flag. If not clean, + complain and force read-only. Complain when ignoring COMPAT_BSD42. + (diskfs_set_hypermetadata): Set the clean flag in the superblock + when CLEAN and fs was clean to start with. + (copy_sblock): Remove bogus clean flag frobnication. + +Fri Feb 16 17:05:36 1996 Miles Bader + + * main.c (main): Check error return from diskfs_init_diskfs. + +Sat Jan 6 11:50:14 1996 Roland McGrath + + * ufs.h (diskpager, diskpagerport, disk_image): Variables removed. + Include instead. + (sync_disk_blocks): Use `disk_pager' in place of `diskpager->p'. + * pager.c (diskfs_shutdown_pager, diskfs_sync_everything): Use + `disk_pager' in place of `diskpager->p'. + (create_disk_pager): Rewritten using disk_pager_setup. + * pokeloc.c (sync_disk): Use `disk_pager' in place of `diskpager->p'. + * sizes.c (indir_release): Likewise. + * main.c (diskfs_reload_global_state): Likewise. + +Thu Jan 4 19:10:11 1996 Roland McGrath + + * main.c (main): Don't map disk image here; create_disk_pager now + does it. + + * hyper.c (get_hypermetadata, copy_sblock): Don't put + diskfs_catch_exception () inside assert, bonehead! Use + assert_perror on a variable of its result. + +Mon Jan 1 16:38:14 1996 Michael I. Bushnell, p/BSG + + * pager.c (pager_unlock_page): When allocating block in direct + array, clear it synchronously just like we do when it goes in the + indirect array. + +Thu Nov 9 14:01:30 1995 Michael I. Bushnell, p/BSG + + * dir.c (struct dirstat): New member `nbytes'. + (dirscanblock): If DS->type is COMPRESS, still look + for TAKE/SHRINK possibilities. Also, if it's COMPRESS, + still look to see if the current block can be compressed + with fewer byte copies. + +Sun Nov 5 02:08:38 1995 Miles Bader + + * main.c (main): Add flags arg to diskfs_startup_diskfs call. + +Sat Nov 4 20:01:58 1995 Miles Bader + + * inode.c (diskfs_S_file_get_storage_info): Add FLAGS argument. + +Thu Oct 19 12:50:11 1995 Miles Bader + + * pager.c (diskfs_max_user_pager_prot): Return what we discovered, + instead of 1. + + * dir.c (diskfs_lookup, diskfs_dirempty): Give diskfs_get_filemap + a protection arg. + * sizes.c (diskfs_truncate, diskfs_grow): Ditto. + + * hyper.c (diskfs_readonly_changed): Give the 2nd arg to + vm_protect an appropiate type. + + * pager.c (diskfs_max_user_pager_prot): Stop iterating early if poss. + +Wed Oct 18 16:28:42 1995 Miles Bader + + * ufs.h (struct user_pager_info): Add max_prot field. + * pager.c (diskfs_get_filemap): Add PROT parameter, & use it. + (diskfs_pager_users): Split out block_caching & enable_caching. + (block_caching, enable_caching): New function. + (diskfs_max_user_pager_prot): New function. + + * main.c (main): Always include VM_PROT_WRITE in max prot. + * hyper.c (diskfs_readonly_changed): Change the protection of + DISK_IMAGE to reflect the new state. Clear SBLOCK_DIRTY if readonly. + + * inode.c (read_disknode): Bother to set the allocsize field. + + * ufs.h (struct rwlock): Structure deleted. + (rwlock_init, rwlock_reader_unlock, rwlock_reader_lock, + rwlock_writer_lock, rwlock_writer_unlock): Functions deleted. + + +Tue Oct 17 14:49:43 1995 Miles Bader + + * inode.c (diskfs_node_reload): New function. + (iget): Move allocsize setting into read_disknode. + * pager.c (flush_node_pager): New function. + * ufs.h (zeroblock, sblock, csum): Declare extern. + (flush_node_pager, flush_pokes): New declarations. + * pokeloc.c (flush_pokes): New function. + * hyper.c (diskfs_readonly_changed): New function. + (get_hypermetadata): Move compat_mode futzing & disk size + validation here from main. + (zeroblock, sblock, csum): Define (were common). + (get_hypermetadata): Only allocate SBLOCK if not already done. + Deallocate any old ZEROBLOCK and CSUM storage. + (diskfs_readonly_changed): New function. + * main.c (main): Move stuff into get_hypermetadata. + Writable init code moved to diskfs_readonly_changed. + (diskfs_reload_global_state): New function. + +Fri Oct 13 15:03:37 1995 Miles Bader + + * main.c (main): Use new handy diskfs routines and get rid of + tons of junk. Main should be almost all ufs-specific now. + (USAGE, usage, SHORT_OPTS, long_opts, parse_opt, trans_parse_arg): RIP. + (printf_lock): Initialize. + +Thu Oct 12 18:48:04 1995 Miles Bader + + * pager.c (pager_unlock_page, pager_write_page, pager_read_page): + Use diskfs_device_{read,write}_sync instead of dev_{read,write}_sync. + * hyper.c (diskfs_set_hypermetadata): Ditto. + * sizes.c (diskfs_grow): Ditto. + * pager.c (pager_report_extent): Calculate the pager size. + * ufs.h (dev_read_sync, dev_write_sync, dev_write, diskpagersize): + Decls removed. + + * Makefile (SRCS): Remove devio.c. + * ufs.h (ufs_device, ufs_device_name): Variables removed. + * inode.c (diskfs_S_file_get_storage_info): Use DISKFS_DEVICE + instead of UFS_DEVICE, and DISKFS_DEVICE_NAME instead of + UFS_DEVICE_NAME. + +Sat Oct 7 20:47:56 1995 Miles Bader + + * main.c (diskfs_init_completed): Function deleted (now in libdiskfs). + (thread_cancel): Function deleted. + +Fri Oct 6 17:30:23 1995 Miles Bader + + * inode.c (diskfs_S_file_get_storage_info): Change type of + ADDRESSES to off_t **, and add the BLOCK_SIZE parameter. + +Wed Oct 4 17:21:33 1995 Miles Bader + + * inode.c (diskfs_set_statfs): fsys_stb_bsize -> fsys_stb_iosize. + fsys_stb_fsize -> fsys_stb_bsize. + + * main.c (parse_opt): Rearrange slightly. + +Tue Sep 26 11:54:35 1995 Michael I. Bushnell, p/BSG + + * inode.c: Include . + (diskfs_S_file_get_storage_info): New function. + * main.c (main): Delete var `devname'. Use `ufs_device_name' + throughout instead. + * ufs.h (ufs_device_name): New var. + +Fri Sep 22 13:22:42 1995 Roland McGrath + + * hyper.c (get_hypermetadata): Use %Zd format for result of sizeof. + +Tue Sep 19 13:41:46 1995 Miles Bader + + * Makefile (LDFLAGS): New variable. + +Wed Sep 13 12:30:23 1995 Michael I. Bushnell, p/BSG + + * dir.c (diskfs_lookup): Don't attempt to lock NP if NPP is not + set. Don't even set NP if NPP is not set; use INUM as "lookup + succeeded flag" instead. Lookups for REMOVE and RENAME now *must* + set NPP. + +Wed Sep 6 11:01:50 1995 Miles Bader + + * pager.c (diskfs_pager_users): Ignore the disk pager when seeing + if there are any active pagers. + +Mon Aug 28 17:07:36 1995 Roland McGrath + + * Makefile (ufs): Depend on ../libshouldbeinlibc/libshouldbeinlibc.a. + +Fri Aug 25 17:14:09 1995 Michael I. Bushnell, p/BSG + + * sizes.c (diskfs_truncate): When freeing direct blocks mentioned + in a single indirect block, or single indirect blocks mentioned in + a double, only call the free routine (ffs_blkfree or + indir_release, respectively) if the block is actually allocated. + +Wed Aug 23 12:24:07 1995 Miles Bader + + * Makefile (ufs): Add explicit dependencies. + (HURDLIBS, LDFLAGS, REMHDRS): Removed. + Rules associated with ../lib removed. + +Fri Jul 21 17:48:12 1995 Michael I Bushnell + + * pager.c (diskfs_get_filemap): Drop initial reference created by + pager_create. + + * pager.c (diskfs_get_filemap): Avoid race with simultaneous + termination by looping until we win. + (pager_clear_user_data): Only clear UPI->np->dn->fileinfo if it + still points to us. + +Mon Jul 17 14:35:25 1995 Michael I Bushnell + + * pager.c (thread_function): Don't have any global timeout here; + we don't use it anyhow. + +Thu Jul 6 15:42:52 1995 Michael I Bushnell + + * Makefile: Removed dependencies that are now automatically + generated. + +Mon Jun 26 20:17:42 1995 Michael I Bushnell + + * pager.c: Include . + (diskfs_pager_users): New function. + +Thu Jun 22 11:41:04 1995 Michael I Bushnell + + * pager.c (thread_function): Move thread_function to be non-local, + of course, because it needs to live even after create_disk_pager + returns. + + * main.c (thread_cancel): New function (HACK). + + * Makefile (HURDLIBS): Add libihash. + + * main.c (main): Have main thread exit when done instead of + calling a diskfs function. + +Wed Jun 21 12:20:01 1995 Michael I Bushnell + + * ufs.h (user_pager_info): Removed members next and prevp. + * pager.c (pager_clear_user_data): Don't maintain pager linked + list. + (diskfs_get_filemap): Don't maintain pager linked list. + (pager_dropweak): New function. + (pager_traverse): Delete function. + (diskfs_shutdown_pager): Use ports_bucket_iterate instead of + pager_traverse. + (diskfs_sync_everything): Likewise. + + * pager.c (pager_bucket): New variable. + (create_disk_pager): Provide pager_bucket in call to pager_create. + (diskfs_get_filemap): Likewise. + (diskfs_file_update): Use ports reference calls directly instead + of pager wrappers. + (drop_pager_softrefs): Likewise. + (allow_pager_softrefs): Likewise. + (pager_traverse): Likewise. + (create_disk_pager): Initialize pager_bucket here and fork off + service thread for pager ports. + + * sizes.c (diskfs_truncate): Likewise. + + * dir.c (diskfs_lookup): Provide initialization for BUFLEN. + (diskfs_direnter): Move assignment out of if test. + +Tue Jun 20 11:48:06 1995 Michael I Bushnell + + * sizes.c (diskfs_grow): Provide initialization of POKE_OFF. + * alloc.c (ffs_realloccg): Remove assignment from if tests. + * sizes.c (diskfs_truncate): Likewise. + * bmap.c (fetch_indir_spec): Likewise. + +Mon Jun 19 21:17:21 1995 Michael I Bushnell + + * inode.c (diskfs_node_iterate): New function. + (write_all_disknodes): Use it. + +Wed Jun 14 16:18:55 1995 Michael I Bushnell + + * inode.c (diskfs_get_translator): Conform to new memory usage + semantic. + +Sat May 20 00:17:30 1995 Miles Bader + + * main.c (trans_parse_args): Use options_parse & + diskfs_standard_startup_options to parse our translator options. + (usage): New function. + (parse_opt): New function. + + * Makefile (CPPFLAGS): Add -I../lib, to get include lib include files, + and $(CPPFLAGS-$(notdir $<)) to get file-specific cpp options. + Add a vpath for %.c to ../lib, so we can use source files from there. + +Mon May 15 13:14:48 1995 Michael I Bushnell + + * pager.c (pager_clear_user_data): Doc fix. + +Sat May 13 05:04:11 1995 Roland McGrath + + * Makefile (OBJS): Remove exec_server_image.o. + (exec_server_image.o): Rule removed. + +Mon May 8 08:43:43 1995 Miles Bader + + * dir.c (diskfs_lookup): When looping back to try_again: because + we're looking up "..", be sure and trash the mapping we made of + the directory's pager -- otherwise the reference to the pager + never gets dropped and we can never free the node. + + * dir.c (diskfs_lookup): ds->type was being compared to LOOKING, which + value it can never have. Compare ds->stat against LOOKING instead. + + * pager.c (pager_clear_user_data): Don't die when called on the + disk pager. + + * inode.c (write_all_disknodes): Fix typo `alloc' --> `alloca'. + +Tue May 2 11:59:09 1995 Michael I Bushnell + + * pager.c (pager_clear_user_data): Acquire pagerlistlock around + modifications to UPI->next/prevp list structure. + +Fri Apr 28 19:02:05 1995 Michael I Bushnell + + * inode.c (write_all_disknodes): We have to really lock the nodes + around the calls to diskfs_set_node_times and write_node; this in + turn forces us to have real refereces. + +Thu Apr 13 16:36:57 1995 Miles Bader + + * main.c (main): Don't abort if a std file descriptor is already open. + +Tue Apr 4 20:08:25 1995 Michael I Bushnell + + * inode.c (diskfs_set_translator): When freeing passive + translator, account for blocks freed in NP->dn_stat.st_blocks. + +Fri Mar 31 13:43:27 1995 Michael I Bushnell + + * sizes.c (diskfs_truncate): Don't acquire writer lock on + NP->dn->allocptrlock until after forcing delayed copies through; + otherwise the pageins will deadlock attempting to get a reader + lock to service them. This is safe, because we only need + NP->allocsize here, and that can't change as long as we hold + NP->lock. + +Mon Mar 20 13:58:44 1995 Michael I Bushnell + + * consts.c (diskfs_synchronous): New variable. + +Fri Mar 17 14:31:04 1995 Michael I Bushnell + + * alloc.c (ffs_clusteracct): Make static. + (alloc_sync): New function. + (ffs_alloc): Call alloc_sync. + (ffs_realloccg): Likewise. + (diskfs_alloc_node): Likewise. + (ffs_blkfree): Likewise. + (diskfs_free_node): Likewise. + +Sat Jan 28 14:59:26 1995 Roland McGrath + + * Makefile (OBJS): Remove reference to libc's devstream.o. + +Fri Nov 11 11:45:38 1994 Michael I Bushnell + + * 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 + + * 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 + + * main.c (main): Behave more reasonably if we can't open DEVNAME. + +Tue Nov 8 00:03:20 1994 Roland McGrath + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * alloc.c (diskfs_alloc_node): Abort if free inode has + translator attached. + +Tue Oct 4 18:33:35 1994 Michael I Bushnell + + * pager.c (pager_unlock_page): Call diskfs_catch_exception. + +Tue Oct 4 00:16:04 1994 Michael I Bushnell + + * 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 + + * 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 + + * dir.h: Delete DT_* definitions; they are now in . + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + [ 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 + + [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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * main.c (trans_parse_args): Fix and enable. + +Tue Sep 6 11:29:55 1994 Michael I Bushnell + + * inode.c (iget): Remove old assert test that checked for bad + inode block allocations. + +Thu Sep 1 11:39:12 1994 Michael I Bushnell + + * tables.c: Don't include "ufs.h"; include . Then + this file can be used unmodified by fsck. + +Tue Aug 30 13:36:37 1994 Michael I Bushnell + + * inode.c (diskfs_set_translator): ffs_blkfree doesn't have + a return value. + +Mon Aug 29 12:49:17 1994 Michael I Bushnell + + * 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 + + * 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 + + * 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 + + * Makefile (LDFLAGS): New variable. + +Fri Aug 5 15:51:09 1994 Michael I Bushnell + + * 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 + + * Makefile: Rewritten in accord with new scheme. + +Wed Jul 20 13:28:38 1994 Michael I Bushnell + + * 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 . + Removed defn of struct timespec; now in . + +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 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 . 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 . 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 . 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 ; 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 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 . + + * 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. + -- cgit v1.2.3 From a904d903276ac928bd18f33a3fbef1fbb372ac63 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 23 Jul 1996 20:07:04 +0000 Subject: . --- ufs/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 368a2f59..2ccd6c11 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +Tue Jul 23 15:58:28 1996 Miles Bader + + * inode.c (write_node, read_disknode): `struct timespec' now uses + a field prefix of `tv_'. + Sat Jul 6 16:14:10 1996 Miles Bader * main.c (ufs_version): Variable removed. -- cgit v1.2.3 From 23f405001b6d3dff8607115c5d731126c54f4b9e Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 7 Aug 1996 19:03:53 +0000 Subject: *** empty log message *** --- ufs/ChangeLog | 13 +++++++ ufs/inode.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 2ccd6c11..c541523e 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,16 @@ +Wed Aug 7 13:00:30 1996 Thomas Bushnell, n/BSG + + * inode.c (struct ufs_fhandle): Layout filehandle more like Unixy + NFSD. + (diskfs_S_file_getfh): Bother to clear unused parts of a + file handle so that they always compare equal. + +Tue Aug 6 12:19:38 1996 Thomas Bushnell, n/BSG + + * inode.c: Include . + (struct ufs_fhandle): New type. + (diskfs_S_fsys_getfile, diskfs_S_file_getfh): New functions. + Tue Jul 23 15:58:28 1996 Miles Bader * inode.c (write_node, read_disknode): `struct timespec' now uses diff --git a/ufs/inode.c b/ufs/inode.c index 640e6b6f..27f7c3bb 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -20,6 +20,7 @@ #include #include #include +#include #define INOHSZ 512 #if ((INOHSZ&(INOHSZ-1)) == 0) @@ -723,4 +724,125 @@ diskfs_S_file_get_storage_info (struct protid *cred, return 0; } +/* Must be exactly 28 bytes long */ +struct ufs_fhandle +{ + int filler1; + ino_t inum; + long gen; + int filler2[4]; +}; + +/* Return an NFS file handle */ + +error_t +diskfs_S_file_getfh (struct protid *cred, + char **fh, + u_int *fh_len) +{ + struct node *np; + error_t err; + struct ufs_fhandle *f; + + if (!cred) + return EOPNOTSUPP; + + if (!diskfs_isuid (0, cred)) + return EPERM; + + np = cred->po->np; + + mutex_lock (&np->lock); + + if (*fh_len < sizeof (struct ufs_fhandle)) + vm_allocate (mach_task_self (), (vm_address_t *) fh, + sizeof (struct ufs_fhandle), 1); + *fh_len = sizeof (struct ufs_fhandle); + + f = (struct ufs_fhandle *) *fh; + f->inum = np->dn->number; + f->gen = np->dn_stat.st_gen; + f->filler1 = 0; + f->filler2[0] = f->filler2[1] = f->filler2[2] = f->filler2[3] = 0; + mutex_unlock (&np->lock); + return 0; +} + +/* Lookup an NFS file handle */ +error_t +diskfs_S_fsys_getfile (mach_port_t fsys, + mach_port_t reply, + mach_msg_type_name_t replytype, + uid_t *uids, + u_int nuids, + uid_t *gids, + u_int ngids, + char *handle, + u_int handlelen, + mach_port_t *file, + mach_msg_type_name_t *filetype) +{ + struct port_info *pt = ports_lookup_port (diskfs_port_bucket, fsys, + diskfs_control_class); + struct node *np; + struct ufs_fhandle *f; + error_t err; + int flags; + struct protid fakecred, *newpi; + + if (!pt) + return EOPNOTSUPP; + + if (handlelen != sizeof (struct ufs_fhandle)) + { + ports_port_deref (pt); + return EINVAL; + } + + f = (struct ufs_fhandle *) handle; + + err = diskfs_cached_lookup (f->inum, &np); + if (err) + { + ports_port_deref (pt); + return err; + } + + if (np->dn_stat.st_gen != f->gen) + { + diskfs_nput (np); + ports_port_deref (pt); + return ESTALE; + } + + /* This call should have a flags arg, but until then... */ + fakecred.uids = uids; + fakecred.gids = gids; + fakecred.nuids = nuids; + fakecred.ngids = ngids; + + flags = 0; + if (!diskfs_access (np, S_IREAD, &fakecred)) + flags |= O_READ; + if (!diskfs_access (np, S_IEXEC, &fakecred)) + flags |= O_EXEC; + if (!diskfs_access (np, S_IWRITE, &fakecred) + && !S_ISDIR (np->dn_stat.st_mode) + && !diskfs_check_readonly ()) + flags |= O_WRITE; + + err = diskfs_create_protid (diskfs_make_peropen (np, flags, MACH_PORT_NULL), + uids, nuids, gids, ngids, &newpi); + + diskfs_nput (np); + ports_port_deref (pt); + + if (!err) + { + *file = ports_get_right (newpi); + *filetype = MACH_MSG_TYPE_MAKE_SEND; + } + return err; +} + -- cgit v1.2.3 From 9bcf73b12b79ee9c321a27338677942f6faa05d5 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 12 Aug 1996 18:31:04 +0000 Subject: *** empty log message *** --- ufs-fsck/ChangeLog | 4 ++++ ufs-fsck/Makefile | 2 +- ufs/ChangeLog | 11 +++++++++ ufs/devio.c | 70 ------------------------------------------------------ ufs/hyper.c | 25 ++++++++++++------- ufs/inode.c | 4 ++-- 6 files changed, 34 insertions(+), 82 deletions(-) delete mode 100644 ufs/devio.c (limited to 'ufs/ChangeLog') diff --git a/ufs-fsck/ChangeLog b/ufs-fsck/ChangeLog index 8fcde4b2..615e6458 100644 --- a/ufs-fsck/ChangeLog +++ b/ufs-fsck/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 12 11:39:12 1996 Thomas Bushnell, n/BSG + + * Makefile (dir): Now ufs-fsck. + Tue Jul 23 19:32:09 1996 Miles Bader * inode.c (allocino): `struct timespec' now uses a field prefix diff --git a/ufs-fsck/Makefile b/ufs-fsck/Makefile index f68fe52a..8725de8e 100644 --- a/ufs-fsck/Makefile +++ b/ufs-fsck/Makefile @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -dir := fsck +dir := ufs-fsck makemode := utility SRCS = dir.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \ diff --git a/ufs/ChangeLog b/ufs/ChangeLog index c541523e..2b964cf9 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,5 +1,16 @@ +Mon Aug 12 13:43:46 1996 Thomas Bushnell, n/BSG + + * hyper.c (diskfs_set_hypermetadata): Bother to return 0 at end of + function. + Wed Aug 7 13:00:30 1996 Thomas Bushnell, n/BSG + * inode.c (diskfs_set_statfs): Compute st->f_blocks correctly; set + bsize to be fs_fsize, not fs_bsize. + + * hyper.c (diskfs_set_hypermetadata): Return an error as + appropriate. + * inode.c (struct ufs_fhandle): Layout filehandle more like Unixy NFSD. (diskfs_S_file_getfh): Bother to clear unused parts of a diff --git a/ufs/devio.c b/ufs/devio.c deleted file mode 100644 index 2e5cc332..00000000 --- a/ufs/devio.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Device input and output - Copyright (C) 1992, 1993, 1994 Free Software Foundation - -This file is part of the GNU Hurd. - -The GNU Hurd is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -The GNU Hurd is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the GNU Hurd; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Written by Michael I. Bushnell. */ - -#include "ufs.h" -#include -#include - -/* Write disk block ADDR with DATA of LEN bytes, waiting for completion. */ -error_t -dev_write_sync (daddr_t addr, - vm_address_t data, - long len) -{ - int foo; - assert (!diskfs_readonly); - if (device_write (ufs_device, 0, addr, (io_buf_ptr_t) data, len, &foo) - || foo != len) - return EIO; - return 0; -} - -/* Write diskblock ADDR with DATA of LEN bytes; don't bother waiting - for completion. */ -error_t -dev_write (daddr_t addr, - vm_address_t data, - long len) -{ - assert (!diskfs_readonly); - if (device_write_request (ufs_device, MACH_PORT_NULL, 0, addr, - (io_buf_ptr_t) data, len)) - return EIO; - return 0; -} - -static int deverr; - -/* Read disk block ADDR; put the address of the data in DATA; read LEN - bytes. Always *DATA should be a full page no matter what. */ -error_t -dev_read_sync (daddr_t addr, - vm_address_t *data, - long len) -{ - int foo; - deverr = device_read (ufs_device, 0, addr, len, (io_buf_ptr_t *)data, - (u_int *)&foo); - if (deverr || foo != len) - return EIO; - return 0; -} - diff --git a/ufs/hyper.c b/ufs/hyper.c index e4f58249..cb644797 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -276,7 +276,7 @@ get_hypermetadata (void) taken from ordinary data blocks and might not be an even number of pages; in that case writing it through the pager would nuke whatever pages came after it on the disk and were backed by file pagers. */ -void +error_t diskfs_set_hypermetadata (int wait, int clean) { vm_address_t buf; @@ -294,16 +294,22 @@ diskfs_set_hypermetadata (int wait, int clean) err = diskfs_device_read_sync (fsbtodb (sblock, sblock->fs_csaddr), &buf, bufsize); - if (!err) + if (err) + return err; + + bcopy (csum, (void *) buf, sblock->fs_cssize); + if (swab_disk) + swab_csums ((struct csum *)buf); + err = diskfs_device_write_sync (fsbtodb (sblock, sblock->fs_csaddr), + buf, bufsize); + vm_deallocate (mach_task_self (), buf, bufsize); + + if (err) { - bcopy (csum, (void *) buf, sblock->fs_cssize); - if (swab_disk) - swab_csums ((struct csum *)buf); - diskfs_device_write_sync (fsbtodb (sblock, sblock->fs_csaddr), - buf, bufsize); - csum_dirty = 0; - vm_deallocate (mach_task_self (), buf, bufsize); + spin_unlock (&alloclock); + return err; } + csum_dirty = 0; } if (clean && ufs_clean && !sblock->fs_clean) @@ -326,6 +332,7 @@ diskfs_set_hypermetadata (int wait, int clean) copy_sblock (); sync_disk (wait); + return 0; } /* Copy the sblock into the disk */ diff --git a/ufs/inode.c b/ufs/inode.c index 27f7c3bb..ae323a8c 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -498,8 +498,8 @@ error_t diskfs_set_statfs (struct statfs *st) { st->f_type = FSTYPE_UFS; - st->f_bsize = sblock->fs_bsize; - st->f_blocks = sblock->fs_dsize * sblock->fs_frag; + st->f_bsize = sblock->fs_fsize; + st->f_blocks = sblock->fs_dsize; st->f_bfree = (sblock->fs_cstotal.cs_nbfree * sblock->fs_frag + sblock->fs_cstotal.cs_nffree); st->f_bavail = ((sblock->fs_dsize * (100 - sblock->fs_minfree) / 100) -- cgit v1.2.3 From 2729a2406f00c668611d0151b142d97d3607e599 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Thu, 29 Aug 1996 20:14:18 +0000 Subject: *** empty log message *** --- ufs/ChangeLog | 21 +++++++++++++++++++++ ufs/dir.c | 53 +++++++++++++++++++++++++++++++++++++++++------------ ufs/inode.c | 1 + ufs/ufs.h | 2 ++ 4 files changed, 65 insertions(+), 12 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 2b964cf9..934c9856 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,24 @@ +Thu Aug 29 16:07:07 1996 Thomas Bushnell, n/BSG + + * dir.c (diskfs_lookup_hard): When setting ds->stat to EXTEND, set + ds->idx by looking at the size of the file. (IDX itself is no + longer at the end because of the change on Aug 16 1996.) + +Wed Aug 28 12:15:15 1996 Thomas Bushnell, n/BSG + + * dir.c (dirscanblock): Size dirents correctly when mallocing it. + (diskfs_direnter_hard): Be more careful when sizing or resizing + dirents. Correctly set to -1 all the new entries we create after + realloc call. + +Fri Aug 16 18:51:31 1996 Thomas Bushnell, n/BSG + + * ufs.h (struct disknode): New member `dir_idx'. + * inode.c (diskfs_cached_lookup): Initialize DN->dir_idx. + * dir.c (diskfs_lookup_hard): After successful dirscanblock, + record index where we finished in DP->dn->dir_idx. Start searches + at that index. + Mon Aug 12 13:43:46 1996 Thomas Bushnell, n/BSG * hyper.c (diskfs_set_hypermetadata): Bother to return 0 at end of diff --git a/ufs/dir.c b/ufs/dir.c index d015a6c6..397481d0 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -111,7 +111,8 @@ diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type, vm_address_t buf = 0; vm_size_t buflen = 0; int blockaddr; - int idx; + int idx, lastidx; + int looped; if ((type == REMOVE) || (type == RENAME)) assert (npp); @@ -156,18 +157,39 @@ diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type, if (!diskfs_check_readonly ()) dp->dn_set_atime = 1; - for (blockaddr = buf, idx = 0; - blockaddr - buf < dp->dn_stat.st_size; - blockaddr += DIRBLKSIZ, idx++) + /* Start the lookup at DP->dn->dir_idx. */ + idx = dp->dn->dir_idx; + if (idx * DIRBLKSIZ > dp->dn_stat.st_size) + idx = 0; /* just in case */ + blockaddr = buf + idx * DIRBLKSIZ; + looped = (idx == 0); + lastidx = idx; + if (lastidx == 0) + lastidx = dp->dn_stat.st_size / DIRBLKSIZ; + + while (!looped || idx < lastidx) { err = dirscanblock (blockaddr, dp, idx, name, namelen, type, ds, &inum); if (!err) - break; + { + dp->dn->dir_idx = idx; + break; + } if (err != ENOENT) { vm_deallocate (mach_task_self (), buf, buflen); return err; } + + blockaddr += DIRBLKSIZ; + idx++; + if (blockaddr - buf >= dp->dn_stat.st_size && !looped) + { + /* We've gotten to the end; start back at the beginning */ + looped = 1; + blockaddr = buf; + idx = 0; + } } if (!diskfs_check_readonly ()) @@ -258,7 +280,7 @@ diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type, /* We didn't find any room, so mark ds to extend the dir */ ds->type = CREATE; ds->stat = EXTEND; - ds->idx = idx; + ds->idx = dp->dn_stat.st_size / DIRBLKSIZ; } /* Return to the user; if we can't, release the reference @@ -422,8 +444,8 @@ dirscanblock (vm_address_t blockaddr, struct node *dp, int idx, char *name, down how many entries there were. */ if (!dp->dn->dirents) { - dp->dn->dirents = malloc ((dp->dn_stat.st_size / DIRBLKSIZ + 1) - * sizeof (int)); + dp->dn->dirents = malloc ((dp->dn_stat.st_size / DIRBLKSIZ) + * sizeof (int)); for (i = 0; i < dp->dn_stat.st_size/DIRBLKSIZ; i++) dp->dn->dirents[i] = -1; } @@ -595,19 +617,26 @@ diskfs_direnter_hard(struct node *dp, } else { + int i; /* It's cheap, so start a count here even if we aren't counting anything at all. */ if (dp->dn->dirents) { dp->dn->dirents = realloc (dp->dn->dirents, - (ds->idx + 1) * sizeof (int)); + (dp->dn_stat.st_size / DIRBLKSIZ + * sizeof (int))); + for (i = oldsize / DIRBLKSIZ; + i < dp->dn_stat.st_size / DIRBLKSIZ; + i++) + dp->dn->dirents[i] = -1; + dp->dn->dirents[ds->idx] = 1; } else { - int i; - dp->dn->dirents = malloc ((ds->idx + 1) * sizeof (int)); - for (i = 0; i < ds->idx; i++) + dp->dn->dirents = malloc (dp->dn_stat.st_size / DIRBLKSIZ + * sizeof (int)); + for (i = 0; i < dp->dn_stat.st_size / DIRBLKSIZ; i++) dp->dn->dirents[i] = -1; dp->dn->dirents[ds->idx] = 1; } diff --git a/ufs/inode.c b/ufs/inode.c index ae323a8c..b06cb8d4 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -69,6 +69,7 @@ diskfs_cached_lookup (int inum, struct node **npp) dn->number = inum; dn->dirents = 0; + dn->dir_idx = 0; rwlock_init (&dn->allocptrlock); dn->dirty = 0; diff --git a/ufs/ufs.h b/ufs/ufs.h index ea13475e..f4b36ea5 100644 --- a/ufs/ufs.h +++ b/ufs/ufs.h @@ -36,6 +36,8 @@ struct disknode { ino_t number; + int dir_idx; + /* For a directory, this array holds the number of directory entries in each DIRBLKSIZE piece of the directory. */ int *dirents; -- cgit v1.2.3 From fa7a1850df5b233ac58e9ab4110a94601319fdea Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 6 Sep 1996 22:19:58 +0000 Subject: *** empty log message *** --- ufs-fsck/ChangeLog | 4 ++++ ufs-fsck/main.c | 2 +- ufs/ChangeLog | 7 +++++++ ufs/consts.c | 7 +++---- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs-fsck/ChangeLog b/ufs-fsck/ChangeLog index d4e404b2..6c1e84a2 100644 --- a/ufs-fsck/ChangeLog +++ b/ufs-fsck/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 6 16:44:07 1996 Thomas Bushnell, n/BSG + + * main.c (argp_program_version): Fix typo. + Thu Sep 5 11:42:21 1996 Thomas Bushnell, n/BSG * main.c: Include . diff --git a/ufs-fsck/main.c b/ufs-fsck/main.c index c159b170..ed651795 100644 --- a/ufs-fsck/main.c +++ b/ufs-fsck/main.c @@ -25,7 +25,7 @@ #include "fsck.h" -char *argp_program_version = STANDARD_HURD_VERSION (fsck.ufs) +char *argp_program_version = STANDARD_HURD_VERSION (fsck.ufs); char *lfname = "lost+found"; mode_t lfmode = 0755; diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 934c9856..896297d4 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,10 @@ +Fri Sep 6 16:00:42 1996 Thomas Bushnell, n/BSG + + * consts.c: Include . + (diskfs_major_version, diskfs_minor_version, diskfs_edit_version): + Deleted variables. + (diskfs_server_version): New variable. + Thu Aug 29 16:07:07 1996 Thomas Bushnell, n/BSG * dir.c (diskfs_lookup_hard): When setting ds->stat to EXTEND, set diff --git a/ufs/consts.c b/ufs/consts.c index 6698c5f4..1e855fba 100644 --- a/ufs/consts.c +++ b/ufs/consts.c @@ -1,5 +1,5 @@ /* Various constants wanted by the diskfs library - Copyright (C) 1994, 1995 Free Software Foundation + Copyright (C) 1994, 1995, 1996 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -16,6 +16,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "ufs.h" +#include int diskfs_link_max = LINK_MAX; int diskfs_maxsymlinks = 8; @@ -25,7 +26,5 @@ int diskfs_shortcut_blkdev = 1; int diskfs_shortcut_fifo = 1; int diskfs_shortcut_ifsock = 1; char *diskfs_server_name = "ufs"; -int diskfs_major_version = 0; -int diskfs_minor_version = 0; -int diskfs_edit_version = 0; +char *diskfs_server_version = HURD_VERSION; int diskfs_synchronous = 0; -- cgit v1.2.3 From 447352af2fb7582f49e0efaf48d5b2360be8c514 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 17 Sep 1996 16:43:48 +0000 Subject: *** empty log message *** --- ufs-fsck/ChangeLog | 8 ++++++++ ufs-fsck/Makefile | 6 +++--- ufs/ChangeLog | 6 ++++++ ufs/Makefile | 3 ++- 4 files changed, 19 insertions(+), 4 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs-fsck/ChangeLog b/ufs-fsck/ChangeLog index 6c1e84a2..096d8c07 100644 --- a/ufs-fsck/ChangeLog +++ b/ufs-fsck/ChangeLog @@ -1,3 +1,11 @@ +Thu Sep 12 16:40:10 1996 Thomas Bushnell, n/BSG + + * Makefile (HURDLIBS): New variable. + ($(target)): Delete special depedency. + + * Makefile (vpath tables.c): Put after Makeconf inclusion to catch + setting of $(top_srcdir). + Fri Sep 6 16:44:07 1996 Thomas Bushnell, n/BSG * main.c (argp_program_version): Fix typo. diff --git a/ufs-fsck/Makefile b/ufs-fsck/Makefile index 8725de8e..a484428e 100644 --- a/ufs-fsck/Makefile +++ b/ufs-fsck/Makefile @@ -27,9 +27,9 @@ OBJS = $(subst .c,.o,$(SRCS)) tables.o LCLHDRS = fsck.h target = fsck.ufs installationdir = $(sbindir) +HURDLIBS=shouldbeinlibc -vpath tables.c $(top_srcdir)/ufs +include ../Makeconf -$(target): ../libshouldbeinlibc/libshouldbeinlibc.a +vpath tables.c $(top_srcdir)/ufs -include ../Makeconf diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 896297d4..e74328ce 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 12 16:36:19 1996 Thomas Bushnell, n/BSG + + * Makefile (HURDLIBS): New variable. + (ufs.static ufs): Depend on $(library_deps) instead of long list + of libraries. + Fri Sep 6 16:00:42 1996 Thomas Bushnell, n/BSG * consts.c: Include . diff --git a/ufs/Makefile b/ufs/Makefile index d9375989..8d99925b 100644 --- a/ufs/Makefile +++ b/ufs/Makefile @@ -24,10 +24,11 @@ SRCS = alloc.c consts.c dir.c hyper.c inode.c main.c pager.c \ LCLHDRS = ufs.h fs.h dinode.h dir.h OBJS = $(SRCS:.c=.o) +HURDLIBS = diskfs ports pager iohelp fshelp threads ihash shouldbeinlibc ufs.static-LDFLAGS += -static include ../Makeconf -ufs.static ufs: $(OBJS) ../libdiskfs/libdiskfs.a ../libports/libports.a ../libpager/libpager.a ../libiohelp/libiohelp.a ../libfshelp/libfshelp.a ../libthreads/libthreads.a ../libihash/libihash.a ../libshouldbeinlibc/libshouldbeinlibc.a +ufs.static ufs: $(OBJS) $(library_deps) -- cgit v1.2.3 From db7941c146278cd195b850b659d8ec82e5aa8347 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 23 Sep 1996 17:26:31 +0000 Subject: . --- ufs/ChangeLog | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index e74328ce..40d03163 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,80 @@ +Thu Sep 19 18:02:40 1996 Miles Bader + + * Makefile (HURDLIBS): Add store. + +Wed Sep 18 15:30:00 1996 Miles Bader + + * inode.c (diskfs_S_file_get_storage_info): Narrow scope of RUN. + + * consts.c (diskfs_extra_version): New variable. + + * main.c (main): Remove CLASSES argument to store_parsed_open. + Use STORE_PARAMS variable to get result from parsing STORE_ARGP. + Don't force COMPAT_GNU on bootstrap filesystems (it's the default + anyway). + +Mon Sep 16 13:27:38 1996 Miles Bader + + * Makefile (ufs.static ufs): Add ../libstore/libstore.a. + + * hyper.c (zeroblock): Change type to `void *'. + (get_hypermetadata): Cast ZEROBLOCK when vm_{de,}allocating. + * ufs.h (zeroblock): Change type to `void *'. + * sizes.c (diskfs_truncate): Don't cast ZEROBLOCK to diskfs_node_rw. + (block_extended, diskfs_grow): Do cast it to offer_data. + + * main.c (main): Don't set DISKFS_USE_MACH_DEVICE (which is no longer). + + * inode.c (diskfs_S_file_get_storage_info): Coalesce adjacent + blocks when constructing RUNS. + Set *PORTS_TYPE, not *STORAGE_PORT_TYPE. + * inode.c (diskfs_S_file_getfh): Variable ERR removed. + + * sizes.c (indir_release): Use DISKFS_DISK_PAGER instead of DISK_PAGER. + * ufs.h (sync_disk_blocks): Likewise. + * pokeloc.c (sync_disk): Likewise. + * main.c (diskfs_reload_global_state): Likewise. + * pager.c (create_disk_pager, diskfs_shutdown_pager, + diskfs_sync_everything): Likewise. + * main.c , : New includes. + * hyper.c, pager.c, inode.c : New include. + (get_hypermetadata): Use %Zd for printfing size_t. + (diskfs_set_hypermetadata): Return EIO for incomplete writes. + Cast BUF when calling vm_deallocate. + + * dir.c (diskfs_direnter_hard): Initialize OLDSIZE to shut up gcc. + +Sat Sep 14 20:38:47 1996 Miles Bader + + * ufs.h (store, store_parsed, disk_image): New declarations. + + * pager.c (thread_function): Function removed. + (create_disk_pager): Create PAGER_BUCKET. + Use diskfs_start_disk_pager instead of disk_pager_setup. + (disk_image): New variable. + + * main.c (store, store_parsed, diskfs_disk_name): New variables. + (parse_opt): Propagate our input to the first child parser. + (diskfs_append_args): New function. + (diskfs_get_options): Function removed. + (startup_parents): Use DISKFS_STORE_STARTUP_ARGP instead of + DISKFS_STD_DEVICE_STARTUP_ARGP. + + * hyper.c (get_hypermetadata): Use DISKFS_DISK_NAME instead of + DISKFS_DEVICE_ARG. + * main.c (main): Likewise. + + * hyper.c (get_hypermetadata, diskfs_readonly_changed): Use + fields in STORE instead of DISKFS_DEVICE_* variables. + * inode.c (diskfs_S_file_get_storage_info): Likewise. + * pager.c (pager_report_extent): Likewise. + * main.c (main): Likewise. + * pager.c (pager_read_page, pager_write_page, pager_unlock_page): + Use store_{read,write} instead of diskfs_device_{read,write}_sync. + * hyper.c (diskfs_set_hypermetadata): Likewise. + * inode.c (diskfs_S_file_get_storage_info): Rewrite to use + libstore functions (still has NDADDR block limit, though). + Thu Sep 12 16:36:19 1996 Thomas Bushnell, n/BSG * Makefile (HURDLIBS): New variable. -- cgit v1.2.3 From 082a3a45cd55b33d05223b6942c804de8f844384 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 24 Oct 1996 22:43:50 +0000 Subject: . --- ufs/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 40d03163..2c81dbc3 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,10 @@ +Thu Oct 24 16:07:17 1996 Miles Bader + + * main.c (startup_children, runtime_children): New variables. + (startup_parents, runtime_parents): Variables removed. + (startup_argp, runtime_argp): Use new *_CHILDREN variables instead of + corresponding *_PARENT ones. + Thu Sep 19 18:02:40 1996 Miles Bader * Makefile (HURDLIBS): Add store. -- cgit v1.2.3 From 00b56b8817816a221ed49d07c14d5c93a079da4d Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 18 Nov 1996 23:59:08 +0000 Subject: Sat Nov 16 17:21:40 1996 Thomas Bushnell, n/BSG * inode.c (diskfs_S_fsys_getfile): Delete var `fakecred'. diskfs_access -> fshelp_access. * alloc.c (ffs_alloc): diskfs_isuid -> idvec_contains. (ffs_realloccg): Likewise. Thu Nov 14 16:43:36 1996 Thomas Bushnell, n/BSG * inode.c (diskfs_S_file_getfh): diskfs_isuid -> idvec_contains. (diskfs_S_fsys_getfile): Use idvecs and iousers. --- ufs/ChangeLog | 12 ++++++++++++ ufs/alloc.c | 5 +++-- ufs/inode.c | 27 ++++++++++++++++----------- 3 files changed, 31 insertions(+), 13 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 2c81dbc3..4ca29dee 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,15 @@ +Sat Nov 16 17:21:40 1996 Thomas Bushnell, n/BSG + + * inode.c (diskfs_S_fsys_getfile): Delete var `fakecred'. + diskfs_access -> fshelp_access. + * alloc.c (ffs_alloc): diskfs_isuid -> idvec_contains. + (ffs_realloccg): Likewise. + +Thu Nov 14 16:43:36 1996 Thomas Bushnell, n/BSG + + * inode.c (diskfs_S_file_getfh): diskfs_isuid -> idvec_contains. + (diskfs_S_fsys_getfile): Use idvecs and iousers. + Thu Oct 24 16:07:17 1996 Miles Bader * main.c (startup_children, runtime_children): New variables. diff --git a/ufs/alloc.c b/ufs/alloc.c index 90ce68f5..15d53180 100644 --- a/ufs/alloc.c +++ b/ufs/alloc.c @@ -247,7 +247,7 @@ ffs_alloc(register struct node *np, spin_lock (&alloclock); if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0) goto nospace; - if (cred && !diskfs_isuid (0, cred) + if (cred && !idvec_contains (cred->user->uids, 0) && freespace(fs, fs->fs_minfree) <= 0) goto nospace; #ifdef QUOTA @@ -323,7 +323,8 @@ ffs_realloccg(register struct node *np, spin_lock (&alloclock); - if (!diskfs_isuid (0, cred) && freespace(fs, fs->fs_minfree) <= 0) + if (!idvec_contains (cred->user->uids, 0) + && freespace(fs, fs->fs_minfree) <= 0) goto nospace; error = diskfs_catch_exception (); if (error) diff --git a/ufs/inode.c b/ufs/inode.c index 47aa6ac9..a0f16642 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -716,7 +716,7 @@ diskfs_S_file_getfh (struct protid *cred, if (!cred) return EOPNOTSUPP; - if (!diskfs_isuid (0, cred)) + if (!idvec_contains (cred->user->uids, 0)) return EPERM; np = cred->po->np; @@ -757,7 +757,9 @@ diskfs_S_fsys_getfile (mach_port_t fsys, struct ufs_fhandle *f; error_t err; int flags; - struct protid fakecred, *newpi; + struct protid *newpi; + struct idvec *uvec, *gvec; + struct iouser *user; if (!pt) return EOPNOTSUPP; @@ -784,24 +786,27 @@ diskfs_S_fsys_getfile (mach_port_t fsys, return ESTALE; } - /* This call should have a flags arg, but until then... */ - fakecred.uids = uids; - fakecred.gids = gids; - fakecred.nuids = nuids; - fakecred.ngids = ngids; + uvec = make_idvec (); + gvec = make_idvec (); + idvec_set_ids (uvec, uids, nuids); + idvec_set_ids (gvec, gids, ngids); + user = iohelp_create_iouser (uvec, gvec); + flags = 0; - if (!diskfs_access (np, S_IREAD, &fakecred)) + if (!fshelp_access (&np->dn_stat, S_IREAD, user)) flags |= O_READ; - if (!diskfs_access (np, S_IEXEC, &fakecred)) + if (!fshelp_access (&np->dn_stat, S_IEXEC, user)) flags |= O_EXEC; - if (!diskfs_access (np, S_IWRITE, &fakecred) + if (!fshelp_access (&np->dn_stat, S_IWRITE, user) && !S_ISDIR (np->dn_stat.st_mode) && !diskfs_check_readonly ()) flags |= O_WRITE; err = diskfs_create_protid (diskfs_make_peropen (np, flags, MACH_PORT_NULL), - uids, nuids, gids, ngids, &newpi); + user, &newpi); + + iohelp_free_iouser (user); diskfs_nput (np); ports_port_deref (pt); -- cgit v1.2.3 From 7eaadcab20d3580b4248be866188786cb0536d8c Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 19 Nov 1996 23:19:17 +0000 Subject: . --- ufs/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 4ca29dee..20921669 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,14 @@ +Mon Nov 18 17:10:00 1996 Miles Bader + + * inode.c (read_disknode): When setting ST->st_mode, Clear + S_ITRANS bits, and set S_IPTRANS if necessary. Don't set + NP->istranslated anymore. + (diskfs_set_translator): Frob S_IPTRANS bit in mode bits instead + of NP->istranslated. + (write_node): Don't write any bits in S_ITRANS to disk. + * alloc.c (ffs_alloc): Use S_IPTRANS in NP->dn_stat.st_mode + instead of NP->istranslated. + Sat Nov 16 17:21:40 1996 Thomas Bushnell, n/BSG * inode.c (diskfs_S_fsys_getfile): Delete var `fakecred'. -- cgit v1.2.3 From 34accef1c2f1d27a3af0de37ce67a16dc5a1a5ca Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 20 Nov 1996 02:54:47 +0000 Subject: . --- ufs/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 20921669..41f2347c 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +Tue Nov 19 18:28:26 1996 Miles Bader + + * inode.c (read_disknode): If SBLOCK->fs_inodefmt < FS_44INODEFMT, + set ST->st_author to st->st_uid, and NP->author_tracks_uid to true. + (diskfs_validate_author_change): New function. + Mon Nov 18 17:10:00 1996 Miles Bader * inode.c (read_disknode): When setting ST->st_mode, Clear -- cgit v1.2.3 From 606fe786cb5782808b18e14e9f925a813d8b8a61 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 6 Feb 1997 07:42:34 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 41f2347c..323da685 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 6 01:56:27 1997 Miles Bader + + (diskfs_S_file_getfh, diskfs_S_fsys_getfile): Functions removed. + Tue Nov 19 18:28:26 1996 Miles Bader * inode.c (read_disknode): If SBLOCK->fs_inodefmt < FS_44INODEFMT, -- cgit v1.2.3 From 50c06c73760f1d10924fe8e83b5d2633e9b2bad0 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 20 Jun 1997 19:27:16 +0000 Subject: . --- ufs/ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 323da685..debab075 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,17 @@ +1997-06-20 Miles Bader + + * hyper.c (diskfs_set_hypermetadata): Adjust device addresses for + possible differences between DEV_BSIZE & device block size. + * inode.c (diskfs_S_file_get_storage_info): Likewise. + * pager.c (pager_read_page, pager_write_page, pager_unlock_page): + Likewise. + * ufs.h (log2_dev_blocks_per_bsize): New declaration. + * main.c (main): Only require device-block-size to be <= DEV_BSIZE. + Get rid of device-block-size-is-power-of-2 check. + Set LOG2_DEV_BLOCKS_PER_BSIZE. + Exit with an error if the disk is too small rather than assert failing. + (log2_dev_blocks_per_bsize): New variable. + Thu Feb 6 01:56:27 1997 Miles Bader (diskfs_S_file_getfh, diskfs_S_fsys_getfile): Functions removed. -- cgit v1.2.3 From b3c14dc05fa82774cd9e83233ba5c4f66b076ba4 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 30 Jun 1997 21:59:32 +0000 Subject: Mon Jun 30 17:38:57 1997 Thomas Bushnell, n/BSG * main.c (main): If the store cannot be made writable, then set diskfs_hard_readonly and diskfs_readonly. --- ufs/ChangeLog | 5 +++++ ufs/main.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index debab075..ca832c8e 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 30 17:38:57 1997 Thomas Bushnell, n/BSG + + * main.c (main): If the store cannot be made writable, then set + diskfs_hard_readonly and diskfs_readonly. + 1997-06-20 Miles Bader * hyper.c (diskfs_set_hypermetadata): Adjust device addresses for diff --git a/ufs/main.c b/ufs/main.c index e6a7e303..6116792b 100644 --- a/ufs/main.c +++ b/ufs/main.c @@ -205,6 +205,9 @@ main (int argc, char **argv) log2_dev_blocks_per_dev_bsize++; log2_dev_blocks_per_dev_bsize -= store->log2_block_size; + if (store->flags & STORE_HARD_READONLY) + diskfs_readonly = diskfs_hard_readonly = 1; + /* Map the entire disk. */ create_disk_pager (); -- cgit v1.2.3 From c6358909aa9e73d34a5da39e3ea945c9c07b9e1a Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 20 Aug 1997 19:06:42 +0000 Subject: Wed Aug 20 14:34:24 1997 Thomas Bushnell, n/BSG * dir.c (diskfs_lookup_hard): Cope with error return from diskfs_get_filemap. * sizes.c (diskfs_grow): Likewise. * dir.c (diskfs_dirempty): Cope (poorly) with error return from diskfs_get_filemap. * sizes.c (diskfs_truncate): Likewise. (block_extended): Likewise. * pager.c (diskfs_get_filemap): If pager_create fails, return error to caller. --- ufs/ChangeLog | 13 +++++++++++++ ufs/dir.c | 11 ++++++++++- ufs/pager.c | 7 +++++++ ufs/sizes.c | 22 +++++++++++++++++----- 4 files changed, 47 insertions(+), 6 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index ca832c8e..3a225552 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,16 @@ +Wed Aug 20 14:34:24 1997 Thomas Bushnell, n/BSG + + * dir.c (diskfs_lookup_hard): Cope with error return from + diskfs_get_filemap. + * sizes.c (diskfs_grow): Likewise. + * dir.c (diskfs_dirempty): Cope (poorly) with error return from + diskfs_get_filemap. + * sizes.c (diskfs_truncate): Likewise. + (block_extended): Likewise. + + * pager.c (diskfs_get_filemap): If pager_create fails, return + error to caller. + Mon Jun 30 17:38:57 1997 Thomas Bushnell, n/BSG * main.c (main): If the store cannot be made writable, then set diff --git a/ufs/dir.c b/ufs/dir.c index 6c44932d..bdf84be6 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -1,5 +1,5 @@ /* Directory management routines - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -145,6 +145,10 @@ diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type, /* Map in the directory contents. */ memobj = diskfs_get_filemap (dp, prot); + + if (memobj == MACH_PORT_NULL) + return errno; + buf = 0; /* We allow extra space in case we have to do an EXTEND. */ buflen = round_page (dp->dn_stat.st_size + DIRBLKSIZ); @@ -727,6 +731,11 @@ diskfs_dirempty(struct node *dp, error_t err; memobj = diskfs_get_filemap (dp, VM_PROT_READ); + + if (memobj == MACH_PORT_NULL) + /* XXX should reflect error properly */ + return 0; + buf = 0; err = vm_map (mach_task_self (), &buf, dp->dn_stat.st_size, 0, diff --git a/ufs/pager.c b/ufs/pager.c index afb34839..61695db6 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -569,6 +569,13 @@ diskfs_get_filemap (struct node *np, vm_prot_t prot) diskfs_nref_light (np); upi->p = pager_create (upi, pager_bucket, MAY_CACHE, MEMORY_OBJECT_COPY_DELAY); + if (upi->p == 0) + { + diskfs_nrele_light (np); + free (upi); + spin_unlock (&node2pagelock); + return MACH_PORT_NULL; + } np->dn->fileinfo = upi; right = pager_get_port (np->dn->fileinfo->p); ports_port_deref (np->dn->fileinfo->p); diff --git a/ufs/sizes.c b/ufs/sizes.c index 84c2493d..5c3d12f0 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -1,5 +1,5 @@ /* File growth and truncation - Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation This file is part of the GNU Hurd. @@ -104,10 +104,14 @@ diskfs_truncate (struct node *np, pager_change_attributes (upi->p, MAY_CACHE, MEMORY_OBJECT_COPY_NONE, 1); obj = diskfs_get_filemap (np, VM_PROT_READ | VM_PROT_WRITE); - poke_pages (obj, round_page (length), round_page (np->allocsize)); - mach_port_deallocate (mach_task_self (), obj); - pager_flush_some (upi->p, round_page (length), - np->allocsize - length, 1); + if (obj != MACH_PORT_NULL) + { + /* XXX should cope with errors from diskfs_get_filemap */ + poke_pages (obj, round_page (length), round_page (np->allocsize)); + mach_port_deallocate (mach_task_self (), obj); + pager_flush_some (upi->p, round_page (length), + np->allocsize - length, 1); + } ports_port_deref (upi->p); } @@ -400,6 +404,11 @@ block_extended (struct node *np, /* Map in this part of the file */ mapobj = diskfs_get_filemap (np, VM_PROT_WRITE | VM_PROT_READ); + + /* XXX Should cope with errors from diskfs_get_filemap and back + out the operation here. */ + assert (mapobj); + err = vm_map (mach_task_self (), &mapaddr, round_page (old_size), 0, 1, mapobj, lbn * sblock->fs_bsize, 0, VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE, 0); @@ -477,6 +486,9 @@ diskfs_grow (struct node *np, /* This reference will ensure that NP->dn->fileinfo stays allocated. */ pagerpt = diskfs_get_filemap (np, VM_PROT_WRITE|VM_PROT_READ); + if (pagerpt == MACH_PORT_NULL) + return errno; + /* The new last block of the file. */ lbn = lblkno (sblock, end - 1); -- cgit v1.2.3 From e818daa7d08698dd88b0f52a2fc8faffd8b3c279 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 20 Oct 1998 21:19:27 +0000 Subject: . --- ufs/ChangeLog | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 3a225552..e4f3ce9d 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,10 +1,18 @@ +1998-09-04 Roland McGrath + + * dir.c (diskfs_lookup_hard): Fix defn with `const'. + (diskfs_direnter_hard): Likewise. + (dirscanblock): Likewise. + * inode.c (diskfs_create_symlink_hook, create_symlink_hook): Likewise. + (diskfs_set_translator): Likewise. + Wed Aug 20 14:34:24 1997 Thomas Bushnell, n/BSG * dir.c (diskfs_lookup_hard): Cope with error return from - diskfs_get_filemap. + diskfs_get_filemap. * sizes.c (diskfs_grow): Likewise. * dir.c (diskfs_dirempty): Cope (poorly) with error return from - diskfs_get_filemap. + diskfs_get_filemap. * sizes.c (diskfs_truncate): Likewise. (block_extended): Likewise. @@ -53,14 +61,14 @@ Mon Nov 18 17:10:00 1996 Miles Bader Sat Nov 16 17:21:40 1996 Thomas Bushnell, n/BSG - * inode.c (diskfs_S_fsys_getfile): Delete var `fakecred'. + * inode.c (diskfs_S_fsys_getfile): Delete var `fakecred'. diskfs_access -> fshelp_access. * alloc.c (ffs_alloc): diskfs_isuid -> idvec_contains. (ffs_realloccg): Likewise. Thu Nov 14 16:43:36 1996 Thomas Bushnell, n/BSG - * inode.c (diskfs_S_file_getfh): diskfs_isuid -> idvec_contains. + * inode.c (diskfs_S_file_getfh): diskfs_isuid -> idvec_contains. (diskfs_S_fsys_getfile): Use idvecs and iousers. Thu Oct 24 16:07:17 1996 Miles Bader @@ -157,21 +165,21 @@ Fri Sep 6 16:00:42 1996 Thomas Bushnell, n/BSG * consts.c: Include . (diskfs_major_version, diskfs_minor_version, diskfs_edit_version): - Deleted variables. + Deleted variables. (diskfs_server_version): New variable. Thu Aug 29 16:07:07 1996 Thomas Bushnell, n/BSG * dir.c (diskfs_lookup_hard): When setting ds->stat to EXTEND, set ds->idx by looking at the size of the file. (IDX itself is no - longer at the end because of the change on Aug 16 1996.) + longer at the end because of the change on Aug 16 1996.) Wed Aug 28 12:15:15 1996 Thomas Bushnell, n/BSG * dir.c (dirscanblock): Size dirents correctly when mallocing it. (diskfs_direnter_hard): Be more careful when sizing or resizing dirents. Correctly set to -1 all the new entries we create after - realloc call. + realloc call. Fri Aug 16 18:51:31 1996 Thomas Bushnell, n/BSG @@ -192,10 +200,10 @@ Wed Aug 7 13:00:30 1996 Thomas Bushnell, n/BSG bsize to be fs_fsize, not fs_bsize. * hyper.c (diskfs_set_hypermetadata): Return an error as - appropriate. - + appropriate. + * inode.c (struct ufs_fhandle): Layout filehandle more like Unixy - NFSD. + NFSD. (diskfs_S_file_getfh): Bother to clear unused parts of a file handle so that they always compare equal. @@ -296,8 +304,8 @@ Mon May 6 14:23:54 1996 Michael I. Bushnell, p/BSG Fri May 3 09:15:33 1996 Michael I. Bushnell, p/BSG * sizes.c (block_extended): Rewrite code that moves pages - to be more efficient, and not deadlock too, using unlocked - pagein permission feature (read "hack"). Return value + to be more efficient, and not deadlock too, using unlocked + pagein permission feature (read "hack"). Return value now indicates whether we expect a sync. (diskfs_grow): If a call to block_extended returns nonzero, then sync the file before returning. @@ -339,9 +347,9 @@ Wed Apr 24 14:05:48 1996 Michael I. Bushnell, p/BSG case where it was written on a little endian machine without the extension. (DIRECT_NAMLEN) [LITTLE_ENDIAN]: Deal with case correctly where it - was written without the extension on a big endian machine. + was written without the extension on a big endian machine. * dir.c (dirscanblock): Use read/write_disk_entry when reading or - writing fields from directory entries. + writing fields from directory entries. (diskfs_direnter_hard): Likewise. (diskfs_dirremove_hard): Likewise. (diskfs_dirrewrite_hard): Likewise. @@ -363,8 +371,8 @@ Tue Apr 23 11:28:42 1996 Michael I. Bushnell, p/BSG (swab_short, swab_long, swab_long_long): New functions. (read_disk_entry, write_disk_entry): New macros. * alloc.c (ffs_realloccg): Use read/write_disk_entry when - reading/writing on-disk inode fields. - * bmap.c (fetch_indir_spec): Likewise. + reading/writing on-disk inode fields. + * bmap.c (fetch_indir_spec): Likewise. * inode.c (read_disknode): Likewise. (write_node): Likewise. (diskfs_set_translator): Likewise. @@ -380,11 +388,11 @@ Tue Apr 23 11:28:42 1996 Michael I. Bushnell, p/BSG (diskfs_grow): Likewise. * pager.c (pager_unlock_page): Likewise. * alloc.c: Include - (ffs_blkpref): Use read_disk_entry when reading from BAP array. + (ffs_blkpref): Use read_disk_entry when reading from BAP array. (swab_cg, read_cg, release_cg): New functions. (ffs_fragextend, ffs_alloccg, ffs_nodealloccg, ffs_blkfree, - diskfs_free_node): Use new cg access functions. - + diskfs_free_node): Use new cg access functions. + Thu Apr 18 14:50:30 1996 Michael I. Bushnell, p/BSG * sizes.c (diskfs_grow): New variable `pagerpt'. @@ -439,7 +447,7 @@ Fri Mar 22 23:43:53 1996 Miles Bader Wed Mar 20 14:36:31 1996 Michael I. Bushnell, p/BSG * dir.c (diskfs_lookup_hard): Don't do initial or final permission - checking here. + checking here. * dir.c (diskfs_dirrewrite_hard): Renamed from diskfs_dirrewrite. No longer call modification tracking routines. (diskfs_dirremove_hard): Renamed from diskfs_dirremove. No longer call @@ -454,7 +462,7 @@ Mon Mar 18 19:50:41 1996 Miles Bader Mon Mar 18 12:33:06 1996 Michael I. Bushnell, p/BSG - * pager.c (diskfs_max_user_pager_prot) [add_pager_max_prot]: + * pager.c (diskfs_max_user_pager_prot) [add_pager_max_prot]: (a == b) ? 1 : 0 ====> (a == b). Fri Feb 23 15:27:05 1996 Roland McGrath @@ -1795,4 +1803,3 @@ Thu May 5 19:06:54 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) Thu May 5 07:39:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * Makefile ($(OBJS)): Use $(includedir) instead of $(headers) in deps. - -- cgit v1.2.3 From 7d20ee2f3d07b1a609814cb8ee83d712d0581f24 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 20 Dec 1998 21:00:36 +0000 Subject: . --- ufs/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index e4f3ce9d..14f11053 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +1998-12-20 Roland McGrath + + * alloc.c (diskfs_alloc_node): Fix printf format to silence warning. + * hyper.c (get_hypermetadata): Likewise. + 1998-09-04 Roland McGrath * dir.c (diskfs_lookup_hard): Fix defn with `const'. -- cgit v1.2.3 From 8fb12c8cdd3e204dd1918be1e8ec8836dcebc286 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 27 Dec 1998 08:45:04 +0000 Subject: . --- ufs/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 14f11053..bd8e6358 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +1998-12-27 Roland McGrath + + * main.c (main): Pass ARGP_IN_ORDER flag to argp_parse because + diskfs options need it. + 1998-12-20 Roland McGrath * alloc.c (diskfs_alloc_node): Fix printf format to silence warning. -- cgit v1.2.3 From a09e62adf5ee1e122cec5cea8594ba8a7b3cdafa Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 27 Dec 1998 10:29:29 +0000 Subject: . --- ufs/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index bd8e6358..7d280a4a 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,12 @@ +1998-12-27 Roland McGrath + + * inode.c (diskfs_set_statfs): Remove __ from struct members. + +1998-12-21 Mark Kettenis + + * inode.c (diskfs_set_statfs): Fill in statfs members that are + used to implement statvfs. + 1998-12-27 Roland McGrath * main.c (main): Pass ARGP_IN_ORDER flag to argp_parse because -- cgit v1.2.3 From 094eae6ae91ebff7210cab489cb8ff214bfccfab Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 24 Jan 1999 02:52:44 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 7d280a4a..7d6c0800 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +1999-01-23 Roland McGrath + + * main.c (main): Use diskfs_init_main. + 1998-12-27 Roland McGrath * inode.c (diskfs_set_statfs): Remove __ from struct members. -- cgit v1.2.3 From 7b4bf7ce4b982d503d8499b7beeaec4d3d9bdc19 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 May 1999 19:54:37 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 7d6c0800..16ae4238 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +1999-05-02 Roland McGrath + + * main.c (main): Remove bogus uninitialized variable ERR. + 1999-01-23 Roland McGrath * main.c (main): Use diskfs_init_main. -- cgit v1.2.3 From ca6b1e89cd646368a08734e55dfb5da7ac1e2465 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 29 Jun 1999 09:00:20 +0000 Subject: 1999-06-29 Thomas Bushnell, BSG * hyper.c (diskfs_readonly_changed): Adjust whether the store should permit writes too. --- ufs/ChangeLog | 5 +++++ ufs/hyper.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 16ae4238..7b0fee70 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +1999-06-29 Thomas Bushnell, BSG + + * hyper.c (diskfs_readonly_changed): Adjust whether the store + should permit writes too. + 1999-05-02 Roland McGrath * main.c (main): Remove bogus uninitialized variable ERR. diff --git a/ufs/hyper.c b/ufs/hyper.c index 2a43bfed..c5101141 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -1,5 +1,5 @@ /* Fetching and storing the hypermetadata (superblock and cg summary info). - Copyright (C) 1994, 95, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -396,6 +396,8 @@ copy_sblock () void diskfs_readonly_changed (int readonly) { + (*(readonly ? store_set_flags : store_clear_flags)) (store, STORE_READONLY); + vm_protect (mach_task_self (), (vm_address_t)disk_image, store->size, 0, VM_PROT_READ | (readonly ? 0 : VM_PROT_WRITE)); -- cgit v1.2.3 From 022849d0b80dcb7b46f4f9dcb7c3af7bba95cf39 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sat, 3 Jul 1999 23:55:45 +0000 Subject: 1999-07-03 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Use munmap instead of vm_deallocate. (diskfs_direnter_hard): Likewise. (diskfs_dirremove_hard): Likewise. (diskfs_dirrewrite_hard): Likewise. (diskfs_dirempty): Likewise. (diskfs_drop_dirstat): Likewise. (diskfs_get_directs): Likewise. * sizes.c (block_extended): Likewise. (poke_pages): Likewise. * hyper.c (get_hypermetadata): Likewise. (diskfs_set_hypermetadata): Likewise. --- ufs/ChangeLog | 15 +++++++++++++++ ufs/dir.c | 27 +++++++++++++-------------- ufs/hyper.c | 5 ++--- ufs/sizes.c | 6 +++--- 4 files changed, 33 insertions(+), 20 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 7b0fee70..8791b327 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,18 @@ +1999-07-03 Thomas Bushnell, BSG + + * dir.c (diskfs_lookup_hard): Use munmap instead of + vm_deallocate. + (diskfs_direnter_hard): Likewise. + (diskfs_dirremove_hard): Likewise. + (diskfs_dirrewrite_hard): Likewise. + (diskfs_dirempty): Likewise. + (diskfs_drop_dirstat): Likewise. + (diskfs_get_directs): Likewise. + * sizes.c (block_extended): Likewise. + (poke_pages): Likewise. + * hyper.c (get_hypermetadata): Likewise. + (diskfs_set_hypermetadata): Likewise. + 1999-06-29 Thomas Bushnell, BSG * hyper.c (diskfs_readonly_changed): Adjust whether the store diff --git a/ufs/dir.c b/ufs/dir.c index 01432829..c17549c2 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -1,5 +1,5 @@ /* Directory management routines - Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -137,7 +137,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } if (buf) { - vm_deallocate (mach_task_self (), buf, buflen); + munmap ((caddr_t) buf, buflen); buf = 0; } if (ds && (type == CREATE || type == RENAME)) @@ -181,7 +181,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } if (err != ENOENT) { - vm_deallocate (mach_task_self (), buf, buflen); + munmap ((caddr_t) buf, buflen); return err; } @@ -295,7 +295,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, || !ds || ds->type == LOOKUP) { - vm_deallocate (mach_task_self (), buf, buflen); + vm_deallocate ((caddr_t) buf, buflen); if (ds) ds->type = LOOKUP; /* set to be ignored by drop_dirstat */ } @@ -586,7 +586,7 @@ diskfs_direnter_hard(struct node *dp, err = diskfs_grow (dp, oldsize + DIRBLKSIZ, cred); if (err) { - vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent); + munmap ((caddr_t) ds->mapbuf, ds->mapextent); return err; } } @@ -610,7 +610,7 @@ diskfs_direnter_hard(struct node *dp, dp->dn_set_mtime = 1; - vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent); + munmap ((caddr_t) ds->mapbuf, ds->mapextent); if (ds->stat != EXTEND) { @@ -678,7 +678,7 @@ diskfs_dirremove_hard(struct node *dp, dp->dn_set_mtime = 1; - vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent); + munmap ((caddr_t) ds->mapbuf, ds->mapextent); /* If we are keeping count of this block, then keep the count up to date. */ @@ -711,7 +711,7 @@ diskfs_dirrewrite_hard(struct node *dp, ds->entry->d_type = IFTODT (np->dn_stat.st_mode); dp->dn_set_mtime = 1; - vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent); + munmap ((caddr_t) ds->mapbuf, ds->mapextent); diskfs_file_update (dp, 1); @@ -758,7 +758,7 @@ diskfs_dirempty(struct node *dp, || (entry->d_name[1] != '.' && entry->d_name[1] != '\0'))) { - vm_deallocate (mach_task_self (), buf, dp->dn_stat.st_size); + munmap ((caddr_t) buf, dp->dn_stat.st_size); if (!diskfs_check_readonly ()) dp->dn_set_atime = 1; if (diskfs_synchronous) @@ -770,7 +770,7 @@ diskfs_dirempty(struct node *dp, dp->dn_set_atime = 1; if (diskfs_synchronous) diskfs_node_update (dp, 1); - vm_deallocate (mach_task_self (), buf, dp->dn_stat.st_size); + munmap ((caddr_t) buf, dp->dn_stat.st_size); return 1; } @@ -781,7 +781,7 @@ diskfs_drop_dirstat (struct node *dp, struct dirstat *ds) if (ds->type != LOOKUP) { assert (ds->mapbuf); - vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent); + munmap ((caddr_t) ds->mapbuf, ds->mapextent); ds->type = LOOKUP; } return 0; @@ -968,9 +968,8 @@ diskfs_get_directs (struct node *dp, if (allocsize > *datacnt) { if (round_page (datap - *data) < allocsize) - vm_deallocate (mach_task_self (), - (vm_address_t) (*data + round_page (datap - *data)), - allocsize - round_page (datap - *data)); + munmap (*data + round_page (datap - *data), + allocsize - round_page (datap - *data)); } /* Set variables for return */ diff --git a/ufs/hyper.c b/ufs/hyper.c index c5101141..deb4a5df 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -138,8 +138,7 @@ get_hypermetadata (void) /* Free previous values. */ if (zeroblock) - vm_deallocate (mach_task_self(), - (vm_address_t)zeroblock, sblock->fs_bsize); + munmap ((caddr_t) zeroblock, sblock->fs_bsize); if (csum) free (csum); @@ -314,7 +313,7 @@ diskfs_set_hypermetadata (int wait, int clean) err = EIO; } - vm_deallocate (mach_task_self (), (vm_address_t)buf, read); + munmap (buf, read); if (err) { diff --git a/ufs/sizes.c b/ufs/sizes.c index 5c3d12f0..58cbfc98 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -1,5 +1,5 @@ /* File growth and truncation - Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999 Free Software Foundation This file is part of the GNU Hurd. @@ -439,7 +439,7 @@ block_extended (struct node *np, /* Undo mapping */ mach_port_deallocate (mach_task_self (), mapobj); - vm_deallocate (mach_task_self (), mapaddr, round_page (old_size)); + munmap ((caddr_t) mapaddr, round_page (old_size)); /* Now it's OK to free the old block */ ffs_blkfree (np, old_pbn, old_size); @@ -711,7 +711,7 @@ poke_pages (memory_object_t obj, { for (poke = addr; poke < addr + len; poke += vm_page_size) *(volatile int *)poke = *(volatile int *)poke; - vm_deallocate (mach_task_self (), addr, len); + munmap ((caddr_t) addr, len); } start += len; } -- cgit v1.2.3 From 490d27a97e87769f04becd62bdfe3a783ee66c97 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 6 Jul 1999 00:09:18 +0000 Subject: Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Repair typo. Reported by Yamashita TAKAO . --- ufs/ChangeLog | 5 +++++ ufs/dir.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 8791b327..4a983183 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG + + * dir.c (diskfs_lookup_hard): Repair typo. Reported by Yamashita + TAKAO . + 1999-07-03 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Use munmap instead of diff --git a/ufs/dir.c b/ufs/dir.c index c17549c2..c0352d03 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -295,7 +295,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, || !ds || ds->type == LOOKUP) { - vm_deallocate ((caddr_t) buf, buflen); + munmap ((caddr_t) buf, buflen); if (ds) ds->type = LOOKUP; /* set to be ignored by drop_dirstat */ } -- cgit v1.2.3 From fbd6929a645721d3c1905900a9e1d9df1fed051e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 11 Jul 1999 01:52:42 +0000 Subject: . --- ufs/ChangeLog | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 4a983183..209d39df 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +1999-07-10 Roland McGrath + + * ufs.h: Add #include for munmap decl. + Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Repair typo. Reported by Yamashita @@ -6,7 +10,7 @@ Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG 1999-07-03 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Use munmap instead of - vm_deallocate. + vm_deallocate. (diskfs_direnter_hard): Likewise. (diskfs_dirremove_hard): Likewise. (diskfs_dirrewrite_hard): Likewise. -- cgit v1.2.3 From e529ce98486b413cca7b16e7f7a51642b60f0a6f Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:32:44 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * dir.c (diskfs_get_directs): Use mmap instead of vm_allocate. * hyper.c (get_hypermetadata): Likewise. * pager.c (pager_read_page): Likewise. --- ufs/ChangeLog | 11 +++++++++++ ufs/dir.c | 2 +- ufs/hyper.c | 7 ++----- ufs/pager.c | 5 +++-- 4 files changed, 17 insertions(+), 8 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 209d39df..869840b8 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -2,6 +2,17 @@ * ufs.h: Add #include for munmap decl. +1999-07-09 Thomas Bushnell, BSG + + * dir.c (diskfs_get_directs): Use mmap instead of vm_allocate. + * hyper.c (get_hypermetadata): Likewise. + * pager.c (pager_read_page): Likewise. + +1999-07-06 Thomas Bushnell, BSG + + * hyper.c (diskfs_readonly_changed): Use mprotect instead of + vm_protect. + Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Repair typo. Reported by Yamashita diff --git a/ufs/dir.c b/ufs/dir.c index c0352d03..304c8a44 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -863,7 +863,7 @@ diskfs_get_directs (struct node *dp, allocsize = round_page (bufsiz); if (allocsize > *datacnt) - vm_allocate (mach_task_self (), (vm_address_t *) data, allocsize, 1); + *data = mmap (0, allocsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); /* Scan through the entries to find ENTRY. If we encounter a -1 in the process then stop to fill it. When we run diff --git a/ufs/hyper.c b/ufs/hyper.c index deb4a5df..c907d274 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -257,8 +257,7 @@ get_hypermetadata (void) exit (1); } - vm_allocate (mach_task_self (), - (vm_address_t *)&zeroblock, sblock->fs_bsize, 1); + zeroblock = mmap (0, sblock->fs_bsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); /* If the filesystem has new features in it, don't pay attention to the user's request not to use them. */ @@ -397,9 +396,7 @@ diskfs_readonly_changed (int readonly) { (*(readonly ? store_set_flags : store_clear_flags)) (store, STORE_READONLY); - vm_protect (mach_task_self (), - (vm_address_t)disk_image, store->size, - 0, VM_PROT_READ | (readonly ? 0 : VM_PROT_WRITE)); + mprotect (disk_image, store->size, PROT_READ | (readonly ? 0 : PROT_WRITE)); if (readonly) { diff --git a/ufs/pager.c b/ufs/pager.c index 61695db6..e703bfd2 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -1,5 +1,5 @@ /* Pager for ufs - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -180,7 +180,8 @@ pager_read_page (struct user_pager_info *pager, printf ("Write-locked pagein Object %#x\tOffset %#x\n", pager, page); fflush (stdout); #endif - vm_allocate (mach_task_self (), buf, __vm_page_size, 1); + *buf = (vm_address_t) mmap (0, vm_page_size, PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); *writelock = 1; } -- cgit v1.2.3 From 558d5489edced5c7a208f66eafb47fbcca201ac0 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sat, 4 Sep 1999 13:00:39 +0000 Subject: 1999-09-04 Thomas Bushnell, BSG * 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. --- ufs/ChangeLog | 9 +++++++++ ufs/pager.c | 17 +++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'ufs/ChangeLog') 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 + + * 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 * ufs.h: Add #include 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); -- cgit v1.2.3 From 637f6a0aa9cec92581381a8a19a66d2f9b66216b Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 8 Sep 1999 08:41:59 +0000 Subject: 1999-09-08 Thomas Bushnell, BSG * dir.c (diskfs_get_directs): Initialize `err' to shut gcc up. 1999-09-07 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Pass additional parameter to diskfs_get_filemap. (diskfs_dirempty): Likewise. * sizes.c (diskfs_truncate): Likewise. (block_extended): Likewise. (diskfs_grow): Likewise. * pager.c (diskfs_get_filemap): Accept additional parameter. --- ufs/ChangeLog | 14 ++++++++++++++ ufs/dir.c | 6 +++--- ufs/pager.c | 4 +++- ufs/sizes.c | 6 +++--- 4 files changed, 23 insertions(+), 7 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 1375fede..4bebe284 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,17 @@ +1999-09-08 Thomas Bushnell, BSG + + * dir.c (diskfs_get_directs): Initialize `err' to shut gcc up. + +1999-09-07 Thomas Bushnell, BSG + + * dir.c (diskfs_lookup_hard): Pass additional parameter to + diskfs_get_filemap. + (diskfs_dirempty): Likewise. + * sizes.c (diskfs_truncate): Likewise. + (block_extended): Likewise. + (diskfs_grow): Likewise. + * pager.c (diskfs_get_filemap): Accept additional parameter. + 1999-09-04 Thomas Bushnell, BSG * pager.c (find_address): If !ISREAD, then don't return errors for diff --git a/ufs/dir.c b/ufs/dir.c index 304c8a44..aee08bb0 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -144,7 +144,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, ds->stat = LOOKING; /* Map in the directory contents. */ - memobj = diskfs_get_filemap (dp, prot); + memobj = diskfs_get_filemap (dp, 0, prot); if (memobj == MACH_PORT_NULL) return errno; @@ -730,7 +730,7 @@ diskfs_dirempty(struct node *dp, memory_object_t memobj; error_t err; - memobj = diskfs_get_filemap (dp, VM_PROT_READ); + memobj = diskfs_get_filemap (dp, 0, VM_PROT_READ); if (memobj == MACH_PORT_NULL) /* XXX should reflect error properly */ @@ -839,7 +839,7 @@ diskfs_get_directs (struct node *dp, char buf[DIRBLKSIZ]; char *bufp; int bufvalid; - error_t err; + error_t err = 0; int i; char *datap; struct directory_entry *entryp; diff --git a/ufs/pager.c b/ufs/pager.c index 3038932d..3cba748e 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -547,11 +547,13 @@ flush_node_pager (struct node *node) /* Call this to create a FILE_DATA pager and return a send right. NP must be locked. PROT is the max protection desired. */ mach_port_t -diskfs_get_filemap (struct node *np, vm_prot_t prot) +diskfs_get_filemap (struct node *np, int index, vm_prot_t prot) { struct user_pager_info *upi; mach_port_t right; + assert (index == 0); /* XXX */ + assert (S_ISDIR (np->dn_stat.st_mode) || S_ISREG (np->dn_stat.st_mode) || (S_ISLNK (np->dn_stat.st_mode) diff --git a/ufs/sizes.c b/ufs/sizes.c index 58cbfc98..cffce158 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -103,7 +103,7 @@ diskfs_truncate (struct node *np, pager_change_attributes (upi->p, MAY_CACHE, MEMORY_OBJECT_COPY_NONE, 1); - obj = diskfs_get_filemap (np, VM_PROT_READ | VM_PROT_WRITE); + obj = diskfs_get_filemap (np, 0, VM_PROT_READ | VM_PROT_WRITE); if (obj != MACH_PORT_NULL) { /* XXX should cope with errors from diskfs_get_filemap */ @@ -403,7 +403,7 @@ block_extended (struct node *np, volatile int *pokeaddr; /* Map in this part of the file */ - mapobj = diskfs_get_filemap (np, VM_PROT_WRITE | VM_PROT_READ); + mapobj = diskfs_get_filemap (np, 0, VM_PROT_WRITE | VM_PROT_READ); /* XXX Should cope with errors from diskfs_get_filemap and back out the operation here. */ @@ -484,7 +484,7 @@ diskfs_grow (struct node *np, assert (!diskfs_readonly); /* This reference will ensure that NP->dn->fileinfo stays allocated. */ - pagerpt = diskfs_get_filemap (np, VM_PROT_WRITE|VM_PROT_READ); + pagerpt = diskfs_get_filemap (np, 0, VM_PROT_WRITE|VM_PROT_READ); if (pagerpt == MACH_PORT_NULL) return errno; -- cgit v1.2.3 From 298788e891e149c18599d9b4e8cac308c1d1457c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 Sep 1999 04:35:54 +0000 Subject: ChangeLog --- ufs/ChangeLog | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 4bebe284..0ab45a3d 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,10 @@ +1999-09-09 Roland McGrath + + * Makefile (makemode): servers -> server. + (targets): Replaced with target; remove ufs.static. + (ufs.static-LDFLAGS): Variable removed. + (ufs.static, ufs): Remove deps. + 1999-09-08 Thomas Bushnell, BSG * dir.c (diskfs_get_directs): Initialize `err' to shut gcc up. @@ -5,7 +12,7 @@ 1999-09-07 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Pass additional parameter to - diskfs_get_filemap. + diskfs_get_filemap. (diskfs_dirempty): Likewise. * sizes.c (diskfs_truncate): Likewise. (block_extended): Likewise. @@ -34,7 +41,7 @@ 1999-07-06 Thomas Bushnell, BSG * hyper.c (diskfs_readonly_changed): Use mprotect instead of - vm_protect. + vm_protect. Mon Jul 5 20:04:58 1999 Thomas Bushnell, BSG -- cgit v1.2.3 From ddbe575459786c3530c2d092b4193b6d41f1e80a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 Sep 1999 06:35:11 +0000 Subject: Reverted changes related to io_map_segment. --- ufs/ChangeLog | 4 ++++ ufs/dir.c | 6 +++--- ufs/pager.c | 4 +--- ufs/sizes.c | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 0ab45a3d..09d4b17a 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +1999-09-13 Roland McGrath + + * dir.c, sizes.c, pager.c: Reverted changes related to io_map_segment. + 1999-09-09 Roland McGrath * Makefile (makemode): servers -> server. diff --git a/ufs/dir.c b/ufs/dir.c index aee08bb0..304c8a44 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -144,7 +144,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, ds->stat = LOOKING; /* Map in the directory contents. */ - memobj = diskfs_get_filemap (dp, 0, prot); + memobj = diskfs_get_filemap (dp, prot); if (memobj == MACH_PORT_NULL) return errno; @@ -730,7 +730,7 @@ diskfs_dirempty(struct node *dp, memory_object_t memobj; error_t err; - memobj = diskfs_get_filemap (dp, 0, VM_PROT_READ); + memobj = diskfs_get_filemap (dp, VM_PROT_READ); if (memobj == MACH_PORT_NULL) /* XXX should reflect error properly */ @@ -839,7 +839,7 @@ diskfs_get_directs (struct node *dp, char buf[DIRBLKSIZ]; char *bufp; int bufvalid; - error_t err = 0; + error_t err; int i; char *datap; struct directory_entry *entryp; diff --git a/ufs/pager.c b/ufs/pager.c index 3cba748e..3038932d 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -547,13 +547,11 @@ flush_node_pager (struct node *node) /* Call this to create a FILE_DATA pager and return a send right. NP must be locked. PROT is the max protection desired. */ mach_port_t -diskfs_get_filemap (struct node *np, int index, vm_prot_t prot) +diskfs_get_filemap (struct node *np, vm_prot_t prot) { struct user_pager_info *upi; mach_port_t right; - assert (index == 0); /* XXX */ - assert (S_ISDIR (np->dn_stat.st_mode) || S_ISREG (np->dn_stat.st_mode) || (S_ISLNK (np->dn_stat.st_mode) diff --git a/ufs/sizes.c b/ufs/sizes.c index cffce158..58cbfc98 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -103,7 +103,7 @@ diskfs_truncate (struct node *np, pager_change_attributes (upi->p, MAY_CACHE, MEMORY_OBJECT_COPY_NONE, 1); - obj = diskfs_get_filemap (np, 0, VM_PROT_READ | VM_PROT_WRITE); + obj = diskfs_get_filemap (np, VM_PROT_READ | VM_PROT_WRITE); if (obj != MACH_PORT_NULL) { /* XXX should cope with errors from diskfs_get_filemap */ @@ -403,7 +403,7 @@ block_extended (struct node *np, volatile int *pokeaddr; /* Map in this part of the file */ - mapobj = diskfs_get_filemap (np, 0, VM_PROT_WRITE | VM_PROT_READ); + mapobj = diskfs_get_filemap (np, VM_PROT_WRITE | VM_PROT_READ); /* XXX Should cope with errors from diskfs_get_filemap and back out the operation here. */ @@ -484,7 +484,7 @@ diskfs_grow (struct node *np, assert (!diskfs_readonly); /* This reference will ensure that NP->dn->fileinfo stays allocated. */ - pagerpt = diskfs_get_filemap (np, 0, VM_PROT_WRITE|VM_PROT_READ); + pagerpt = diskfs_get_filemap (np, VM_PROT_WRITE|VM_PROT_READ); if (pagerpt == MACH_PORT_NULL) return errno; -- cgit v1.2.3 From 1a4ef01d300a7ad85cd44f2cba7528fb2e00ebfb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 13 Oct 1999 19:42:28 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 09d4b17a..02120e59 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +1999-10-13 Roland McGrath + + * consts.c (diskfs_name_max): New variable. + 1999-09-13 Roland McGrath * dir.c, sizes.c, pager.c: Reverted changes related to io_map_segment. -- cgit v1.2.3 From 5101d9d4d17c8be708d1934b78436f742d4f678f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 3 Mar 2000 21:48:41 +0000 Subject: . --- ufs/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 02120e59..34f98d28 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +2000-03-03 Roland McGrath + + * dir.c (diskfs_get_directs): Don't allocate buffer for *DATA until + after scanning for ENTRY and possibly returning EOF. + 1999-10-13 Roland McGrath * consts.c (diskfs_name_max): New variable. -- cgit v1.2.3 From 4153466ba0bb10fa250af108399d5f4367acad3e Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 26 Jul 2000 12:33:12 +0000 Subject: * Makefile (HURDLIBS): Reorder libs such that the threads lib comes before the ports lib. This makes sure the functions in libthreads properly override the stubs in libports with the new dynamic linker semantics in glibc 2.2. --- ufs/ChangeLog | 7 +++++++ ufs/Makefile | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 34f98d28..a83d02b8 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,10 @@ +2000-07-26 Mark Kettenis + + * Makefile (HURDLIBS): Reorder libs such that the threads lib + comes before the ports lib. This makes sure the functions in + libthreads properly override the stubs in libports with the new + dynamic linker semantics in glibc 2.2. + 2000-03-03 Roland McGrath * dir.c (diskfs_get_directs): Don't allocate buffer for *DATA until diff --git a/ufs/Makefile b/ufs/Makefile index c3bdc997..183caa86 100644 --- a/ufs/Makefile +++ b/ufs/Makefile @@ -1,5 +1,6 @@ - -# Copyright (C) 1994,95,96,99 Free Software Foundation, Inc. +# Makefile for ufs +# +# Copyright (C) 1994,95,96,99,2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -24,6 +25,6 @@ SRCS = alloc.c consts.c dir.c hyper.c inode.c main.c pager.c \ LCLHDRS = ufs.h fs.h dinode.h dir.h OBJS = $(SRCS:.c=.o) -HURDLIBS = diskfs iohelp fshelp store pager ports threads ihash shouldbeinlibc +HURDLIBS = diskfs iohelp fshelp store pager threads ports ihash shouldbeinlibc include ../Makeconf -- cgit v1.2.3 From 6541698d7d102f16295bb8240d02dd112197b163 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 30 Nov 2000 19:10:04 +0000 Subject: ext2fs, ufs: 2000-11-30 Marcus Brinkmann * dir.c (diskfs_lookup_hard): If name is too long, clear DS before returning ENAMETOOLONG. pfinet: 2000-11-02 Marcus Brinkmann * tunnel.c (trivfs_S_io_get_owner): Add return type to silence compiler warning. --- ufs/ChangeLog | 5 +++++ ufs/dir.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index a83d02b8..82ada32f 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +2000-11-30 Marcus Brinkmann + + * dir.c (diskfs_lookup_hard): If name is too long, clear + DS before returning ENAMETOOLONG. + 2000-07-26 Mark Kettenis * Makefile (HURDLIBS): Reorder libs such that the threads lib diff --git a/ufs/dir.c b/ufs/dir.c index 8077234c..2cc77398 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -126,7 +126,11 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, namelen = strlen (name); if (namelen > MAXNAMLEN) - return ENAMETOOLONG; + { + if (ds) + diskfs_null_dirstat (ds); + return ENAMETOOLONG; + } try_again: if (ds) -- cgit v1.2.3 From ea5f2a1a2552f01facb832f3324b4f0d32353e9b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 3 Dec 2000 06:30:18 +0000 Subject: . --- ufs/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 82ada32f..6927195b 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +2000-12-02 Roland McGrath + + * inode.c (write_node): Remove assert that dn_set_mtime et al are + clear. It is ok if they are set in parallel, because the latter + setting will be carried out eventually. + 2000-11-30 Marcus Brinkmann * dir.c (diskfs_lookup_hard): If name is too long, clear -- cgit v1.2.3 From 3bc8c9e3eed213b6326c607bfb368f695a4752e7 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 7 Jan 2001 19:31:50 +0000 Subject: doc/ 2001-01-07 Marcus Brinkmann * hurd.texi (Diskfs Callbacks): Make diskfs_dirstat_size const. ext2fs/ 2001-01-07 Marcus Brinkmann * dir.c: Make diskfs_dirstat_size const. isofs/ 2001-01-07 Marcus Brinkmann * lookup.c: Make diskfs_dirstat_size const. ufs/ 2001-01-07 Marcus Brinkmann * dir.c: Make diskfs_dirstat_size const. libdiskfs/ 2001-01-07 Marcus Brinkmann * diskfs.h: Make diskfs_dirstat_size const. libdiskfs/ 2001-01-07 Marcus Brinkmann * file-statfs.c: Include . ftpfs/ 2001-01-07 Marcus Brinkmann * dir.c (ftpfs_dir_create): Fix last change (calloc invocation). 2001-01-07 Marcus Brinkmann * copy.c: Include . New macro page_aligned. (copy_write): Cast buf to vm_address_t in call to vm_write. Dereference amount for memcpy. (copy_read): Add len parameter to vm_read, remove redundant following len assignment. --- ufs/ChangeLog | 4 ++++ ufs/dir.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 6927195b..14aed9dd 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +2001-01-07 Marcus Brinkmann + + * dir.c: Make diskfs_dirstat_size const. + 2000-12-02 Roland McGrath * inode.c (write_node): Remove assert that dn_set_mtime et al are diff --git a/ufs/dir.c b/ufs/dir.c index 2cc77398..7880ca21 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -79,7 +79,7 @@ struct dirstat size_t nbytes; }; -size_t diskfs_dirstat_size = sizeof (struct dirstat); +const size_t diskfs_dirstat_size = sizeof (struct dirstat); /* Initialize DS such that diskfs_drop_dirstat will ignore it. */ void -- cgit v1.2.3 From 1c9f0a5afa9c6eb6af95106c382d441eadaa0949 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 8 Jan 2001 22:33:11 +0000 Subject: doc/ 2001-01-08 Marcus Brinkmann * hurd.texi (Store Management): Replace off_t with store_offset_t. (Store I/O): Likewise. (Store Classes): Likewise. ext2fs/ 2001-01-08 Marcus Brinkmann * ext2fs.c (main): Use %Ld instead %ld to print store->size. * hyper.c (get_hypermetadata): Likewise. libstore/ 2001-01-08 Marcus Brinkmann * zero.c (zero_remap): Change type of variables length, old_length to store_offset_t. (zero_decode): Change type of variable size to store_offset_t. (zero_open): Likewise. Use strtoull instead strtoul to parse size argument from name. Use store_offset_t for max_offs and its calculation. (store_zero_create): Use store_offset_t type for size argument. * derive.c (_store_derive): Use store_offset_t as type for variable last_part_base. * stripe.c (addr_adj): Change types of addr argument and return value to store_offset_t. (store_ileave_create): Change type of interleave argument and variables min_end and end to store_offset_t, but type of variable block_size to size_t. (store_concat_create): Change type of variable block_size to size_t. * make.c (_store_create): Change end argument type to store_offset_t. * store.h: New type store_offset_t, define to off64_t. (struct store_run): Change type of start and length to store_offset_t. (struct store): Change type of end, wrap_src, wrap_dst, blocks, size to store_offset_t. Change type of addr arg in store_read_meth_t and store_write_meth_t to store_offset_t, as well as in declarations for store_read and store_write. Change type of argument end in _store_create declaration to store_offset_t. Change type of argument size in store_zero_create to store_offset_t. Change type of argument interleace in store_ileace_create to store_offset_t. * rdwr.c (store_find_first_run): Change type of return value, addr and *base arguments, and variables wrap_src and run_blocks to store_offset_t. (store_next_run): Change type of *base argument to store_offset_t. (store_write): Change type of addr argument and variable base to store_offset_t. (store_read): Likewise, also for addr argument of local function seg_read. Change type of len argument to size_t. * copy.c (copy_read): Change type of addr argument to store_offset_t. (copy_write): Likewise. * device.c (dev_read): Likewise. (dev_write): Likewise. * file.c (file_read): Likewise. (file_write): Likewise. (file_byte_read): Likewise. (file_byte_write): Likewise. * mvol.c (mvol_read): Likewise. (mvol_write): Likewise. * remap.c (remap_read): Likewise. (remap_write): Likewise. * stripe.c (stripe_read): Likewise. (stripe_write): Likewise. * task.c (task_read): Likewise. (task_write): Likewise. * zero.c (zero_read): Likewise. (zero_write): Likewise. * remap.c (store_remap_runs): Change type of addr and len arguments of local function add_run and of local variables addr, length, baddr, blen and len to store_offset_t. (remap_open): Cast -1 to store_offset_t, not off_t. * argp.c (struct store_parsed): Change type of interleave from off_t to store_offset_t. (store_parsed_append_args): Use %Ld instead %ld to print interleave value. (store_parsed_name): Likewise. ufs/ 2001-01-08 Marcus Brinkmann * main.c (main): Use %Ld instead %ld to print store->size. * hyper.c (get_hypermetadata): Likewise. * inode.c (diskfs_S_file_get_storage_info): Change type of variables start and length from off_t to store_offset_t. utils/ 2001-01-08 Marcus Brinkmann * storeread.c (main): Change type of addr to store_offset_t, also for first argument of local function dump. Add comment about store->size as len parameter for store_read. Use atoll instead atoi for addr argument. * storeinfo.c (print_store): Remove local function pint, add two similar functions psiz and poff, accepting and printing a size_t or store_offset_t respectively. Use psiz to print block_size, poff to print blocks and size of store. Use %Ld instead %ld to print runs. * storecat.c (main): Change type of addr and left to store_offset_t. --- ufs/ChangeLog | 7 +++++++ ufs/hyper.c | 2 +- ufs/inode.c | 4 ++-- ufs/main.c | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 14aed9dd..d8e04a0e 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,10 @@ +2001-01-08 Marcus Brinkmann + + * main.c (main): Use %Ld instead %ld to print store->size. + * hyper.c (get_hypermetadata): Likewise. + * inode.c (diskfs_S_file_get_storage_info): Change type of variables + start and length from off_t to store_offset_t. + 2001-01-07 Marcus Brinkmann * dir.c: Make diskfs_dirstat_size const. diff --git a/ufs/hyper.c b/ufs/hyper.c index c907d274..ece327a2 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -251,7 +251,7 @@ get_hypermetadata (void) if (store->size < sblock->fs_size * sblock->fs_fsize) { fprintf (stderr, - "Disk size (%ld) less than necessary " + "Disk size (%Ld) less than necessary " "(superblock says we need %ld)\n", store->size, sblock->fs_size * sblock->fs_fsize); exit (1); diff --git a/ufs/inode.c b/ufs/inode.c index 099609ab..72467e1a 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -679,8 +679,8 @@ diskfs_S_file_get_storage_info (struct protid *cred, for (i = 0; i < NDADDR; i++) { - off_t start = fsbtodb (sblock, read_disk_entry (di->di_db[i])); - off_t length = + store_offset_t start = fsbtodb (sblock, read_disk_entry (di->di_db[i])); + store_offset_t length = (((i + 1) * sblock->fs_bsize > np->allocsize) ? np->allocsize - i * sblock->fs_bsize : sblock->fs_bsize); diff --git a/ufs/main.c b/ufs/main.c index cc39019d..8c79d707 100644 --- a/ufs/main.c +++ b/ufs/main.c @@ -169,7 +169,7 @@ main (int argc, char **argv) error (4, 0, "%s: Bad device block size %d (should be <= %d)", diskfs_disk_name, store->block_size, DEV_BSIZE); if (store->size < SBSIZE + SBOFF) - error (5, 0, "%s: Disk too small (%ld bytes)", diskfs_disk_name, + error (5, 0, "%s: Disk too small (%Ld bytes)", diskfs_disk_name, store->size); log2_dev_blocks_per_dev_bsize = 0; -- cgit v1.2.3 From 7c80866b417ce602f6d1c188d18c28e8cf7e3a14 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 9 Jun 2001 20:30:34 +0000 Subject: * inode.c (diskfs_set_statfs): If number of free blocks is less than the number of reserved blocks, set the number of available blocks to 0. --- ufs/ChangeLog | 6 ++++++ ufs/inode.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index d8e04a0e..8f651624 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +2001-06-09 Mark Kettenis + + * inode.c (diskfs_set_statfs): If number of free blocks is less + than the number of reserved blocks, set the number of available + blocks to 0. + 2001-01-08 Marcus Brinkmann * main.c (main): Use %Ld instead %ld to print store->size. diff --git a/ufs/inode.c b/ufs/inode.c index 72467e1a..2647754c 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -1,5 +1,5 @@ /* Inode management routines - Copyright (C) 1994,95,96,97,98,2000 Free Software Foundation, Inc. + Copyright (C) 1994,95,96,97,98,2000,01 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -519,6 +519,8 @@ diskfs_set_statfs (struct statfs *st) + sblock->fs_cstotal.cs_nffree); st->f_bavail = ((sblock->fs_dsize * (100 - sblock->fs_minfree) / 100) - (sblock->fs_dsize - st->f_bfree)); + if (st->f_bfree < ((sblock->fs_dsize * (100 - sblock->fs_minfree) / 100))) + st->f_bavail = 0; st->f_files = sblock->fs_ncg * sblock->fs_ipg - 2; /* not 0 or 1 */ st->f_ffree = sblock->fs_cstotal.cs_nifree; st->f_fsid = getpid (); -- cgit v1.2.3 From 2f1c418840a1ba5a7029cb6f21c30052195051bc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 10 Aug 2001 04:42:15 +0000 Subject: . --- ufs/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 8f651624..871eaf78 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +2001-08-09 Roland McGrath + + * inode.c (diskfs_get_translator): Fail with EFTYPE if the length + field stored on disk is unreasonable. Don't crash on ENOMEM. + Use memcpy instead of bcopy. + 2001-06-09 Mark Kettenis * inode.c (diskfs_set_statfs): If number of free blocks is less -- cgit v1.2.3 From b005f7053b00dc5e7c6eeab6a104f7fc7b7b6ab5 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 1 Oct 2001 16:37:27 +0000 Subject: 2001-10-01 Marcus Brinkmann * ufs.h (swab_long_long): Use LL, not lL, for constant. Submitted by Maurizio Boriani . --- ufs/ChangeLog | 5 +++++ ufs/ufs.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 871eaf78..e013b8f5 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +2001-10-01 Marcus Brinkmann + + * ufs.h (swab_long_long): Use LL, not lL, for constant. + Submitted by Maurizio Boriani . + 2001-08-09 Roland McGrath * inode.c (diskfs_get_translator): Fail with EFTYPE if the length diff --git a/ufs/ufs.h b/ufs/ufs.h index 77fb50e0..5d823ebc 100644 --- a/ufs/ufs.h +++ b/ufs/ufs.h @@ -208,7 +208,7 @@ extern inline long long swab_long_long (long long arg) { return (((long long) swab_long (arg & 0xffffffff) << 32) - | swab_long ((arg & 0xffffffff00000000lL) >> 32)); + | swab_long ((arg & 0xffffffff00000000LL) >> 32)); } /* Return ENTRY, after byteswapping it if necessary */ -- cgit v1.2.3 From 7b2663dcd0afabce61218303c2c7709e37c0a3c8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 21 Nov 2001 22:09:03 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index e013b8f5..a655a739 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +2001-11-21 Roland McGrath + + * inode.c (read_disknode): Just always call getpid for the fsid value. + 2001-10-01 Marcus Brinkmann * ufs.h (swab_long_long): Use LL, not lL, for constant. -- cgit v1.2.3 From 4ea7077cd0bbe0fa90363323ab9b969652b2d1e5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 Mar 2002 21:11:48 +0000 Subject: . --- ufs/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index a655a739..b568623a 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +2002-03-11 Roland McGrath + + * Makefile (ufs.static): Depend on + $(boot-store-types:%=../libstore/libstore_%.a). + 2001-11-21 Roland McGrath * inode.c (read_disknode): Just always call getpid for the fsid value. -- cgit v1.2.3 From 287caf2227a7432a3b4a3adaf7c7a85c120df4f4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 8 May 2002 10:00:26 +0000 Subject: . --- ufs/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index b568623a..f0192426 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,12 @@ +2002-05-08 Roland McGrath + + * main.c (diskfs_append_args): Fix argument type. + (main): Use %z format modifier for size_t arg. + * dir.c (dirscanblock): Use %z format modifier for vm_address_t arg. + (diskfs_dirempty): int -> vm_address_t + (count_dirents): int -> size_t + (diskfs_get_directs): u_int -> size_t + 2002-03-11 Roland McGrath * Makefile (ufs.static): Depend on -- cgit v1.2.3 From 4769366ca8af3f3c39cabc604de33c7aef5814ed Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 11 Jun 2002 21:43:43 +0000 Subject: . --- ufs-fsck/ChangeLog | 10 ++++++++++ ufs-utils/ChangeLog | 4 ++++ ufs/ChangeLog | 10 ++++++++++ 3 files changed, 24 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs-fsck/ChangeLog b/ufs-fsck/ChangeLog index 0e678ab5..7260520b 100644 --- a/ufs-fsck/ChangeLog +++ b/ufs-fsck/ChangeLog @@ -1,3 +1,13 @@ +2002-06-08 Roland McGrath + + * dir.c, pass1.c, pass1b.c, pass2.c: Use %Ld for ino_t values. + * utilities.c: Likewise. + + * fsck.h: Use ino_t for lfdir. + * setup.c: Likewise. + + * fsck.h (struct dirinfo): Use size_t for i_isize. + 2001-09-30 Roland McGrath * pass5.c (pass5): A little manual CSE makes buggy gcc not to crash. diff --git a/ufs-utils/ChangeLog b/ufs-utils/ChangeLog index 66cefd4c..f65e9ce1 100644 --- a/ufs-utils/ChangeLog +++ b/ufs-utils/ChangeLog @@ -1,3 +1,7 @@ +2002-06-08 Roland McGrath + + * mkfs.c (iput): Use %Ld format for ino_t values. + 2001-12-06 Roland McGrath * dlabel.c (fd_get_device): Only deallocate NODE if store_create fails. diff --git a/ufs/ChangeLog b/ufs/ChangeLog index f0192426..06e3b323 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,13 @@ +2002-06-08 Roland McGrath + + * inode.c (diskfs_cached_lookup): Use ino_t for argument. + + * dir.c (diskfs_direnter_hard): Use size_t for OLDSIZE. + Fail with EOVERFLOW when it would exceed that width. + + * alloc.c, dir.c: Use %Ld format for ino_t values. + * alloc.c (diskfs_alloc_node): Use %Ld format for blkcnt_t values. + 2002-05-08 Roland McGrath * main.c (diskfs_append_args): Fix argument type. -- cgit v1.2.3 From 5f792f6e012b161d85629a070b282ed76965df93 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 1 Aug 2002 00:59:41 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 06e3b323..f0776c59 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +2002-07-31 Roland McGrath + + * dir.c (diskfs_direnter_hard): Fix test in last change. + 2002-06-08 Roland McGrath * inode.c (diskfs_cached_lookup): Use ino_t for argument. -- cgit v1.2.3 From 03dc572901fa888f0ea0c57d2ab2fba5cea3ace5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 4 Oct 2002 20:55:55 +0000 Subject: . --- ufs/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index f0776c59..e2409670 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +2002-10-03 Roland McGrath + + * dir.h (MAXNAMLEN): #undef before defining. + 2002-07-31 Roland McGrath * dir.c (diskfs_direnter_hard): Fix test in last change. -- cgit v1.2.3 From b3e5743bb26240cf69b2822446231178c50e2d9e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 14 Mar 2006 23:26:37 +0000 Subject: 2006-03-15 Thomas Schwinge * dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue. --- ufs/ChangeLog | 4 ++++ ufs/dir.h | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index e2409670..aa30e784 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +2006-03-15 Thomas Schwinge + + * dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue. + 2002-10-03 Roland McGrath * dir.h (MAXNAMLEN): #undef before defining. diff --git a/ufs/dir.h b/ufs/dir.h index e37b1e9c..5730ef44 100644 --- a/ufs/dir.h +++ b/ufs/dir.h @@ -91,13 +91,13 @@ struct directory_entry { /* Return the namlen from a struct direct, paying attention to whether this filesystem supports the type extension */ #if (BYTE_ORDER == LITTLE_ENDIAN) -#define DIRECT_NAMLEN(dp) (direct_symlink_extension || swab_disk \ - ? (dp)->d_namlen \ - : (dp)->d_type) +#define DIRECT_NAMLEN(dp) (*(direct_symlink_extension || swab_disk \ + ? &(dp)->d_namlen \ + : &(dp)->d_type)) #else -#define DIRECT_NAMLEN(dp) (!direct_symlink_extension && swab_disk \ - ? (dp)->d_type \ - : (dp)->d_namlen) +#define DIRECT_NAMLEN(dp) (*(!direct_symlink_extension && swab_disk \ + ? &(dp)->d_type \ + : &(dp)->d_namlen)) #endif /* -- cgit v1.2.3 From 8c1ea85c28a7a8f0f1dd963ad22fce4bcc97f9bf Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 20 Aug 2007 15:51:49 +0000 Subject: [doc/ChangeLog] 2007-08-16 Samuel Thibault * hurd.texi: Document diskfs_set_node_atime. [ext2fs/ChangeLog] 2007-08-16 Samuel Thibault * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call diskfs_set_node_atime instead of setting dp->dn_set_atime. [fatfs/ChangeLog] 2007-08-16 Samuel Thibault * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call diskfs_set_node_atime instead of setting dp->dn_set_atime. [libdiskfs/ChangeLog] 2007-08-16 Samuel Thibault * diskfs.h (diskfs_set_node_atime): New declaration. * node-times.c (diskfs_set_node_atime): New function. [ufs/ChangeLog] 2007-08-16 Samuel Thibault * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call diskfs_set_node_atime instead of setting dp->dn_set_atime. * inode.c (read_symlink_hook): Likewise. --- ufs/ChangeLog | 6 ++++++ ufs/dir.c | 15 +++++---------- ufs/inode.c | 3 +-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index aa30e784..c7f01b7a 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,9 @@ +2007-08-16 Samuel Thibault + + * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call + diskfs_set_node_atime instead of setting dp->dn_set_atime. + * inode.c (read_symlink_hook): Likewise. + 2006-03-15 Thomas Schwinge * dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue. diff --git a/ufs/dir.c b/ufs/dir.c index 83b30e72..7d9b0f55 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -162,8 +162,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, inum = 0; - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); /* Start the lookup at DP->dn->dir_idx. */ idx = dp->dn->dir_idx; @@ -200,8 +199,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); @@ -752,8 +750,7 @@ diskfs_dirempty(struct node *dp, mach_port_deallocate (mach_task_self (), memobj); assert (!err); - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); for (curoff = buf; curoff < buf + dp->dn_stat.st_size; @@ -768,15 +765,13 @@ diskfs_dirempty(struct node *dp, && entry->d_name[1] != '\0'))) { munmap ((caddr_t) buf, dp->dn_stat.st_size); - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); return 0; } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); munmap ((caddr_t) buf, dp->dn_stat.st_size); diff --git a/ufs/inode.c b/ufs/inode.c index a8bb661f..228429b1 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -431,8 +431,7 @@ read_symlink_hook (struct node *np, bcopy ((dino (np->dn->number))->di_shortlink, buf, np->dn_stat.st_size); - if (! diskfs_check_readonly ()) - np->dn_set_atime = 1; + diskfs_set_node_atime (dp); diskfs_end_catch_exception (); return 0; -- cgit v1.2.3 From ac6532774d82f0256e6821f3120e7983e4ed5cb6 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 13 Nov 2007 23:32:45 +0000 Subject: 2007-11-13 Thomas Schwinge * inode.c (read_disknode, write_node): Adapt to ``struct stat'' changes. --- ufs/ChangeLog | 5 +++++ ufs/inode.c | 36 ++++++++++++------------------------ 2 files changed, 17 insertions(+), 24 deletions(-) (limited to 'ufs/ChangeLog') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index c7f01b7a..14fb86bd 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,8 @@ +2007-11-13 Thomas Schwinge + + * inode.c (read_disknode, write_node): Adapt to ``struct stat'' + changes. + 2007-08-16 Samuel Thibault * dir.c (diskfs_lookup_hard, diskfs_dirempty): Call diff --git a/ufs/inode.c b/ufs/inode.c index 8223fe7f..1a8a7098 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -233,18 +233,12 @@ read_disknode (struct node *np) | (di->di_trans ? S_IPTRANS : 0)); st->st_nlink = read_disk_entry (di->di_nlink); st->st_size = read_disk_entry (di->di_size); -#ifdef notyet - st->st_atimespec = di->di_atime; - st->st_mtimespec = di->di_mtime; - st->st_ctimespec = di->di_ctime; -#else - st->st_atime = read_disk_entry (di->di_atime.tv_sec); - st->st_atime_usec = read_disk_entry (di->di_atime.tv_nsec) / 1000; - st->st_mtime = read_disk_entry (di->di_mtime.tv_sec); - st->st_mtime_usec = read_disk_entry (di->di_mtime.tv_nsec) / 1000; - st->st_ctime = read_disk_entry (di->di_ctime.tv_sec); - st->st_ctime_usec = read_disk_entry (di->di_ctime.tv_nsec) / 1000; -#endif + st->st_atim.tv_sec = read_disk_entry (di->di_atime.tv_sec); + st->st_atim.tv_nsec = read_disk_entry (di->di_atime.tv_nsec); + st->st_mtim.tv_sec = read_disk_entry (di->di_mtime.tv_sec); + st->st_mtim.tv_nsec = read_disk_entry (di->di_mtime.tv_nsec); + st->st_ctim.tv_sec = read_disk_entry (di->di_ctime.tv_sec); + st->st_ctim.tv_nsec = read_disk_entry (di->di_ctime.tv_nsec); st->st_blksize = sblock->fs_bsize; st->st_blocks = read_disk_entry (di->di_blocks); st->st_flags = read_disk_entry (di->di_flags); @@ -359,18 +353,12 @@ write_node (struct node *np) write_disk_entry (di->di_nlink, st->st_nlink); write_disk_entry (di->di_size, st->st_size); -#ifdef notyet - di->di_atime = st->st_atimespec; - di->di_mtime = st->st_mtimespec; - di->di_ctime = st->st_ctimespec; -#else - write_disk_entry (di->di_atime.tv_sec, st->st_atime); - write_disk_entry (di->di_atime.tv_nsec, st->st_atime_usec * 1000); - write_disk_entry (di->di_mtime.tv_sec, st->st_mtime); - write_disk_entry (di->di_mtime.tv_nsec, st->st_mtime_usec * 1000); - write_disk_entry (di->di_ctime.tv_sec, st->st_ctime); - write_disk_entry (di->di_ctime.tv_nsec, st->st_ctime_usec * 1000); -#endif + write_disk_entry (di->di_atime.tv_sec, st->st_atim.tv_sec); + write_disk_entry (di->di_atime.tv_nsec, st->st_atim.tv_nsec); + write_disk_entry (di->di_mtime.tv_sec, st->st_mtim.tv_sec); + write_disk_entry (di->di_mtime.tv_nsec, st->st_mtim.tv_nsec); + write_disk_entry (di->di_ctime.tv_sec, st->st_ctim.tv_sec); + write_disk_entry (di->di_ctime.tv_nsec, st->st_ctim.tv_nsec); write_disk_entry (di->di_blocks, st->st_blocks); write_disk_entry (di->di_flags, st->st_flags); -- cgit v1.2.3