NTFS problems in 2.2.0-pre4

Werner Seiler (wseiler@eunet.at)
Mon, 04 Jan 1999 19:54:01 +0100


Martin, Stanislav,

> Problem #2: It does not mount the same filesystems that
> the previous version does
>
> I have two NTFS partitions on my disks - the bigger (1.2 GB)
> one is on hda7 logical partition and the smaller (500 MB)
> on the hdc3. I am able to mount the smaller one, but the
> bigger one says "kmalloc: Size (503808) too large" to
> the kernel log and refuses to mount.

I had a similar problem with one NTFS partition.
The following patch solved it for me:

--- fs/ntfs/ntfsendian.h~ Sun Jan 3 17:38:03 1999
+++ fs/ntfs/ntfsendian.h Sun Jan 3 20:22:20 1999
@@ -71,7 +71,7 @@
#define NTFS_PUTU64(p,v) ((*(ntfs_u64*)(p))=CPU_TO_LE64(v))

/* Macros reading signed integers */
-#define NTFS_GETS8(p) ((*(ntfs_u8*)(p)))
+#define NTFS_GETS8(p) ((*(ntfs_s8*)(p)))
#define NTFS_GETS16(p) ((ntfs_s16)LE16_TO_CPU(*(short*)(p)))
#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ?
(int)NTFS_GETU24(p) : (int)(NTFS_GETU24(p) - 0x1000000))
#define NTFS_GETS32(p) ((ntfs_s32)LE32_TO_CPU(*(int*)(p)))

In super.c:ntfs_init_volume() it reads mft_clusters_per_record from
offset 0x40. It contained 0xF6. And instead of interpreting it as -10
(there is some special code later on) it took it as +246.

Best regards,

Werner

-- 
----------------------------------------------------------------------
Werner M. Seiler                                       wseiler@eunet.at

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/