Date: Tue, 22 Sep 1998 17:39:26 -0400 (EDT) From: Luoqi Chen <luoqi@watermarkgroup.com> To: Don.Lewis@tsc.tdk.com, current@FreeBSD.ORG, luoqi@watermarkgroup.com Cc: mckusick@flamingo.McKusick.COM Subject: Re: Yet another patch to try for softupdates panic Message-ID: <199809222139.RAA04421@lor.watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
> > You could tweak this call to VOP_FSYNC() to get it to avoid the > > call to softdep_fsync(), but how many other places in the kernel > > also need to be fixed? It may be better to only call softdep_fsync() > > from within the fsync() syscall handler. I don't know that any other > > users of VOP_FSYNC() need to ensure that the parent directories are > > pushed to disk. > > > I totally agree. This is the way to go. I'll try this and let you know > how it turns out. > > -lq > I have checked all places that VOP_FSYNC() is called, and I found that we may not need the function softdep_fsync() after all. Calls to VOP_FSYNC() can be basically grouped into 4 categories: 1. via the VFS_SYNC() call. In this case we don't need to call softdep_fsync(), because VOP_FSYNC() will be called for the parent directory too, and that should take care of the dependencies softdep_fsync() is supposed to get rid of. 2. via fsync() syscall and sync_fsync() by syncer. VOP_FSYNC() is called with MNT_LAZY and softdep_fsync() will not get called. 3. called for block device to flush disk buffers. softdep_fsync() will do nothing here 4. via vinvalbuf() and ffs_truncate() softdep_fsync() will introduce a race condition and we want to avoid it. So the only case that softdep_fsync() actually does something useful is exactly the case that we don't want softdep_fsync() to be called. Did I miss anything here? I'm surprise myself at this conclusion. I will try without softdep_fsync() and hope I won't trash my disk completely. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809222139.RAA04421>