From nobody Sun Sep 15 15:00:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X6B7923q4z5WmfM; Sun, 15 Sep 2024 15:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X6B7874w4z4PPm; Sun, 15 Sep 2024 15:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726412437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A58uKQVS/CIUtJV12baVkcERXbsRdq9IlBFecjQ5UyU=; b=enzcHCp/7PxLdBS+WnmiR9jFVmBVb0kDlGbQCbHzUOzFmdkXUxEUJIfdHtNY0WtQTx9DEm JqWNXha1A8YfxELEJu1yZi68b1xRTqXvjXgqF+DDBgt8hqoG4M7QdgHiwVeimSagN/jcUV GZ1HcT9mN5+iwlysT20DgbMmYJ3i4dZLrKWngyD37f23t/+5LZujG3hYY5dHy6pX0/fiq+ nu3sC7D7lxPx0+WNu521+tJ0TCLSEKYnk0cO+rl14bIUBlJxqBJVmqE1Qi37GILtNBmA3b EEQyhulraWBDIIYnx7DYSEOXKODM7gPjIGw0lUXyhHf+O3y5SM4drSxdwIMhPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726412437; a=rsa-sha256; cv=none; b=IQGwYfr/6zfbqmP9zCbTttfpzmkMD6A7/LrEfF8lhCf7PETResk1+pS38Q45DjB5AdeNyJ 47FkQn2W9/1N3lMO345gOiLVSL961ijT4EW4iHZ0HvqKR9rK3jlZIvcnUXBASsA446kyHL BUwCHbD6uzl/RD0uD/ES1U+j77g38bD9PCIMnVcwfRRO7/mjNXLnCUNuC/wsfD2bM2e1bp hRljCNSRSRbHnIwxAc2JcdCX8HS1iD0K2VWgwD77mz06x+VoG5z0MgsjPMDf5kDjdyadjQ WrH+5dR/OEhBX1a7Pe1JQF+/l0bIuQ4p3CQJwrn1pZx6YiP9/WetR4o1+1IVug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726412437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A58uKQVS/CIUtJV12baVkcERXbsRdq9IlBFecjQ5UyU=; b=LuUHq5AiswlbLGrZLszR4J7j59Y4GsfPRdJ7OJ/+OGb9b9KVjBHD/3ttk0Jv18nk7VyEX8 EE8Z9hxpejxsT+wuH44rq5RnTPlWCv7qMHmDYONwDgjEma58wpeQELCIzYdwMjVS2Biip2 cdQkOCTEUBaN6UE179MLwFDpJTyYPA1xfwpk8i8T+XT/OvA33tYgBHd62v6a3ISwWYRbzf G0Q0HTqEMZP+/rZOh71WEEm0pPVSWCQ7xF0Q6t5KOxxphwanAddImPadNfCysP7DeU+HXe eWkzzgb7ZS0+YLzbmEd30R6bbNbZqTQ1o94R8ZZchyhiYPlqG1IHOH0FI0BqbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X6B786gVrzFvc; Sun, 15 Sep 2024 15:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48FF0aLP042054; Sun, 15 Sep 2024 15:00:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48FF0akk042051; Sun, 15 Sep 2024 15:00:36 GMT (envelope-from git) Date: Sun, 15 Sep 2024 15:00:36 GMT Message-Id: <202409151500.48FF0akk042051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4b273a7fb9e6 - main - softdep_mount: report failure of the softdepflush thread creation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b273a7fb9e6d9a006c5ac7cbd27f5d006569edb Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b273a7fb9e6d9a006c5ac7cbd27f5d006569edb commit 4b273a7fb9e6d9a006c5ac7cbd27f5d006569edb Author: Konstantin Belousov AuthorDate: 2024-09-15 08:06:31 +0000 Commit: Konstantin Belousov 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);