--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 30, 2006 at 02:31:43PM -0400, Mike Jakubik wrote:
> Kostik Belousov wrote:
> >Second, I am really curious what you do. My understanding follows: you
> >have set up vnode-backed md device (md0a) on sparce file, created ufs2
> >on it, mounted it with quotas, and run background fsck on that fs. At
> >the same time, you did rm for the snapshot file created by fsck. Right ?
> > =20

>=20
> This is the procedure i followed, while i have quota enabled, it was not=

=20
> set on the test filesystem.
>=20
> 1) dd if=3D/dev/zero of=3D/usr/bigfile bs=3D1024 seek=3D209715200 count=

=3D0
> 2) mdconfig -a -t vnode -f /usr/bigfile
> 3) bsdlabel -w md0 auto
> 4) newfs -U md0a
> 5) fsck -v /dev/md0a # ^C this after a second or so, this makes the FS di=

rty
> 6) mount /dev/md0a /mnt
> 7) fsck -v -B /dev/md0a
>=20
> in another window:
> 8) while true; do ls -al /mnt/.snap;sleep 1;done

Thanks for description.
>=20
> FYI, -CURRENT passes this test without locking up, so the fix is already=

=20
> there somewhere.


May be. May be not, and other issues just prevent complete exhausting
of the buffer run space on CURRENT. Did you test it on CURRENT
many times, or only once. The same question for STABLE - does it
locks every time your do that ?

Please, try this patch, and report the results.

? sys/dev/md/.arch-ids
Index: sys/dev/md/md.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D
RCS file: /usr/local/arch/ncvs/src/sys/dev/md/md.c,v
retrieving revision 1.164
diff -u -r1.164 md.c
--- sys/dev/md/md.c 28 Mar 2006 21:25:11 -0000 1.164
+++ sys/dev/md/md.c 1 Jul 2006 03:48:41 -0000
@@ -650,6 +650,8 @@
mtx_lock_spin(&sched_lock);
sched_prio(curthread, PRIBIO);
mtx_unlock_spin(&sched_lock);
+ if (sc->type =3D=3D MD_VNODE)
+ curthread->td_pflags |=3D TDP_NORUNNINGBUF;
=20
for (; {
mtx_lock(&sc->queue_mtx);

--vkogqOf2sHV7VnPd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)

iD8DBQFEpfDCC3+MBN1Mb4gRAs8/AKDd/PLJzPcT4/X+rJyW2wwOGmTKSACffhix
8rQyFB+fcMHKwEntmUgeYCU=
=X2WK
-----END PGP SIGNATURE-----

--vkogqOf2sHV7VnPd--