Commit bc3b55c7 authored by Anton Altaparmakov's avatar Anton Altaparmakov

Merge ssh://linux-ntfs@bkbits.net/ntfs-2.6-devel

into cantab.net:/home/src/ntfs-2.6-devel
parents 8846ce52 bcd357a2
...@@ -65,6 +65,11 @@ ToDo/Notes: ...@@ -65,6 +65,11 @@ ToDo/Notes:
page itself. page itself.
- Update fs/ntfs/mft.c::write_mft_record_nolock() and sync_mft_mirror() - 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. to cope with the fact that there now are dirty buffers in mft pages.
- Update fs/ntfs/inode.c::ntfs_write_inode() to also use the helper
mark_ntfs_record_dirty() and thus to set the buffers belonging to the
mft record dirty as well as the page itself.
- Fix compiler warnings on x86-64 in fs/ntfs/dir.c. (Randy Dunlap,
slightly modified by me)
2.1.20 - Fix two stupid bugs introduced in 2.1.18 release. 2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
......
...@@ -1278,7 +1278,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1278,7 +1278,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
ntfs_debug("Reading bitmap with page index 0x%llx, bit ofs 0x%llx", ntfs_debug("Reading bitmap with page index 0x%llx, bit ofs 0x%llx",
(unsigned long long)bmp_pos >> (3 + PAGE_CACHE_SHIFT), (unsigned long long)bmp_pos >> (3 + PAGE_CACHE_SHIFT),
(unsigned long long)bmp_pos & (unsigned long long)bmp_pos &
((PAGE_CACHE_SIZE * 8) - 1)); (unsigned long long)((PAGE_CACHE_SIZE * 8) - 1));
bmp_page = ntfs_map_page(bmp_mapping, bmp_page = ntfs_map_page(bmp_mapping,
bmp_pos >> (3 + PAGE_CACHE_SHIFT)); bmp_pos >> (3 + PAGE_CACHE_SHIFT));
if (IS_ERR(bmp_page)) { if (IS_ERR(bmp_page)) {
...@@ -1392,8 +1392,8 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1392,8 +1392,8 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
*/ */
for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) { for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
ntfs_debug("In index allocation, offset 0x%llx.", ntfs_debug("In index allocation, offset 0x%llx.",
(unsigned long long)ia_start + ((u8*)ie - (unsigned long long)ia_start +
(u8*)ia)); (unsigned long long)((u8*)ie - (u8*)ia));
/* Bounds checks. */ /* Bounds checks. */
if (unlikely((u8*)ie < (u8*)ia || (u8*)ie + if (unlikely((u8*)ie < (u8*)ia || (u8*)ie +
sizeof(INDEX_ENTRY_HEADER) > index_end || sizeof(INDEX_ENTRY_HEADER) > index_end ||
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <linux/quotaops.h> #include <linux/quotaops.h>
#include <linux/mount.h> #include <linux/mount.h>
#include "ntfs.h" #include "aops.h"
#include "dir.h" #include "dir.h"
#include "debug.h" #include "debug.h"
#include "inode.h" #include "inode.h"
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "malloc.h" #include "malloc.h"
#include "mft.h" #include "mft.h"
#include "time.h" #include "time.h"
#include "ntfs.h"
/** /**
* ntfs_test_inode - compare two (possibly fake) inodes for equality * ntfs_test_inode - compare two (possibly fake) inodes for equality
...@@ -2271,7 +2272,7 @@ int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt) ...@@ -2271,7 +2272,7 @@ int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt)
* ntfs_truncate - called when the i_size of an ntfs inode is changed * ntfs_truncate - called when the i_size of an ntfs inode is changed
* @vi: inode for which the i_size was changed * @vi: inode for which the i_size was changed
* *
* We don't support i_size changes yet. * We do not support i_size changes yet.
* *
* The kernel guarantees that @vi is a regular file (S_ISREG() is true) and * The kernel guarantees that @vi is a regular file (S_ISREG() is true) and
* that the change is allowed. * that the change is allowed.
...@@ -2505,9 +2506,16 @@ int ntfs_write_inode(struct inode *vi, int sync) ...@@ -2505,9 +2506,16 @@ int ntfs_write_inode(struct inode *vi, int sync)
* dirty, since we are going to write this mft record below in any case * dirty, since we are going to write this mft record below in any case
* and the base mft record may actually not have been modified so it * and the base mft record may actually not have been modified so it
* might not need to be written out. * might not need to be written out.
* NOTE: It is not a problem when the inode for $MFT itself is being
* written out as mark_ntfs_record_dirty() will only set I_DIRTY_PAGES
* on the $MFT inode and hence ntfs_write_inode() will not be
* re-invoked because of it which in turn is ok since the dirtied mft
* record will be cleaned and written out to disk below, i.e. before
* this function returns.
*/ */
if (modified && !NInoTestSetDirty(ctx->ntfs_ino)) if (modified && !NInoTestSetDirty(ctx->ntfs_ino))
__set_page_dirty_nobuffers(ctx->ntfs_ino->page); mark_ntfs_record_dirty(ctx->ntfs_ino, ctx->ntfs_ino->page,
ctx->ntfs_ino->page_ofs);
ntfs_attr_put_search_ctx(ctx); ntfs_attr_put_search_ctx(ctx);
/* Now the access times are updated, write the base mft record. */ /* Now the access times are updated, write the base mft record. */
if (NInoDirty(ni)) if (NInoDirty(ni))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment