Messages in this thread Patch in this message | | | Date | Tue, 8 Jun 2004 12:44:52 +0100 (BST) | From | Anton Altaparmakov <> | Subject | Re: [2.6.7-BK] NTFS 2.1.13 patch 2/8 |
| |
This is patch 2 in the series. It contains the following ChangeSet:
<aia21@cantab.net> (04/05/28 1.1737) NTFS: Commit open system inodes at umount time. This should make it virtually impossible for sync_mft_mirror_umount() to ever be needed.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Best regards,
Anton -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
===================================================================
diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog --- a/fs/ntfs/ChangeLog 2004-06-08 12:22:07 +01:00 +++ b/fs/ntfs/ChangeLog 2004-06-08 12:22:07 +01:00 @@ -39,6 +39,8 @@ 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.
2.1.12 - Fix the second fix to the decompression engine and some cleanups.
diff -Nru a/fs/ntfs/super.c b/fs/ntfs/super.c --- a/fs/ntfs/super.c 2004-06-08 12:22:07 +01:00 +++ b/fs/ntfs/super.c 2004-06-08 12:22:07 +01:00 @@ -1302,6 +1302,38 @@
ntfs_debug("Entering.");
+#ifdef NTFS_RW + /* + * Commit all inodes while they are still open in case some of them + * cause others to be dirtied. + */ + ntfs_commit_inode(vol->vol_ino); + + /* NTFS 3.0+ specific. */ + if (vol->major_ver >= 3) { + if (vol->secure_ino) + ntfs_commit_inode(vol->secure_ino); + } + + ntfs_commit_inode(vol->root_ino); + + down_write(&vol->lcnbmp_lock); + ntfs_commit_inode(vol->lcnbmp_ino); + up_write(&vol->lcnbmp_lock); + + down_write(&vol->mftbmp_lock); + ntfs_commit_inode(vol->mftbmp_ino); + up_write(&vol->mftbmp_lock); + + if (vol->logfile_ino) + ntfs_commit_inode(vol->logfile_ino); + + if (vol->mftmirr_ino) + ntfs_commit_inode(vol->mftmirr_ino); + + ntfs_commit_inode(vol->mft_ino); +#endif /* NTFS_RW */ + iput(vol->vol_ino); vol->vol_ino = NULL;
@@ -1333,6 +1365,9 @@ }
if (vol->mftmirr_ino) { + /* Re-commit the mft mirror and mft just in case. */ + ntfs_commit_inode(vol->mftmirr_ino); + ntfs_commit_inode(vol->mft_ino); iput(vol->mftmirr_ino); vol->mftmirr_ino = NULL; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |