Subject: Re: NTFS5
To: Johan Danielsson <joda@pdc.kth.se>
From: Jaromír <jdolecek@netbsd.org>
List: current-users
Date: 06/20/2001 00:19:52
Johan Danielsson wrote:
> Brook Milligan <brook@biology.nmsu.edu> writes:
> 
> > Is there any progress on getting NTFS5 supported by NetBSD?  I am
> > having the same problem mentioned in PR kern/10119 when I try to mount
> > a windows 2000 filesystem.
> 
> See if this patch helps. Please note that there has been reports of
> filesystem corruption with NTFS 3.0 and linux, so be careful.

I've applied this patch, since it does seem to work now. I did not
observed any differences, but I did not do any big measures. The fs
_feels_ faster now, but might be quite misleading (last time I really
played with ntfs heavily was with old, slower disk).

I've also found and eliminated one locking problem in ntfs, which
could make things working for you, Brook.

You'd need following revisions:
syssrc/sys/ntfs/ntfs_vfsops.c	rev. 1.36
syssrc/sys/ntfs/ntfs_subr.c	rev. 1.29

Please let me know if this made things working for you.

Jaromir

> /Johan
> 
> --- ntfs_subr.c	2001/05/15 22:38:40	1.28
> +++ ntfs_subr.c	2001/05/25 08:48:17
> @@ -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, " \
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!