mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
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
This commit is contained in:
parent
8276c6ea9c
commit
4b273a7fb9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user