ChangeSet@1.517, 2002-05-04 22:58:17+01:00, aia21@cantab.netNTFS: Release 2.0.6 - Major bugfix to make compatible with other kernel changes.- Initialize the mftbmp address space properly now that there are more fields in the struct address_space. This was leading to hangs and oopses on umount since 2.5.12 because of changes to other parts of the kernel. We probably want a kernel generic init_address_space() function...- Drop BKL from ntfs_readdir() after consultation with Al Viro. The only caller of ->readdir() is vfs_readdir() which holds i_sem during the call, and i_sem is sufficient protection against changes in the directory inode (including ->i_size).- Use generic_file_llseek() for directories (as opposed to default_llseek()) as this downs i_sem instead of the BKL which is what we now need for exclusion against ->f_pos changes considering we no longer take the BKL in ntfs_readdir().

Note that a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.

+2.0.6:+ - Major bugfix to make compatible with other kernel changes. This fixes+ the hangs/oopses on umount.+ - Locking cleanup in directory operations (remove BKL usage).+2.0.5:+ - Major buffer overflow bug fix.+ - Minor cleanups and updates for kernel 2.5.12. 2.0.4: - Cleanups and updates for kernel 2.5.11. 2.0.3:diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog--- a/fs/ntfs/ChangeLog Sat May 4 23:12:47 2002+++ b/fs/ntfs/ChangeLog Sat May 4 23:12:47 2002@@ -14,11 +14,6 @@ strictly a speed optimization. Obviously need to keep the ->run_list locked or RACE. load_attribute_list() already performs such an optimization so use the same optimization where desired.- - Optimize all our readpage functions to not do i/o on buffer heads- beyond initialized_size, just zero the buffer heads instead.- Question: How to setup the buffer heads so they point to the on disk- location correctly (after all they are allocated) but are not read- from disk? - Consider if ntfs_file_read_compressed_block() shouldn't be coping with initialized_size < data_size. I don't think it can happen but it requires more careful consideration.@@ -26,6 +21,24 @@ several copies of almost identicall functions and the functions are quite big. Modularising them a bit, e.g. a-la get_block(), will make them cleaner and make code reuse easier.+ - Want to use dummy inodes for address space i/o. We need some VFS+ changes first, which are currently under discussion.++2.0.6 - Major bugfix to make compatible with other kernel changes.++ - Initialize the mftbmp address space properly now that there are more+ fields in the struct address_space. This was leading to hangs and+ oopses on umount since 2.5.12 because of changes to other parts of+ the kernel. We probably want a kernel generic init_address_space()+ function...+ - Drop BKL from ntfs_readdir() after consultation with Al Viro. The+ only caller of ->readdir() is vfs_readdir() which holds i_sem during+ the call, and i_sem is sufficient protection against changes in the+ directory inode (including ->i_size).+ - Use generic_file_llseek() for directories (as opposed to+ default_llseek()) as this downs i_sem instead of the BKL which is+ what we now need for exclusion against ->f_pos changes considering we+ no longer take the BKL in ntfs_readdir().

/*- * VFS calls readdir with BKL held so no possible RACE conditions.+ * VFS calls readdir without BKL but with i_sem held. This protects the VFS+ * parts (e.g. ->f_pos and ->i_size, and it also protects against directory+ * modifications). Together with the rw semaphore taken by the call to+ * map_mft_record(), the directory is truly locked down so we have a race free+ * ntfs_readdir() without the BKL. (-:+ * * We use the same basic approach as the old NTFS driver, i.e. we parse the * index root entries and then the index allocation entries that are marked * as in use in the index bitmap.@@ -525,7 +530,6 @@ u8 *kaddr, *bmp, *index_end; attr_search_context *ctx;