Date: Sat, 1 Jul 2006 06:49:22 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Mike Jakubik <mikej@rogers.com> Cc: freebsd-fs@freebsd.org Subject: Re: md deadlocks on wdrain. Was: [Re: quota and snapshots in 6.1-RELEASE] Message-ID: <20060701034922.GA37822@deviant.kiev.zoral.com.ua> In-Reply-To: <44A56E0F.1070904@rogers.com> References: <447366AD.30203@rogers.com> <44736E11.6060104@mkproductions.org> <20060523203521.GA48061@xor.obsecurity.org> <20060524062118.GA766@dimma.mow.oilspace.com> <447400BB.9060603@samsco.org> <4485C010.9040402@rogers.com> <20060606182234.GB72368@deviant.kiev.zoral.com.ua> <44A490E6.1000502@rogers.com> <20060630092829.GE1258@deviant.kiev.zoral.com.ua> <44A56E0F.1070904@rogers.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060701034922.GA37822>