NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38039: genfs+ufs inode locking problem

The following reply was made to PR kern/38039; it has been noted by GNATS.

From: Andrew Doran <>
Subject: Re: kern/38039: genfs+ufs inode locking problem
Date: Sat, 16 Feb 2008 15:39:07 +0000

 There are more problems:
 o VOP_READ() needs to do atomic updates of the inode status.
 o It seems that VOP_READ() with IO_SYNC should be called with an exclusive
   vnode lock held, so it's safe to update the itimes and flush the inode to
   disk after the read has completed.
 o ufs_gop_alloc() will be called to fill holes in a file if we are trying
   to resolve a write fault. The vnode lock is not held at this point, but in
   principle it should be fine since we hold the genfs_node lock. It updates
   many fields in the in-core inode. These updates are not co-ordinated with
   e.g. ffs_update().
 o ffs_alloc() calls through to the disk quota code, which looks like it
   expects the vnode lock held.

Home | Main Index | Thread Index | Old Index