2007-03-31 Thomas Schwinge * Makefile (HURDLIBS): Put ``threads'' in front of ``ports''. 2007-03-30 Thomas Schwinge * inode.c (read_node): Correctly convert from nanoseconds to microseconds. 2007-03-28 Thomas Schwinge * Makefile (fatfs.static): New target. * main.c (diskfs_readonly): Remove variable. (main): Set `diskfs_readonly' and `diskfs_hard_readonly' to one. 2005-07-12 Marcus Brinkmann * pager.c (diskfs_get_filemap): Initialize upi->max_prot to PROT. 2003-08-09 Marcus Brinkmann * fat.h: Include . (read_dword) [BYTE_ORDER == BIG_ENDIAN]: Use bswap_32 to swap bytes. (write_dword) [BYTE_ORDER == BIG_ENDIAN]: Likewise. (read_word) [BYTE_ORDER == BIG_ENDIAN]: Use bswap_16 to swap bytes. (write_word) [BYTE_ORDER == BIG_ENDIAN]: Likewise. 2003-08-03 Marco Gerards * fatfs.h (struct disknode): New member DIRNODE. * inode.c (read_node): Added assertion to be sure the directory can always be found. Add directory dependancy to node by initializing DIRNODE and holding a reference. (diskfs_node_norefs): Release reference to DIRNODE. (write_node): Don't use diskfs_cached_lookup to lookup the directory, use DIRNODE instead and lock DP. Don't use diskfs_nput, use mutex_unlock instead. (diskfs_alloc_node): Add directory dependancy to node by initializing DIRNODE and holding a reference. 2003-08-05 Marcus Brinkmann * fat.c (fat_read_sblock): Catch error from store_read. 2003-08-03 Marco Gerards * inode.c (read_node): Fix typo. 2003-08-01 Marco Gerards * node-create.c: New file. * Makefile (SRCS): Added node-created.c. * dir.c: Include . (diskfs_direnter_hard): Initialize a new block with zeros. Enter direntry and setup the virtual inode. Also handle directories correctly. (diskfs_rewrite_hard): Function rewritten. (diskfs_dirempty): Change logic to test if a file was deleted. * fat.c (fat_extend_chain): Unlock spin_lock when returning from function. Set dn->last to 0 when deallocating the complete file. Update dn->last when not deallocating the complete file. Set dn->first to zero when the complete file was deallocated. Also update dn->length_of_chain to the new amount of clusters in the chain. * main.c (diskfs_hard_readonly): Remove global variable. 2003-07-29 Jeff Bailey * fatfs.h (LOG2_BLOCKS_PER_CLUSTER): Fix typo. 2003-07-17 Marcus Brinkmann * pager.c (find_cluster): Round to cluster size rather than adding cluster size. 2003-07-14 Marco Gerards * fat.c (fat_read_sblock): Don't test if the root dir size is a multiple of sectors_per_cluster. Reported by Barry deFreese (bddebian@cox.net). * fatfs.h (LOG2_BLOCKS_PER_CLUSTER): New macro. (FAT_FIRST_CLUSTER_BLOCK): Likewise. (fat_first_cluster_byte): Macro removed. * inode.c (read_node): Correctly setup diskfs_root_node for FAT32 filesystems. * pager.c (fat_getcluster): Check for reading beyond allocsize correctly for file systems with a clustersize > vm_page_size. (file_pager_read_small_page): Don't use byte offsets when calculating the block. (file_pager_read_huge_page): Likewise. (pending_clusters_write): Likewise. (file_pager_write_small_page): Likewise. (STAT_INC): Cast to void to suppress warning. 2003-04-26 Marco Gerards * dir.c (diskfs_get_directs): Consider ENTRY when adding "." and ".." for the rootnode. * inode.c (read_node): Use ifind instead of diskfs_cached_lookup and do not use diskfs_nput anymore. * main.c (diskfs_S_fsys_getfile): New function. 2002-10-06 Marcus Brinkmann * main.c (diskfs_server_version): Set to HURD_VERSION. * dir.c (dirscanblock): Always emulate "." and ".." for the root dir, even on FAT32. (diskfs_get_directs): Likewise. New variable DOTDOT. Set EP to DOT or DOTDOT when approriate. Implement inode number generation with vi_rlookup. Submitted by Marco Gerards . * main.c (fetch_root): Implement this for FAT32. Submitted by Marco Gerards . * fatfs.h: Renamed prototype from fat_next_cluster to fat_get_next_cluster. * fat.c (fat_extend_chain): Replace CLUSTERS_PER_CHAIN with CLUSTERS_PER_TABLE and LOG2_CLUSTERS_PER_CHAIN with LOG2_CLUSTERS_PER_TABLE. (fat_getcluster): Likewise. (fat_truncate_node): Likewise. Submitted by Marco Gerards . * fat.c (fat_get_freespace): New function. * fat.h: New prototype for fat_get_freespace. * inode.c (diskfs_set_statfs): Set ST->f_bfree and ST->f_bavail. Submitted by Marco Gerards . * fatfs.h: New prototypes for fs_uid and fs_gid. New prototype for refresh_node_stats. * inode.c (read_node): Set ST->st_uid to fs_uid and ST->st_gid to fs_gid. (refresh_node_stats): New function. * main.c: New variables default_fs_uid, default_fs_gid, fs_uid, fs_gid. Include (options): New variable. (startup_children): Likewise. (startup_argp): Likewise. (runtime_children): Likewise. (runtime_argp): Likewise. (diskfs_runtime_argp): Likewise. (parse_opt): New function. (main): Set default_fs_uid, default_fs_gid, fs_uid and fs_gid. Pass startup_argp to diskfs_init_main. Submitted by Marco Gerards . * main.c (read_sblock): Move to ... * fat.c (read_sblock): ... here and rename to fat_read_sblock. New variable READ. Don't use disk_image but access store directly. (fat_read_sblock): Remove check for large clusters. * fat.c: Include Submitted by Marco Gerards . * fatfs.h (struct user_pager_info): Rename DISK in enum pager_type to FAT. (disk_image): Rename to fat_image and make extern. (host_name, mounted_on): Remove cruft. (sblock, dr_root_node): Make extern. * pager.c (create_disk_pager): Rename to create_fat_pager. Create the pager with the type FAT and size of the FAT, not the whole disk. Use fat_image instead disk_image. (pager_read_page): Replace DISK with FAT and call fat_pager_read_page instead disk_pager_read_page. (pager_write_page): Replace DISK with FAT and call fat_pager_write_page instead disk_pager_write_page. (pager_report_extent): Replace DISK with FAT and return new size. (disk_pager_read_page): Rename to fat_pager_read_page. Adjusted to restrict to new size. Use memset instead bcopy. dev_end renamed to fat_end. Add beginning of FAT to page. (disk_pager_write_page): Rename to fat_pager_write_page. Adjusted to restrict to new size. dev_end renamed to fat_end. Add beginning to FAT to PAGE. (file_pager_read_huge_page): Use memcpy instead bcopy. (pending_clusters_write): Likewise. * fat.c (fat_write_next_cluster): Don't add the beginning of FAT to FAT_ENTRY_OFFSET. Reflect renaming of disk_image to fat_image. (fat_get_next_cluster): Likewise. * main.c (main): Call fat_read_sblock, not read_block. Call create_fat_pager instead create_disk_pager, and do this only after reading the superblock. * main.c (fetch_root): Use memset, not bzero. (read_sblock): Use memcpy, not bcopy. * dir.c (diskfs_get_directs): Replace bcopy with memcpy. 2002-04-15 Marcus Brinkmann * dir.c (diskfs_get_directs): Count the special cased DOT and DOTDOT directories for root directory nodes in FAT12 and FAT16 file systems. * dir.c (dirscanblock): Determine the parent inode correctly. Submitted by Marco Gerards . * inode.c (read_node): Add VK.dir_offset to BUF before doing the pointer conversion. (write_node): Likewise. Submitted by Marco Gerards . * inode.c (write_node): Save the modification time as write time. Submitted by Marco Gerards . * fat.h: Add prototype for fat_from_epoch(). Submitted by Marco Gerards . * inode.c (read_node): For the root dir of a FAT12/16 file system, set allocsize to size of the root directory region. (read_node): For files, round up to a full cluster multiple. Reported by Marco Gerards . 2000-05-05 Marcus Brinkmann * Initial release.