From owner-cvs-sys Sun Jun 21 14:08:05 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA29690 for cvs-sys-outgoing; Sun, 21 Jun 1998 14:08:05 -0700 (PDT) (envelope-from owner-cvs-sys) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA29594; Sun, 21 Jun 1998 14:07:39 -0700 (PDT) (envelope-from bde@FreeBSD.org) From: Bruce Evans Received: (from bde@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id OAA26914; Sun, 21 Jun 1998 14:06:04 -0700 (PDT) Date: Sun, 21 Jun 1998 14:06:04 -0700 (PDT) Message-Id: <199806212106.OAA26914@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/gnu/ext2fs ext2_linux_ialloc.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 1998/06/21 14:06:04 PDT Modified files: sys/gnu/ext2fs ext2_linux_ialloc.c Log: Fixed (?) races in mark_buffer_dirty(). We abuse the buffer cache by hacking on locked buffers without getblk()ing them, and we didn't even use splbio() to prevent biodone() changing the buffer underneath use when a write completes. I think there was no problem in practice on i386's because the operations on b_flags and numdirtybufs happen to be atomic. We still depend on biodone()'s operations on b_flags not interfering with ours. I think there is only interference for B_ERROR, and this is harmless because errors for async writes are ignored anyway. Don't use mark_buffer_dirty() except for superblock-related metadata. It was used in just one case where ordinary BSD buffering is more natural. Revision Changes Path 1.10 +6 -3 src/sys/gnu/ext2fs/ext2_linux_ialloc.c