Date: Wed, 20 Jul 2005 19:06:06 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_aio.c vfs_bio.c src/sys/ufs/ffs ffs_vfsops.c src/sys/vm swap_pager.c Message-ID: <200507201906.j6KJ66HX098224@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
alc 2005-07-20 19:06:06 UTC
FreeBSD src repository
Modified files:
sys/kern vfs_aio.c vfs_bio.c
sys/ufs/ffs ffs_vfsops.c
sys/vm swap_pager.c
Log:
Eliminate inconsistency in the setting of the B_DONE flag. Specifically,
make the b_iodone callback responsible for setting it if it is needed.
Previously, it was set unconditionally by bufdone() without holding
whichever lock is shared by the b_iodone callback and the corresponding
top-half function. Consequently, in a race, the top-half function could
conclude that operation was done before the b_iodone callback finished.
See, for example, aio_physwakeup() and aio_fphysio().
Note: I don't believe that the other, more widely-used b_iodone callbacks
are affected.
Discussed with: jeff
Reviewed by: phk
MFC after: 2 weeks
Revision Changes Path
1.196 +1 -0 src/sys/kern/vfs_aio.c
1.492 +0 -1 src/sys/kern/vfs_bio.c
1.291 +1 -1 src/sys/ufs/ffs/ffs_vfsops.c
1.274 +0 -2 src/sys/vm/swap_pager.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507201906.j6KJ66HX098224>
