Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-localcount]: src/sys/dev mport rev 1.95 from HEAD
details: https://anonhg.NetBSD.org/src/rev/7070eab3cbdd
branches: pgoyette-localcount
changeset: 852892:7070eab3cbdd
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jul 31 13:12:59 2016 +0000
description:
mport rev 1.95 from HEAD
diffstat:
sys/dev/fss.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diffs (65 lines):
diff -r d3a1fc62d682 -r 7070eab3cbdd sys/dev/fss.c
--- a/sys/dev/fss.c Sun Jul 31 03:56:57 2016 +0000
+++ b/sys/dev/fss.c Sun Jul 31 13:12:59 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fss.c,v 1.93.2.6 2016/07/31 01:36:49 pgoyette Exp $ */
+/* $NetBSD: fss.c,v 1.93.2.7 2016/07/31 13:12:59 pgoyette Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.6 2016/07/31 01:36:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.7 2016/07/31 13:12:59 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -472,17 +472,20 @@
/*
* An error occurred reading or writing the snapshot or backing store.
- * If it is the first error log to console.
+ * If it is the first error log to console and disestablish cow handler.
* The caller holds the mutex.
*/
static inline void
fss_error(struct fss_softc *sc, const char *msg)
{
- if ((sc->sc_flags & (FSS_ACTIVE|FSS_ERROR)) == FSS_ACTIVE)
- aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
- if ((sc->sc_flags & FSS_ACTIVE) == FSS_ACTIVE)
- sc->sc_flags |= FSS_ERROR;
+ if ((sc->sc_flags & (FSS_ACTIVE | FSS_ERROR)) != FSS_ACTIVE)
+ return;
+
+ aprint_error_dev(sc->sc_dev, "snapshot invalid: %s\n", msg);
+ if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+ fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
+ sc->sc_flags |= FSS_ERROR;
}
/*
@@ -605,9 +608,8 @@
continue;
sc = device_private(self);
mutex_enter(&sc->sc_slock);
- if ((sc->sc_flags & FSS_ACTIVE) != 0 &&
- sc->sc_mount == mp)
- fss_error(sc, "forced unmount");
+ if ((sc->sc_flags & FSS_ACTIVE) != 0 && sc->sc_mount == mp)
+ fss_error(sc, "forced by unmount");
mutex_exit(&sc->sc_slock);
device_release(self);
}
@@ -917,7 +919,7 @@
fss_delete_snapshot(struct fss_softc *sc, struct lwp *l)
{
- if ((sc->sc_flags & FSS_PERSISTENT) == 0)
+ if ((sc->sc_flags & (FSS_PERSISTENT | FSS_ERROR)) == 0)
fscow_disestablish(sc->sc_mount, fss_copy_on_write, sc);
mutex_enter(&sc->sc_slock);
Home |
Main Index |
Thread Index |
Old Index