📄 changelog
字号:
Oops! Last set of changes didn't compile but they're OK now. * hfs_btree.h, hfs_fs.h, mdb.c, ccache.c, extent.c, btree.c: Move the definition of (struct hfs_raw_extent) inside extent.c and treat it as simple array of U16's elsewhere. * hfs_fs.h, dir_dbl.c, dir_nat.c, ccache.c, catalog.c, dir_cap.c: Make hfs_cat_next() return the CNID and cdrType of the entry. Now catalog.c and ccache.c are the only files which depend on the structure of a catalog record on disk. * dir.c, hfs_fs.h, catalog.c: Replace hfs_cat_new_{file,dir}() with hfs_cat_{create,mkdir}() which are wrappers for what used to be hfs_cat_create(). * hfs_fs.h, mdb.c, super.c, Makefile: Split super.c into super.c (Linux stuff) and mdb.c (MDB stuff). * super.c, hfs_fs_sb.h: Add the MDB field 'drAtrb' to (struct hfs_mdb) as the field 'attrib'. * hfs_fs_sb.h, super.c: Split hfs_read_super() into hfs_read_super() and hfs_mdb_read(). * super.c, hfs_fs_sb.h: Remove the unneeded 'hs' field from (struct hfs_mdb). * TODO: Remove item about hfs_notify_change() needing to update metadata. * inode.c, hfs_fs.h, hfs_fs_sb.h, file_cap.c, file_dbl.c, file_nat.c, file.c, dir.c: Add a flags argument to hfs_{cap,dbl,nat}_buildmeta() so that it only builds the parts that are currently out-of-date. Call hfs_{cap,dbl,nat}_buildmeta() through hfs_update_meta() in hfs_notify_change() and hfs_rename() to update the metadata. * dir.c: Make test for normal dir in update_dirs_{plus,minus}() more explicit. * inode.c, file_cap.c, file_dbl.c, file_nat.c, dir_dbl.c, dir_nat.c, file.c, README.sgml, dir_cap.c: Resolve the "meta-data" vs. "metadata" rivalry in favor of the latter. * btree.c: Simplify some debugging code. * hfs_btree_private.h, bnode.c, btree.c, balloc.c: Put the in-core copy of the header node IN the B-tree structure rather than just a pointer to it. * hfs_btree_private.h, btree.c, bnode.c: Have hfs_btree_commit() call hfs_bnode_commit() to commit the header and root nodes. * hfs_fs.h, super.c, hfs_btree_private.h, btree.c, hfs_btree.h, balloc.c: Change hfs_commit_mdb() to hfs_mdb_commit(). Make hfs_mdb_commit() call hfs_btree_commit(). Move code to update B-tree size and extent from hfs_btree_extend() to hfs_btree_commit(). Make hfs_btree_extend() call hfs_mdb_commit(). * super.c: Change hfs_commit_super() to hfs_commit_mdb(). * btree.c, bnode.c, bfind.c: Fixed up broken debugging code and error messages. * super.c, hfs_btree_private.h, btree.c, hfs_btree.h, bdelete.c, binsert.c, balloc.c: Now use write-back caching of B-tree header fields. * hfs_fs.h: Get rid of the add{16,32}() inlines as they are no longer used. * hfs_btree_private.h, binsert.c, btree.c, bdelete.c, bfind.c, balloc.c: All the needed fields of the B-tree header are now cached for reading, but not yet writing. * TODO: Remove "Implement write count" from TODO list. * file.c, super.c, bnode.c: Implement write count. * catalog.c: Fix directory entry counting in hfs_cat_move(). * balloc.c: Simplify hfs_btree_extend(), since the allocation request will get rounded up to the clumpsize. * extent.c: Honor clumpsize when allocating blocks to files. * file_cap.c, file_dbl.c, file_nat.c, super.c, dir.c, file.c, ccache.c, catalog.c, balloc.c: Mark 44 functions in need of commenting. * hfs_fs_sb.h, super.c, extent.c, hfs_fs.h, ccache.c, btree.c, balloc.c: Record clumpsize in allocation blocks rather than 512-byte blocks. * sysdep.h, super.c, TODO, balloc.c, hfs_fs_sb.h: Now updates the backup MDB when a B-tree grows. * extent.c: hfs_extent_free() had test against NULL backward. The result is that access to a file with extents in the extents B-tree would result in an infinite loop in hfs_cat_put(). * hfs_fs_sb.h, super.c, hfs_fs.h: Reorganize partition map code to get size of partition in preparation for dealing with the alternate MDB.Fri Aug 9 03:25:13 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * Makefile: Add make rules for README.{ps,info} * README, README.sgml, DOC, FAQ, Makefile, .cvsignore, Merge CHANGES into ChangeLog. Merge DOC, FAQ and README into README.sgml. Add make rules for building README.{txt,dvi} * BUG_INFO, Makefile: Added a BUG_INFO script which attempts to collect some useful information which I'd like to see in every bug report I receive. * Makefile, version.c: Added version.c which contains a version string.Thu Aug 8 21:48:24 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * trans.c: Fix Latin-1 -> Macintosh filename mapping to change colons to pipes. * trans.c: Fixed Mac->Latin-1 translation to behave as documented for the extended 8-bit characters without corresponding Latin-1 characters. * inode.c, super.c, file.c, hfs_fs_i.h, hfs_fs_sb.h, DOC: Added a conv={binary,text,auto} mount option similar to that of the msdos, hpfs and iso9660 filesystems, but applying only to data forks. As compared to those filesystems, HFS has the advantage that only a single CR need be converted to a NL, rather than a CR/NL sequence, so it is quite safe to seek in the file. Additionally the 'Type' field is far more reliable indicator of text files than a file extension. * super.c: Simplified parsing of mount options. * super.c: Oops! The part=<n> mount option was being parsed in octal! * TODO: Remove "case=lower" from the list of goals. * super.c, hfs_fs.h, hfs_fs_sb.h, string.c, dir_dbl.c, dir_nat.c, dir_cap.c, DOC: Resurrect the case={asis,lower} mount option. * dir.c: Simpler test for "normal" directory in update_dirs_{plus,minus}(). * hfs_fs_sb.h, super.c, dir.c, hfs_fs.h, catalog.c, DOC: Add mount options to specify what Type and Creator will be used for new files and change the default from NULLs to "????".Wed Aug 7 11:32:22 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * catalog.c: In hfs_cat_next() use entry->cnid rather than the key of the initial brec to identify the end of the directory. * README: Update for pre-0.7 version. * hfs_fs.h: Create versioned module if CONFIG_MODVERSIONS is set in linux/config.h * TODO: Note need for special steps for unaligned accesses on some machines. * FAQ: Added Q0: What is HFS? Added Q7: Does hfs_fs work w/ 400k and 800k diskettes? Brought Q6 (about writability) up to date. Made a few other answers more verbose.Tue Aug 6 00:58:46 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * Makefile: Changed 'snapshot' rule to include cvs tag command. * hfs_fs.h, dir_cap.c, dir_dbl.c, dir_nat.c, catalog.c, ccache.c: Implemented readers half of dir locking scheme so readdir() should produce consistent results and count_dir_entries() is not race prone. * catalog.c: hfs_cat_move() was calling hfs_cat_decache() after changing the key rather than before, corrupting the hash lists.Mon Aug 5 14:03:46 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * hfs_fs.h, catalog.c: Implemented the writers half of a locking scheme for directories. * inode.c: Fixed a serious bug in hfs_notify_change() that would allow a chmod() on directory meta-data and would cause the directory inode (if it was in memory at the time) to change into a file inode. * inode.c: Fixed a problem with write permissions on directory meta-data. * dir_dbl.c, dir_nat.c, dir_cap.c: hfs_{cap,dbl,nat}_readdir() now return the correct value in the 'd_ino' field of the dirent for all cases, something I think has always been done incorrectly until now. * dir_nat.c, inode.c, dir_cap.c: In hfs_{cap,nat}_lookup() take advantage of the 'file_type' field of (struct hfs_inode_info). * TODO: Removed two accomplished goals (rename() and improved readdir()). * inode.c, dir_dbl.c, dir_nat.c, hfs_fs_i.h, dir.c, dir_cap.c: Rewrite hfs_{cap,dbl,nat}_readdir() to take advantage of hfs_cat_next(). They now use a uniform 'i_size' for all inodes for a given directory. This simplifies update_dirs_{plus,minus}() and eliminates the need for the 'file_size' and 'dir_link' fields of (struct hfs_inode_info). For the CAP and Netatalk schemes the meta-data directories are now the last entries rather than coming just after '.' and '..'. This is in preparation for the day when we can write to the files in those directories, and ensures that when using 'tar' to copy HFS filesystems the file or directory will be created before the meta-data is written. Otherwise we could be stuck writing meta-data and not knowing if it is for a file or a directory! * ccache.c: Updated count_dir_entries() for new hfs_cat_next(). * hfs_fs.h, catalog.c: hfs_cat{nth,next}() no longer take a 'types' argument, so they now return all entries. hfs_cat_next() now uses the ParID of the key to detect the end of the directory. hfs_cat_nth() now accepts n=0 as a valid input, requesting the thread. * trans.c, string.c, super.c, dir_nat.c, hfs_fs.h, dir.c, dir_cap.c, dir_dbl.c, catalog.c: Rename (struct hfs_cname) to the more appropriate (struct hfs_pstr). * hfs_fs.h, hfs_btree.h: Move some constants from hfs_fs.h to hfs_btree.h * bdelete.c, hfs_btree.h: Remove hfs_bdelete_brec() from public B-tree interface. * hfs_btree_private.h, hfs_fs.h, btree.c, hfs_btree.h, bnode.c, brec.c, bfind.c, bins_del.c, binsert.c, balloc.c, bdelete.c, Makefile: Split B-tree stuff into public and private parts: brec.c split into bfind.c and brec.c hfs_btree.h split into hfs_btree.h and hfs_btree_private.c * inode.c: The tests and sets of the HFS_FIL_LOCK bit where all reversed! * hfs_fs.h, ccache.c: Redo some ccache stuff, removing the 'error' field from (struct hfs_cat_entry) and ensuring that hfs_cat_put() will not sleep on an uninitialized entry.Sun Aug 4 23:43:28 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * sysdep.h: Change swap{16,32}() back to macros since hton[ls]() are functions. * hfs_fs.h, ccache.c: Use only lowest order byte of parent CNID in hashing a catalog key. * bdelete.c: The "improved" bdelete() was TOO paranoid looking for missing parents. * ccache.c: Get rid of pointless swap16const(0). * hfs_fs.h, inode.c, extent.c, ccache.c, dir_cap.c, dir_nat.c, binsert.c, catalog.c: Store cnid and associated constants in big-endian byte order. This reduces the number of byte-order swaps required. * sysdep.h: Make swap32() and swap16() inline functions. * dir_nat.c, dir_cap.c, dir_dbl.c: Added hfs_rename() to the inode_operations for normal directories. * dir.c, hfs_fs.h: Added hfs_rename() and cleaned up hfs_{create,mkdir,unlink,rmdir}(). * catalog.c: Added the missing check for moving a directory into itself. * catalog.c, ccache.c, hfs_fs.h: Implement a nearly ideal hfs_cat_move(). It still needs to prevent moving a directory into itself. The functions hfs_cat_{create,delete,move}() still need work with respect to their atomicity (especially vs. readdir). * bdelete.c: Fixed a serious bug in hfs_bdelete_brec() that would yield a corrupted b-tree when the first record in a bnode was deleted. Made bdelete() more aggressive when checking for missing parents.Sat Aug 3 06:11:50 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * btree.c, super.c: Fixed a problem that caused a kernel oops when no HFS filesystem is found.Wed Jul 24 13:06:12 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * catalog.c: Remove race in hfs_cat_create() that could overflow directory valence. * catalog.c: Fix hfs_cat_create() so the parent directory doesn't get deleted out from under it. Otherwise we could have created files and directories in deleted directories. * hfs_fs.h, dir_cap.c, dir_dbl.c, dir_nat.c, catalog.c, ccache.c: Redo hfs_cat_{next,nth}() in terms of which entry types to allow, rather than which to skip. * catalog.c: The function hfs_cat_create() would fail to hfs_cat_put(entry) if the 'record' argument was invalid or if the 'result' argument was NULL. * dir.c: The functions hfs_{create,mkdir,unlink,rmdir} all failed to call iput() when their arguments conflicted with a reserved name. * catalog.c, hfs_fs_sb.h: Start over on rename(). Still unfinished. Fix silly bug in hfs_cat_create() that made it always fail. * ccache.c: Fix byte-order bug in write_entry().Tue Jul 23 12:12:58 1996 Paul H. Hargrove <hargrove@sccm.stanford.edu> * dir_dbl.c, dir_nat.c, hfs_fs.h, dir.c, dir_cap.c: Remove the macros KEY() and PARENT() since the key is now easy to access through the catalog entry. Replace the macros NAME{IN,OUT}() with inline functions hfs_name{in,out}() to gain type checking of arguments. * catalog.c: Remove the macro TYPE(). * inode.c, file_dbl.c, file_nat.c, file.c, file_cap.c: Remove the #define's of the unused macro KEY(). * hfs_fs.h, dir_cap.c, dir_dbl.c, dir_nat.c, catalog.c, dir.c: Replace hfs_lookup_parent() in dir.c with hfs_cat_parent() in catalog.c. This new function performs locking to protect against rename() changing the parent during I/O. It is also intended for use with files as well as directories. Change hfs_{cap,dbl,nat}_lookup() to use the new function. * dir.c, hfs_fs.h, catalog.c: Remerge hfs_cat_{create,mkdir}() into hfs_cat_create() and resurrect hfs_cat_new_{file,dir}(). Fix hfs_cat_{create,delete} to use the improved catalog cache for locking in place of directory-level create/delete locks. Fix hfs_{create,mkdir}() to use the new hfs_cat_create(). * hfs_fs.h, ccache.c: Rewrite parts to remove need for specialized create/delete locking. Use new case-independent hash function. Fix bug in hfs_cat_get() that would read an entry w/o locking it. Call hfs_relinquish() before retrying a deleted entry in hfs_cat_get. If there is a read error, then don't retry in hfs_cat_get(). Remove unused 'version' field from (struct hfs_cat_entry). * sysdep.h: Add hfs_relinquish(), a system-independent alias for schedule(). * hfs_fs.h, string.c: Add hfs_strhash(), a simplistic case-independent hash function. * hfs_fs.h, inode.c:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -