Subject: Re: RFC: MSDOS write performance fixup (upto 6x)
To: None <tech-kern@NetBSD.org>
From: Antti Kantee <pooka@cs.hut.fi>
List: tech-kern
Date: 10/26/2007 13:38:41
On Thu Oct 25 2007 at 22:38:28 +0200, Reinoud Zandijk wrote:
> anyway, please review this patch and look at the attached bonnie output. I
> did check if there were corruptions, but i couldn't find any.
>
> With regards,
> Reinoud
>
> > cvs -q diff -up sys/fs/msdosfs/
> Index: sys/fs/msdosfs/msdosfs_denode.c
> ===================================================================
> RCS file: /cvsroot/src/sys/fs/msdosfs/msdosfs_denode.c,v
> retrieving revision 1.26
> diff -u -p -r1.26 msdosfs_denode.c
> --- sys/fs/msdosfs/msdosfs_denode.c 10 Oct 2007 20:42:23 -0000 1.26
> +++ sys/fs/msdosfs/msdosfs_denode.c 25 Oct 2007 20:33:31 -0000
> @@ -563,7 +563,7 @@ deextend(dep, length, cred)
>
> osize = dep->de_FileSize;
> dep->de_FileSize = length;
> - uvm_vnp_setsize(DETOV(dep), (voff_t)dep->de_FileSize);
> + uvm_vnp_setwritesize(DETOV(dep), (voff_t)dep->de_FileSize);
> dep->de_flag |= DE_UPDATE|DE_MODIFIED;
> uvm_vnp_zerorange(DETOV(dep), (off_t)osize,
> (size_t)(dep->de_FileSize - osize));
Given that the routine's name is deextend(), I doubt this change is
correct and that truncating a file will not work correctly. (but I don't
know msdosfs)
--
Antti Kantee <pooka@iki.fi> Of course he runs NetBSD
http://www.iki.fi/pooka/ http://www.NetBSD.org/
"la qualité la plus indispensable du cuisinier est l'exactitude"