Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 1999 18:39:58 -0700 (PDT)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern vfs_bio.c
Message-ID:  <199906220139.SAA39500@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
mckusick    1999/06/21 18:39:57 PDT

  Modified files:
    sys/kern             vfs_bio.c 
  Log:
  When allocating new buffers in getnewbuf, there are several points
  at which we may sleep. So, after completing our buffer allocation
  we must ensure that another process has not come along and allocated
  a different buffer with the same identity. We do this by keeping a
  global counter of the number of buffers that getnewbuf has allocated.
  We save this count when we enter getnewbuf and check it when we are
  about to return. If it has changed, then other buffers were allocated
  while we were in getnewbuf, so we must return NULL to let our parent
  know that it must recheck to see if it still needs the new buffer.
  Hopefully this fix will eliminate the creation of duplicate buffers
  with the same identity and the obscure corruptions that they cause.
  
  Revision  Changes    Path
  1.215     +40 -11    src/sys/kern/vfs_bio.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906220139.SAA39500>