Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 16:59:34 -0800 (PST)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ufs/ffs ffs_snapshot.c
Message-ID:  <200302220059.h1M0xYEr074756@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
mckusick    2003/02/21 16:59:34 PST

  Modified files:
    sys/ufs/ffs          ffs_snapshot.c 
  Log:
  This patch fixes a deadlock between the bufdaemon and a process taking
  a snapshot. As part of taking a snapshot of a filesystem, the kernel
  builds up a list of the filesystem metadata (such as the cylinder
  group bitmaps) that are contained in the snapshot. When doing a
  copy-on-write check, the list is first consulted. If the block being
  written is found on the list, then the full snapshot lookup can be
  avoided. Besides providing an important performance speedup this
  check also avoids a potential deadlock between the code creating
  the snapshot and the bufdaemon trying to cleanup snapshot related
  buffers. This fix creates a temporary list containing the key
  metadata blocks that can cause the deadlock. This temporary list
  is used between the time that the snapshot is first enabled and the
  time that the fully complete list is built.
  
  Reported by:    Attila Nagy <bra@fsn.hu>
  Sponsored by:   DARPA & NAI Labs.
  
  Revision  Changes    Path
  1.62      +43 -7     src/sys/ufs/ffs/ffs_snapshot.c

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




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