Subject: Re: kern/37034: Processes stuck on vnlock: accessing msdos fs mounted from img (vnconfig)
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Antti Kantee <pooka@cs.hut.fi>
List: netbsd-bugs
Date: 09/28/2007 20:00:11
The following reply was made to PR kern/37034; it has been noted by GNATS.
From: Antti Kantee <pooka@cs.hut.fi>
To: gnats-bugs@NetBSD.org
Cc: netbsd@eq.cz
Subject: Re: kern/37034: Processes stuck on vnlock: accessing msdos fs mounted from img (vnconfig)
Date: Fri, 28 Sep 2007 22:56:22 +0300
On Fri Sep 28 2007 at 16:20:02 +0000, rudolf wrote:
> :-) Are you a magician?
No, I just sacrifice a lot of chickens. A good way is to stuff truffle
shavings under the skin and rub the chicken liberally with butter. Then
truss it. Roast until golden brown & fully cooked (but not overdone!).
> I can see no more problems with this patch. Thanks.
Nice. Does this mean it fully works now, i.e. you can access the files?
Could you please test this patch (which I committed to -current). I made
two more changes and I'd like to be sure it works before issuing a pullup
request to netbsd-4.
Index: msdosfs_denode.c
===================================================================
RCS file: /cvsroot/src/sys/fs/msdosfs/msdosfs_denode.c,v
retrieving revision 1.17
diff -p -u -r1.17 msdosfs_denode.c
--- msdosfs_denode.c 25 Nov 2006 12:17:30 -0000 1.17
+++ msdosfs_denode.c 28 Sep 2007 19:50:20 -0000
@@ -291,6 +291,7 @@ deget(pmp, dirclust, diroffset, depp)
* need to it.
*/
vn_lock(nvp, LK_EXCLUSIVE | LK_RETRY);
+ genfs_node_init(nvp, &msdosfs_genfsops);
msdosfs_hashins(ldep);
ldep->de_pmp = pmp;
@@ -335,8 +336,12 @@ deget(pmp, dirclust, diroffset, depp)
/* leave the other fields as garbage */
} else {
error = readep(pmp, dirclust, diroffset, &bp, &direntptr);
- if (error)
+ if (error) {
+ ldep->de_devvp = NULL;
+ ldep->de_Name[0] = SLOT_DELETED;
+ vput(nvp);
return (error);
+ }
DE_INTERNALIZE(ldep, direntptr);
brelse(bp);
}
@@ -365,7 +370,6 @@ deget(pmp, dirclust, diroffset, depp)
}
} else
nvp->v_type = VREG;
- genfs_node_init(nvp, &msdosfs_genfsops);
VREF(ldep->de_devvp);
*depp = ldep;
nvp->v_size = ldep->de_FileSize;
--
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"