--- Begin Message ---
Date: Fri, 1 Jan 2016 13:17:36 +0000
From: Antti Kantee <pooka%iki.fi@localhost>
There's a problem which seems to be a derivative of your work from some
months ago. ext2fs_write() now at least KASSERTs that vp->v_type ==
VREG, but ext2fs_direnter() uses VOP_WRITE() for the dvp, so that
invariant is false.
Are those changes still in your cache? Can you look at it ASAP? I'll
probably dig in later today if not, but since there's a chance you can
fix it with a minute of effort, I guess it's worth a shot.
Well, OOPS. I don't have time to draft or test a fix right now until
Monday or Tuesday, but that's a pretty embarrassing mistake on my
part. I'm not sure how it ever passed any tests!
ufs uses buffercache I/O directly for directory operations, using
VOP_BWRITE, and I must have assumed without checking that ext2fs does
so too. But ext2fs was based on ufs code before softdeps (circa
1997), and ufs wasn't made to use VOP_BWRITE until 1999 when the
softdep code was merged.
There are two obvious resolutions:
1. Fix it by adapting ext2fs_direnter to use buffercache(9) like
ufs_direnter does.
2. Provisionally work around it by putting a conditional in
ext2fs_write for VDIR which dispatches to ext2fs_bufwr like
ext2fs_read does to ext2fs_bufrd.
If you don't have time to do one of these rihgt now, I can take a shot
at it on Monday or Tuesday.
(Happy new year!)
--- End Message ---