]> git.pld-linux.org Git - packages/kernel.git/blob - 2.6.6-NTFS-2.1.9-lkml.patch
- obsolete
[packages/kernel.git] / 2.6.6-NTFS-2.1.9-lkml.patch
1  This will update the following files:
2  
3  Documentation/filesystems/ntfs.txt |    2 ++
4  fs/ntfs/ChangeLog                  |   14 +++++++++++++-
5  fs/ntfs/Makefile                   |    2 +-
6  fs/ntfs/compress.c                 |   29 ++++++++++++++++++++++-------
7  4 files changed, 38 insertions(+), 9 deletions(-)
8  
9  through these ChangeSets:
10  
11  <aia21@cantab.net> (04/05/10 1.1611)
12    NTFS: 2.1.9 release - Fix two bugs in the decompression engine
13          in handling of corner cases.
14  
15  
16 diff -Nru a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
17 --- a/Documentation/filesystems/ntfs.txt        Mon May 10 10:09:16 2004
18 +++ b/Documentation/filesystems/ntfs.txt        Mon May 10 10:09:16 2004
19 @@ -273,6 +273,8 @@
20
21  Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
22
23 +2.1.9:
24 +       - Fix two bugs in handling of corner cases in the decompression engine.
25  2.1.8:
26         - Read the $MFT mirror and compare it to the $MFT and if the two do not
27           match, force a read-only mount and do not allow read-write remounts.
28 diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
29 --- a/fs/ntfs/ChangeLog Mon May 10 10:09:16 2004
30 +++ b/fs/ntfs/ChangeLog Mon May 10 10:09:16 2004
31 @@ -19,7 +19,19 @@
32           sufficient for synchronisation here. We then just need to make sure
33           ntfs_readpage/writepage/truncate interoperate properly with us.
34
35 -2.1.8 - Handle $MFT mirror and $LogFile, improve time ihandling, and cleanups.
36 +2.1.9 - Fix two bugs in decompression engine.
37 +
38 +       - Fix a bug where we would not always detect that we have reached the
39 +         end of a compression block because we were ending at minus one byte
40 +         which is effectively the same as being at the end.  The fix is to
41 +         check whether the uncompressed buffer has been fully filled and if so
42 +         we assume we have reached the end of the compression block.  A big
43 +         thank you to Marcin GibuĊ‚a for the bug report, the assistance in
44 +         tracking down the bug and testing the fix.
45 +       - Fix a possible bug where when a compressed read is truncated to the
46 +         end of the file, the offset inside the last page was not truncated.
47 +
48 +2.1.8 - Handle $MFT mirror and $LogFile, improve time handling, and cleanups.
49
50         - Use get_bh() instead of manual atomic_inc() in fs/ntfs/compress.c.
51         - Modify fs/ntfs/time.c::ntfs2utc(), get_current_ntfs_time(), and
52 diff -Nru a/fs/ntfs/Makefile b/fs/ntfs/Makefile
53 --- a/fs/ntfs/Makefile  Mon May 10 10:09:16 2004
54 +++ b/fs/ntfs/Makefile  Mon May 10 10:09:16 2004
55 @@ -5,7 +5,7 @@
56  ntfs-objs := aops.o attrib.o compress.o debug.o dir.o file.o inode.o logfile.o \
57              mft.o mst.o namei.o super.o sysctl.o unistr.o upcase.o
58
59 -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.8\"
60 +EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.9\"
61
62  ifeq ($(CONFIG_NTFS_DEBUG),y)
63  EXTRA_CFLAGS += -DDEBUG
64 diff -Nru a/fs/ntfs/compress.c b/fs/ntfs/compress.c
65 --- a/fs/ntfs/compress.c        Mon May 10 10:09:16 2004
66 +++ b/fs/ntfs/compress.c        Mon May 10 10:09:16 2004
67 @@ -197,9 +197,15 @@
68  do_next_sb:
69         ntfs_debug("Beginning sub-block at offset = 0x%x in the cb.",
70                         cb - cb_start);
71 -
72 -       /* Have we reached the end of the compression block? */
73 -       if (cb == cb_end || !le16_to_cpup((u16*)cb)) {
74 +       /*
75 +        * Have we reached the end of the compression block or the end of the
76 +        * decompressed data?  The latter can happen for example if the current
77 +        * position in the compression block is one byte before its end so the
78 +        * first two checks do not detect it.
79 +        */
80 +       if (cb == cb_end || !le16_to_cpup((u16*)cb) ||
81 +                       (*dest_index == dest_max_index &&
82 +                       *dest_ofs == dest_max_ofs)) {
83                 int i;
84
85                 ntfs_debug("Completed. Returning success (0).");
86 @@ -501,7 +507,7 @@
87          */
88         unsigned int nr_pages = (end_vcn - start_vcn) <<
89                         vol->cluster_size_bits >> PAGE_CACHE_SHIFT;
90 -       unsigned int xpage, max_page, cur_page, cur_ofs, i;
91 +       unsigned int xpage, max_page, max_ofs, cur_page, cur_ofs, i;
92         unsigned int cb_clusters, cb_max_ofs;
93         int block, max_block, cb_max_page, bhs_size, nr_bhs, err = 0;
94         struct page **pages;
95 @@ -544,8 +550,11 @@
96          */
97         max_page = ((VFS_I(ni)->i_size + PAGE_CACHE_SIZE - 1) >>
98                         PAGE_CACHE_SHIFT) - offset;
99 -       if (nr_pages < max_page)
100 +       max_ofs = (VFS_I(ni)->i_size + PAGE_CACHE_SIZE - 1) & ~PAGE_CACHE_MASK;
101 +       if (nr_pages < max_page) {
102                 max_page = nr_pages;
103 +               max_ofs = 0;
104 +       }
105         for (i = 0; i < max_page; i++, offset++) {
106                 if (i != xpage)
107                         pages[i] = grab_cache_page_nowait(mapping, offset);
108 @@ -713,8 +722,14 @@
109         cb_max_page >>= PAGE_CACHE_SHIFT;
110
111         /* Catch end of file inside a compression block. */
112 -       if (cb_max_page > max_page)
113 -               cb_max_page = max_page;
114 +       if (cb_max_page >= max_page) {
115 +               if (cb_max_page > max_page) {
116 +                       cb_max_page = max_page;
117 +                       cb_max_ofs = max_ofs;
118 +               } else if (cb_max_ofs > max_ofs) {
119 +                       cb_max_ofs = max_ofs;
120 +               }
121 +       }
122
123         if (vcn == start_vcn - cb_clusters) {
124                 /* Sparse cb, zero out page range overlapping the cb. */
125
126 ===================================================================
127
128 This BitKeeper patch contains the following changesets:
129 1.1611
130 ## Wrapped with gzip_uu ##
131
132
133 M'XL( +Y&GT   [U8Z6[;1A#^+3[%-"D"V[&D7=Y4*C>.KQB)$\-V@J(P("S)
134 MI468(@7NRD>C]$??K>_5V:5N6:VO5!(D<G?VF_OCV"_AB^!EJ\929E+C);PO
135 MA&S5(I9+%C9R+G'II"APJ=DM>KPIRJB9RT34S89KX-XQDU$7KG@I6C7:L"8K
136 M\K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in
171 the body of a message to majordomo@vger.kernel.org
172 More majordomo info at  http://vger.kernel.org/majordomo-info.html
173 Please read the FAQ at  http://www.tux.org/lkml/
174
This page took 0.050249 seconds and 3 git commands to generate.