svn commit: r274305 - stable/10/sys/ufs/ffs
Konstantin Belousov
kib at FreeBSD.org
Sun Nov 9 09:44:10 UTC 2014
Author: kib
Date: Sun Nov 9 09:44:09 2014
New Revision: 274305
URL: https://svnweb.freebsd.org/changeset/base/274305
Log:
MFC r273967:
Only trigger a panic when forced operation is done. Convert direct
panic() call into KASSERT().
Modified:
stable/10/sys/ufs/ffs/ffs_softdep.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- stable/10/sys/ufs/ffs/ffs_softdep.c Sun Nov 9 07:37:00 2014 (r274304)
+++ stable/10/sys/ufs/ffs/ffs_softdep.c Sun Nov 9 09:44:09 2014 (r274305)
@@ -735,7 +735,7 @@ static struct malloc_type *memtype[] = {
static void check_clear_deps(struct mount *);
static void softdep_error(char *, int);
static int softdep_process_worklist(struct mount *, int);
-static int softdep_waitidle(struct mount *);
+static int softdep_waitidle(struct mount *, int);
static void drain_output(struct vnode *);
static struct buf *getdirtybuf(struct buf *, struct rwlock *, int);
static void clear_remove(struct mount *);
@@ -1911,7 +1911,7 @@ softdep_flushworklist(oldmnt, countp, td
}
static int
-softdep_waitidle(struct mount *mp)
+softdep_waitidle(struct mount *mp, int flags __unused)
{
struct ufsmount *ump;
int error;
@@ -1921,8 +1921,9 @@ softdep_waitidle(struct mount *mp)
ACQUIRE_LOCK(ump);
for (i = 0; i < 10 && ump->softdep_deps; i++) {
ump->softdep_req = 1;
- if (ump->softdep_on_worklist)
- panic("softdep_waitidle: work added after flush.");
+ KASSERT((flags & FORCECLOSE) == 0 ||
+ ump->softdep_on_worklist == 0,
+ ("softdep_waitidle: work added after flush"));
msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1);
}
ump->softdep_req = 0;
@@ -1990,7 +1991,7 @@ retry_flush:
error = EBUSY;
}
if (!error)
- error = softdep_waitidle(oldmnt);
+ error = softdep_waitidle(oldmnt, flags);
if (!error) {
if (oldmnt->mnt_kern_flag & MNTK_UNMOUNT) {
retry = 0;
More information about the svn-src-stable
mailing list