cvs commit: src/sys/geom geom_vfs.c src/sys/kern vfs_bio.c src/sys/sys buf.h bufobj.h src/sys/ufs/ffs ffs_extern.h ffs_snapshot.c ffs_vfsops.c src/sys/gnu/fs/xfs/FreeBSD xfs_mountops.c src/sys/nfs4client nfs4_vnops.c src/sys/nfsclient ...

Konstantin Belousov kib at
Tue Jan 23 10:01:19 UTC 2007

kib         2007-01-23 10:01:19 UTC

  FreeBSD src repository

  Modified files:
    sys/geom             geom_vfs.c 
    sys/kern             vfs_bio.c 
    sys/sys              bufobj.h buf.h 
    sys/ufs/ffs          ffs_extern.h ffs_snapshot.c ffs_vfsops.c 
    sys/gnu/fs/xfs/FreeBSD xfs_mountops.c 
    sys/nfs4client       nfs4_vnops.c 
    sys/nfsclient        nfs_vnops.c 
  Cylinder group bitmaps and blocks containing inode for a snapshot
  file are after snaplock, while other ffs device buffers are before
  snaplock in global lock order. By itself, this could cause deadlock
  when bdwrite() tries to flush dirty buffers on snapshotted ffs. If,
  during the flush, COW activity for snapshot needs to allocate block
  and ffs_alloccg() selects the cylinder group that is being written
  by bdwrite(), then kernel would panic due to recursive buffer lock
  Avoid dealing with buffers in bdwrite() that are from other side of
  snaplock divisor in the lock order then the buffer being written. Add
  new BOP, bop_bdwrite(), to do dirty buffer flushing for same vnode in
  the bdwrite(). Default implementation, bufbdflush(), refactors the code
  from bdwrite(). For ffs device buffers, specialized implementation is
  Reviewed by:    tegge, jeff, Russell Cattelan (cattelan xfs org, xfs changes)
  Tested by:      Peter Holm
  X-MFC after:    3 weeks (if ever: it changes ABI)
  Revision  Changes    Path
  1.11      +1 -0      src/sys/geom/geom_vfs.c
  1.7       +8 -1      src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
  1.516     +51 -42    src/sys/kern/vfs_bio.c
  1.35      +1 -0      src/sys/nfs4client/nfs4_vnops.c
  1.272     +1 -0      src/sys/nfsclient/nfs_vnops.c
  1.195     +4 -0      src/sys/sys/buf.h
  1.18      +4 -0      src/sys/sys/bufobj.h
  1.73      +1 -0      src/sys/ufs/ffs/ffs_extern.h
  1.133     +114 -0    src/sys/ufs/ffs/ffs_snapshot.c
  1.324     +5 -0      src/sys/ufs/ffs/ffs_vfsops.c

More information about the cvs-src mailing list