Date: Wed, 23 Aug 2006 16:58:10 +0000 (UTC) From: Tor Egge <Tor.Egge@cvsup.no.freebsd.org> To: bde@zeta.org.au Cc: freebsd-fs@freebsd.org Subject: Re: Deadlock between nfsd and snapshots. Message-ID: <20060823.165810.130180685.Tor.Egge@cvsup.no.freebsd.org> In-Reply-To: <20060824003453.M63627@delplex.bde.org> References: <20060822.214638.74697110.Tor.Egge@cvsup.no.freebsd.org> <20060823044043.GA64800@deviant.kiev.zoral.com.ua> <20060824003453.M63627@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060823.165810.130180685.Tor.Egge>