Subject: Re: NTFS5
To: Brook Milligan <brook@biology.nmsu.edu>
From: Jaromír <jdolecek@netbsd.org>
List: current-users
Date: 06/06/2001 10:36:39
Brook Milligan wrote:
> After stock 1.5 wouldn't even mount the NTFS5 partition (created for
> Windows 2000), I tried mounting a NTFS partition using a patched 1.5V
> kernel (see current-users from 25 May 2001, message from
> joda@pdc.kth.se; patch below).  This kernel mounted the partition
> (mount -t ntfs -o rdonly /dev/sd0e /mnt) fine.  However, after several
> `ls' or `ls -R' commands, the system froze completely.

I may be able to look if I can repeat the problem with the patch
sometime next week.
 
> Any ideas on how I can proceed to get this to work correctly?

Do you have ddb compiled in? What does 'ps' show when the system
freezes? The wait channels for the ls could be especially interesting -
there might be some vnode locking problem.

Jaromir
 
> Thanks for your help and guidance.
> 
> Cheers,
> Brook
> 
> ===========================================================================
> To: Brook Milligan <brook@biology.nmsu.edu>
> Cc: current-users@netbsd.org
> Subject: Re: NTFS5
> From: joda@pdc.kth.se (Johan Danielsson)
> Date: 25 May 2001 10:49:55 +0200
> In-Reply-To: Brook Milligan's message of "Thu, 24 May 2001 16:43:26 -0600 (MDT)"
> User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
> Content-Type: text/plain; charset=us-ascii
> 
> 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.
> 
> /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!