Subject: Re: NTFS 5 (Windows 2000) status?
To: Dave Huang <khym@azeotrope.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: current-users
Date: 04/24/2001 11:01:28
As far as I can tell, the current driver reads NTFS 3.0 filesystems (I
need a patch), for 3.1 (winxp) they seem to have changed stuff again.
There was some talk on the linux list about data corruption with 3.0
file systems, so I think they only support ro-mode.

Without this patch it only reads the first 512 bytes of each 4M block,
but I have no idea if this change is correct.

/Johan

+++ ntfs_subr.c	2001/04/24 08:58:06
@@ -1527,14 +1527,8 @@
 		off = ntfs_btocnoff(off);
 
 		while (left && ccl) {
-#if defined(__FreeBSD__)
 			tocopy = min(left,
 				  min(ntfs_cntob(ccl) - off, MAXBSIZE - off));
-#else
-			/* under NetBSD, bread() can read
-			 * maximum one block worth of data */
-			tocopy = min(left, ntmp->ntm_bps - off);
-#endif
 			cl = ntfs_btocl(tocopy + off);
 			ddprintf(("ntfs_writentvattr_plain: write: " \
 				"cn: 0x%x cl: %d, off: %d len: %d, left: %d\n",
@@ -1631,16 +1625,9 @@
 				off = ntfs_btocnoff(off);
 
 				while (left && ccl) {
-#if defined(__FreeBSD__)
 					tocopy = min(left,
 						  min(ntfs_cntob(ccl) - off,
 						      MAXBSIZE - off));
-#else
-					/* under NetBSD, bread() can read
-					 * maximum one block worth of data */
-					tocopy = min(left,
-						ntmp->ntm_bps - off);
-#endif
 					cl = ntfs_btocl(tocopy + off);
 					ddprintf(("ntfs_readntvattr_plain: " \
 						"read: cn: 0x%x cl: %d, " \