Date: Thu, 11 Nov 2010 11:54:01 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/ufs/ffs ffs_softdep.c Message-ID: <201011111154.oABBsHq4029931@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2010-11-11 11:54:01 UTC FreeBSD src repository Modified files: sys/ufs/ffs ffs_softdep.c Log: SVN rev 215117 on 2010-11-11 11:54:01Z by kib The softdep_setup_freeblocks() adds worklist items before deallocate_dependencies() is done. This opens a race between softdep thread and the thread that does the truncation: A write of the indirect block causes the freeblks to become ALLCOMPLETE while softdep_setup_freeblocks() dropped softdep lock. And then, softdep_disk_write_complete() would reassign the workitem to the mount point worklist, causing premature processing of the workitem, or journal write exhaust the fb_jfreeblkhd and handle_written_jfreeblk does the same reassign. indir_trunc() then would find the indirect block that is locked (with lock owned by kernel) but without any dependencies, causing it to hang in getblk() waiting for buffer lock. Do not mark freeblks as DEPCOMPLETE until deallocate_dependencies() finished. Analyzed, suggested and reviewed by: jeff Tested by: pho Revision Changes Path 1.256 +5 -2 src/sys/ufs/ffs/ffs_softdep.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011111154.oABBsHq4029931>