Date: Sun, 15 Sep 2024 15:00:36 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 4b273a7fb9e6 - main - softdep_mount: report failure of the softdepflush thread creation Message-ID: <202409151500.48FF0akk042051@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b273a7fb9e6d9a006c5ac7cbd27f5d006569edb commit 4b273a7fb9e6d9a006c5ac7cbd27f5d006569edb Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-09-15 08:06:31 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-09-15 14:59:10 +0000 softdep_mount: report failure of the softdepflush thread creation and do not hang waiting forever for an ack from non-existing thread. PR: 281511 Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_softdep.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 77d552ad5dff..97f50867b012 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -2642,10 +2642,18 @@ softdep_mount(struct vnode *devvp, ACQUIRE_LOCK(ump); ump->softdep_flags |= FLUSH_STARTING; FREE_LOCK(ump); - kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, + error = kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", mp->mnt_stat.f_mntonname); ACQUIRE_LOCK(ump); + if (error != 0) { + printf("%s: failed to start softdepflush thread: %d\n", + mp->mnt_stat.f_mntonname, error); + ump->softdep_flags &= ~FLUSH_STARTING; + FREE_LOCK(ump); + softdep_unmount(mp); + return (error); + } while ((ump->softdep_flags & FLUSH_STARTING) != 0) { msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdstart", hz / 2);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409151500.48FF0akk042051>