changelog
来自「Linux Kernel 2.6.9 for OMAP1710」· 代码 · 共 1,154 行 · 第 1/5 页
TXT
1,154 行
ToDo/Notes: - Find and fix bugs. - Checkpoint or disable the user space journal ($UsnJrnl). - In between ntfs_prepare/commit_write, need exclusion between simultaneous file extensions. Need perhaps an NInoResizeUnderway() flag which we can set in ntfs_prepare_write() and clear again in ntfs_commit_write(). Just have to be careful in readpage/writepage, as well as in truncate, that we play nice... We might need to have a data_size field in the ntfs_inode to store the real attribute length. Also need to be careful with initialized_size extention in ntfs_prepare_write. Basically, just be _very_ careful in this code... OTOH, perhaps i_sem, which is held accross generic_file_write is sufficient for synchronisation here. We then just need to make sure ntfs_readpage/writepage/truncate interoperate properly with us. - Implement mft.c::sync_mft_mirror_umount(). We currently will just leave the volume dirty on umount if the final iput(vol->mft_ino) causes a write of any mirrored mft records due to the mft mirror inode having been discarded already. Whether this can actually ever happen is unclear however so it is worth waiting until someone hits the problem. - Enable the code for setting the NT4 compatibility flag when we start making NTFS 1.2 specific modifications.2.1.20 - Fix a stupid bug in ntfs_attr_reinit_search_ctx(). - Fix stupid bug in fs/ntfs/attrib.c::ntfs_attr_reinit_search_ctx() where we did not clear ctx->al_entry but it was still set due to changes in ntfs_attr_lookup() and ntfs_external_attr_find() in particular. - Fix another stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find() where we forgot to unmap the extent mft record when we had finished enumerating an attribute which caused a bug check to trigger when the VFS calls ->clear_inode.2.1.19 - Many cleanups, improvements, and a minor bug fix. - Update ->setattr (fs/ntfs/inode.c::ntfs_setattr()) to refuse to change the uid, gid, and mode of an inode as we do not support NTFS ACLs yet. - Remove BKL use from ntfs_setattr() syncing up with the rest of the kernel. - Get rid of the ugly transparent union in fs/ntfs/dir.c::ntfs_readdir() and ntfs_filldir() as per suggestion from Al Viro. - Change '\0' and L'\0' to simply 0 as per advice from Linus Torvalds. - Update ->truncate (fs/ntfs/inode.c::ntfs_truncate()) to check if the inode size has changed and to only output an error if so. - Rename fs/ntfs/attrib.h::attribute_value_length() to ntfs_attr_size(). - Add le{16,32,64} as well as sle{16,32,64} data types to fs/ntfs/types.h. - Change ntfschar to be le16 instead of u16 in fs/ntfs/types.h. - Add le versions of VCN, LCN, and LSN called leVCN, leLCN, and leLSN, respectively, to fs/ntfs/types.h. - Update endianness conversion macros in fs/ntfs/endian.h to use the new types as appropriate. - Do proper type casting when using sle64_to_cpup() in fs/ntfs/dir.c and index.c. - Add leMFT_REF data type to fs/ntfs/layout.h. - Update all NTFS header files with the new little endian data types. Affected files are fs/ntfs/layout.h, logfile.h, and time.h. - Do proper type casting when using ntfs_is_*_recordp() in fs/ntfs/logfile.c, mft.c, and super.c. - Fix all the sparse bitwise warnings. Had to change all the typedef enums storing little endian values to simple enums plus a typedef for the datatype to make sparse happy. - Fix a bug found by the new sparse bitwise warnings where the default upcase table was defined as a pointer to wchar_t rather than ntfschar in fs/ntfs/ntfs.h and super.c. - Change {const_,}cpu_to_le{16,32}(0) to just 0 as suggested by Al Viro.2.1.18 - Fix scheduling latencies at mount time as well as an endianness bug. - Remove vol->nr_mft_records as it was pretty meaningless and optimize the calculation of total/free inodes as used by statfs(). - Fix scheduling latencies in ntfs_fill_super() by dropping the BKL because the code itself is using the ntfs_lock semaphore which provides safe locking. (Ingo Molnar) - Fix a potential bug in fs/ntfs/mft.c::map_extent_mft_record() that could occur in the future for when we start closing/freeing extent inodes if we don't set base_ni->ext.extent_ntfs_inos to NULL after we free it. - Rename {find,lookup}_attr() to ntfs_attr_{find,lookup}() as well as find_external_attr() to ntfs_external_attr_find() to cleanup the namespace a bit and to be more consistent with libntfs. - Rename {{re,}init,get,put}_attr_search_ctx() to ntfs_attr_{{re,}init,get,put}_search_ctx() as well as the type attr_search_context to ntfs_attr_search_ctx. - Force use of ntfs_attr_find() in ntfs_attr_lookup() when searching for the attribute list attribute itself. - Fix endianness bug in ntfs_external_attr_find(). - Change ntfs_{external_,}attr_find() to return 0 on success, -ENOENT if the attribute is not found, and -EIO on real error. In the case of -ENOENT, the search context is updated to describe the attribute before which the attribute being searched for would need to be inserted if such an action were to be desired and in the case of ntfs_external_attr_find() the search context is also updated to indicate the attribute list entry before which the attribute list entry of the attribute being searched for would need to be inserted if such an action were to be desired. Also make ntfs_find_attr() static and remove its prototype from attrib.h as it is not used anywhere other than attrib.c. Update ntfs_attr_lookup() and all callers of ntfs_{external,}attr_{find,lookup}() for the new return values. - Minor cleanup of fs/ntfs/inode.c::ntfs_init_locked_inode().2.1.17 - Fix bugs in mount time error code paths and other updates. - Implement bitmap modification code (fs/ntfs/bitmap.[hc]). This includes functions to set/clear a single bit or a run of bits. - Add fs/ntfs/attrib.[hc]::ntfs_find_vcn() which returns the locked runlist element containing a particular vcn. It also takes care of mapping any needed runlist fragments. - Implement cluster (de-)allocation code (fs/ntfs/lcnalloc.[hc]). - Load attribute definition table from $AttrDef at mount time. - Fix bugs in mount time error code paths involving (de)allocation of the default and volume upcase tables. - Remove ntfs_nr_mounts as it is no longer used.2.1.16 - Implement access time updates, file sync, async io, and read/writev. - Add support for readv/writev and aio_read/aio_write (fs/ntfs/file.c). This is done by setting the appropriate file operations pointers to the generic helper functions provided by mm/filemap.c. - Implement fsync, fdatasync, and msync both for files (fs/ntfs/file.c) and directories (fs/ntfs/dir.c). - Add support for {a,m,c}time updates to inode.c::ntfs_write_inode(). Note, except for the root directory and any other system files opened by the user, the system files will not have their access times updated as they are only accessed at the inode level an hence the file level functions which cause the times to be updated are never invoked.2.1.15 - Invalidate quotas when (re)mounting read-write. - Add new element itype.index.collation_rule to the ntfs inode structure and set it appropriately in ntfs_read_locked_inode(). - Implement a new inode type "index" to allow efficient access to the indices found in various system files and adapt inode handling accordingly (fs/ntfs/inode.[hc]). An index inode is essentially an attribute inode (NInoAttr() is true) with an attribute type of AT_INDEX_ALLOCATION. As such, it is no longer allowed to call ntfs_attr_iget() with an attribute type of AT_INDEX_ALLOCATION as there would be no way to distinguish between normal attribute inodes and index inodes. The function to obtain an index inode is ntfs_index_iget() and it uses the helper function ntfs_read_locked_index_inode(). Note, we do not overload ntfs_attr_iget() as indices consist of multiple attributes so using ntfs_attr_iget() to obtain an index inode would be confusing. - Ensure that there is no overflow when doing page->index << PAGE_CACHE_SHIFT by casting page->index to s64 in fs/ntfs/aops.c. - Use atomic kmap instead of kmap() in fs/ntfs/aops.c::ntfs_read_page() and ntfs_read_block(). - Use case sensitive attribute lookups instead of case insensitive ones. - Lock all page cache pages belonging to mst protected attributes while accessing them to ensure we never see corrupt data while the page is under writeout. - Add framework for generic ntfs collation (fs/ntfs/collation.[hc]). We have ntfs_is_collation_rule_supported() to check if the collation rule you want to use is supported and ntfs_collation() which actually collates two data items. We currently only support COLLATION_BINARY and COLLATION_NTOFS_ULONG but support for other collation rules will be added as the need arises. - Add a new type, ntfs_index_context, to allow retrieval of an index entry using the corresponding index key. To get an index context, use ntfs_index_ctx_get() and to release it, use ntfs_index_ctx_put(). This also adds a new slab cache for the index contexts. To lookup a key in an index inode, use ntfs_index_lookup(). After modifying an index entry, call ntfs_index_entry_flush_dcache_page() followed by ntfs_index_entry_mark_dirty() to ensure the changes are written out to disk. For details see fs/ntfs/index.[hc]. Note, at present, if an index entry is in the index allocation attribute rather than the index root attribute it will not be written out (you will get a warning message about discarded changes instead). - Load the quota file ($Quota) and check if quota tracking is enabled and if so, mark the quotas out of date. This causes windows to rescan the volume on boot and update all quota entries. - Add a set_page_dirty address space operation for ntfs_m[fs]t_aops. It is simply set to __set_page_dirty_nobuffers() to make sure that running set_page_dirty() on a page containing mft/ntfs records will not affect the dirty state of the page buffers. - Add fs/ntfs/index.c::__ntfs_index_entry_mark_dirty() which sets all buffers that are inside the ntfs record in the page dirty after which it sets the page dirty. This allows ->writepage to only write the dirty index records rather than having to write all the records in the page. Modify fs/ntfs/index.h::ntfs_index_entry_mark_dirty() to use this rather than __set_page_dirty_nobuffers(). - Implement fs/ntfs/aops.c::ntfs_write_mst_block() which enables the writing of page cache pages belonging to mst protected attributes like the index allocation attribute in directory indices and other indices like $Quota/$Q, etc. This means that the quota is now marked out of date on all volumes rather than only on ones where the quota defaults entry is in the index root attribute of the $Quota/$Q index.2.1.14 - Fix an NFSd caused deadlock reported by several users. - Modify fs/ntfs/ntfs_readdir() to copy the index root attribute value to a buffer so that we can put the search context and unmap the mft record before calling the filldir() callback. We need to do this because of NFSd which calls ->lookup() from its filldir callback() and this causes NTFS to deadlock as ntfs_lookup() maps the mft record of the directory and since ntfs_readdir() has got it mapped already ntfs_lookup() deadlocks.2.1.13 - Enable overwriting of resident files and housekeeping of system files. - Implement writing of mft records (fs/ntfs/mft.[hc]), which includes keeping the mft mirror in sync with the mft when mirrored mft records are written. The functions are write_mft_record{,_nolock}(). The implementation is quite rudimentary for now with lots of things not implemented yet but I am not sure any of them can actually occur so I will wait for people to hit each one and only then implement it. - Commit open system inodes at umount time. This should make it virtually impossible for sync_mft_mirror_umount() to ever be needed. - Implement ->write_inode (fs/ntfs/inode.c::ntfs_write_inode()) for the ntfs super operations. This gives us inode writing via the VFS inode dirty code paths. Note: Access time updates are not implemented yet. - Implement fs/ntfs/mft.[hc]::{,__}mark_mft_record_dirty() and make fs/ntfs/aops.c::ntfs_writepage() and ntfs_commit_write() use it, thus finally enabling resident file overwrite! (-8 This also includes a placeholder for ->writepage (ntfs_mft_writepage()), which for now just redirties the page and returns. Also, at umount time, we for now throw away all mft data page cache pages after the last call to ntfs_commit_inode() in the hope that all inodes will have been written out by then and hence no dirty (meta)data will be lost. We also check for this case and emit an error message telling the user to run chkdsk. - Use set_page_writeback() and end_page_writeback() in the resident attribute code path of fs/ntfs/aops.c::ntfs_writepage() otherwise the radix-tree tag PAGECACHE_TAG_DIRTY remains set even though the page is clean. - Implement ntfs_mft_writepage() so it now checks if any of the mft records in the page are dirty and if so redirties the page and
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?