Date: Sat, 29 May 2021 23:29:51 +0000 From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 238565] panic: vinvalbuf: dirty bufs during unmount if clustered writes return errors Message-ID: <bug-238565-3630-8VQoI1BDhP@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-238565-3630@https.bugs.freebsd.org/bugzilla/> References: <bug-238565-3630@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238565 --- Comment #9 from Konstantin Belousov <kib@FreeBSD.org> --- (In reply to Kirk McKusick from comment #8) > I am confused as to why the EIO error is not being returned. Presumably i= n bufobj_invalbuf() we attempt to do the write in the call to BO_SYNC(). If= BO_SYNC() returns EIO, we should return it rather than falling through to = the panic. So how is it that the EIO is not returned? BO_SYNC() does not see any error. Default implementation of BO_SYNC() is bufsync() which is just redirection to VOP_FSYNC(). And default implementation of vop_fsync for filesystems using buffer cache is vn_fsync_buf(), which does bawrite() (non-clustered) or vfs_bio_awrite() (clustered). In either case, the real action occurs in bufdone()->brelse() occuring on write completion. Look at the conditional with the inner comment 'Failed write, redirty.' It does exactly that: if the async write failed, the buffer is redirtied and re-inserted in= to the dirty list. After several loops where the dirty buffer is found/awritten/redirtied, fsy= nc eventually gives up, and vinvalbuf() gets the control back to find the dirty buffer on the list and panic. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238565-3630-8VQoI1BDhP>