Deadlock between nfsd and snapshots.

Tor Egge Tor.Egge at
Wed Aug 23 16:58:14 UTC 2006

> This seems wrong to me.  I think MNT_ILOCK() (like you used) is sufficient,
> but you should just use a nonblocking vn_start_write() to avoid knowing
> about the internals of vn_start_write().  If the shared (or whatever)
> vnode lock is insufficient, then there are much larger, much older bugs.
> Inodes are accessed a lot with just the the vnode lock, and the vnode
> interlock here won't affect races with most other accesses.

The check for MNTK_SUSPENDED in the proposed patch checks for if the file
system is suspended (cf. vn_start_secondary_write()).

To check for if the file system is in the process of being suspended,
MNTK_SUSPEND is needed (cf. vn_start_write()).

If IN_MODIFIED is set while the file system is in the processes of being
suspended and it isn't known that the vnode sync loop has not passed beyond
this vnode then some hint must be left to indicate that the vnode sync loop
should be restarted.  vn_start_secondary_write() uses mnt_secondary_accwrites
for this.

- Tor Egge

More information about the freebsd-fs mailing list