]> git.hungrycats.org Git - linux/commit
NTFS: Big cleanup of mft record writing code.
authorAnton Altaparmakov <aia21@cantab.net>
Thu, 14 Oct 2004 18:02:47 +0000 (19:02 +0100)
committerRichard Russon <ntfs@flatcap.org>
Thu, 14 Oct 2004 18:02:47 +0000 (19:02 +0100)
commitd7ca9266c15225cdaa8a34e0938ac622df707111
treea655464ddd4cc5b237bd5d3f0edd92c0a7c931c2
parentf9682e71adfa544928b9d5e95fe9d38ca87f16bb
NTFS: Big cleanup of mft record writing code.

- Clear the page uptodate flag in fs/ntfs/aops.c::ntfs_write_mst_block()
  to ensure noone can see the page whilst the mst fixups are applied.
- Add the helper fs/ntfs/mft.c::ntfs_may_write_mft_record() which
  checks if an mft record may be written out safely obtaining any
  necessary locks in the process.  This is used by
  fs/ntfs/aops.c::ntfs_write_mst_block().
- Modify fs/ntfs/aops.c::ntfs_write_mst_block() to also work for
  writing mft records and improve its error handling in the process.
  Now if any of the records in the page fail to be written out, all
  other records will be written out instead of aborting completely.
- Remove ntfs_mft_aops and update all users to use ntfs_mst_aops.
- Modify fs/ntfs/inode.c::ntfs_read_locked_inode() to set the
  ntfs_mst_aops for all inodes which are NInoMstProtected() and
  ntfs_aops for all other inodes.
- Rename fs/ntfs/mft.c::sync_mft_mirror{,_umount}() to
  ntfs_sync_mft_mirror{,_umount}() and change their parameters so they
  no longer require an ntfs inode to be present.  Update all callers.
- Cleanup the error handling in fs/ntfs/mft.c::ntfs_sync_mft_mirror().
- Clear the page uptodate flag in fs/ntfs/mft.c::ntfs_sync_mft_mirror()
  to ensure noone can see the page whilst the mst fixups are applied.
- Remove the no longer needed fs/ntfs/mft.c::ntfs_mft_writepage() and
  fs/ntfs/mft.c::try_map_mft_record().
- Fix callers of fs/ntfs/aops.c::mark_ntfs_record_dirty() to call it
  with the ntfs inode which contains the page rather than the ntfs
  inode the mft record of which is in the page.

Ooops.  Yes, I know, I should have split this up into smaller changes...

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
fs/ntfs/ChangeLog
fs/ntfs/aops.c
fs/ntfs/inode.c
fs/ntfs/mft.c
fs/ntfs/mft.h
fs/ntfs/ntfs.h
fs/ntfs/super.c