]> git.hungrycats.org Git - linux/commitdiff
NTFS: - Modify fs/ntfs/mft.c::__mark_mft_record_dirty() to use the helper
authorAnton Altaparmakov <aia21@cantab.net>
Thu, 7 Oct 2004 12:28:53 +0000 (13:28 +0100)
committerRichard Russon <ntfs@flatcap.org>
Thu, 7 Oct 2004 12:28:53 +0000 (13:28 +0100)
        mark_ntfs_record_dirty() which also changes the behaviour in that we
        now set the buffers belonging to the mft record dirty as well as the
        page itself.
      - Update fs/ntfs/mft.c::write_mft_record_nolock() and sync_mft_mirror()
        to cope with the fact that there now are dirty buffers in mft pages.

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

index 18a423149b0ffdf4ba716692ef3b28b30b883f83..3722d0802626e799cde6661d4d3cbf4eedb47b26 100644 (file)
@@ -59,6 +59,12 @@ ToDo/Notes:
        - Move the typedefs for runlist_element and runlist from types.h to
          runlist.h and fix resulting include errors.
        - Remove unused {__,}format_mft_record() from fs/ntfs/mft.c.
+       - Modify fs/ntfs/mft.c::__mark_mft_record_dirty() to use the helper
+         mark_ntfs_record_dirty() which also changes the behaviour in that we
+         now set the buffers belonging to the mft record dirty as well as the
+         page itself.
+       - Update fs/ntfs/mft.c::write_mft_record_nolock() and sync_mft_mirror()
+         to cope with the fact that there now are dirty buffers in mft pages.
 
 2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
 
index 1bacb34022f6b10f77068a7ff0e70536353ee81d..c74ae7d72c3faca764e82993faf90f8f6a16db07 100644 (file)
@@ -407,19 +407,11 @@ unm_err_out:
  */
 void __mark_mft_record_dirty(ntfs_inode *ni)
 {
-       struct page *page = ni->page;
        ntfs_inode *base_ni;
 
        ntfs_debug("Entering for inode 0x%lx.", ni->mft_no);
-       BUG_ON(!page);
        BUG_ON(NInoAttr(ni));
-
-       /*
-        * Set the page containing the mft record dirty.  This also marks the
-        * $MFT inode dirty (I_DIRTY_PAGES).
-        */
-       __set_page_dirty_nobuffers(page);
-
+       mark_ntfs_record_dirty(ni, ni->page, ni->page_ofs);
        /* Determine the base vfs inode and mark it dirty, too. */
        down(&ni->extent_lock);
        if (likely(ni->nr_extents >= 0))
@@ -541,20 +533,9 @@ no_buffers_err_out:
        m_end = m_start + vol->mft_record_size;
        do {
                block_end = block_start + blocksize;
-               /*
-                * If the buffer is outside the mft record, just skip it,
-                * clearing it if it is dirty to make sure it is not written
-                * out.  It should never be marked dirty but better be safe.
-                */
-               if ((block_end <= m_start) || (block_start >= m_end)) {
-                       if (buffer_dirty(bh)) {
-                               ntfs_warning(vol->sb, "Clearing dirty mft "
-                                               "record page buffer.  %s",
-                                               ntfs_please_email);
-                               clear_buffer_dirty(bh);
-                       }
+               /* If the buffer is outside the mft record, skip it. */
+               if ((block_end <= m_start) || (block_start >= m_end))
                        continue;
-               }
                if (!buffer_mapped(bh)) {
                        ntfs_error(vol->sb, "Writing mft mirror records "
                                        "without existing mapped buffers is "
@@ -706,20 +687,9 @@ no_buffers_err_out:
        m_end = m_start + vol->mft_record_size;
        do {
                block_end = block_start + blocksize;
-               /*
-                * If the buffer is outside the mft record, just skip it,
-                * clearing it if it is dirty to make sure it is not written
-                * out.  It should never be marked dirty but better be safe.
-                */
-               if ((block_end <= m_start) || (block_start >= m_end)) {
-                       if (buffer_dirty(bh)) {
-                               ntfs_warning(vol->sb, "Clearing dirty mft "
-                                               "record page buffer.  %s",
-                                               ntfs_please_email);
-                               clear_buffer_dirty(bh);
-                       }
+               /* If the buffer is outside the mft record, skip it. */
+               if ((block_end <= m_start) || (block_start >= m_end))
                        continue;
-               }
                if (!buffer_mapped(bh)) {
                        ntfs_error(vol->sb, "Writing mft records without "
                                        "existing mapped buffers is not "