Deleted Added
full compact
g_mirror.c (163888) g_mirror.c (170307)
1/*-
2 * Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/geom/mirror/g_mirror.c 163888 2006-11-01 22:51:49Z pjd $");
28__FBSDID("$FreeBSD: head/sys/geom/mirror/g_mirror.c 170307 2007-06-05 00:00:57Z jeff $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/limits.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>

--- 1726 unchanged lines hidden (view full) ---

1763g_mirror_worker(void *arg)
1764{
1765 struct g_mirror_softc *sc;
1766 struct g_mirror_event *ep;
1767 struct bio *bp;
1768 int timeout;
1769
1770 sc = arg;
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/limits.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>

--- 1726 unchanged lines hidden (view full) ---

1763g_mirror_worker(void *arg)
1764{
1765 struct g_mirror_softc *sc;
1766 struct g_mirror_event *ep;
1767 struct bio *bp;
1768 int timeout;
1769
1770 sc = arg;
1771 mtx_lock_spin(&sched_lock);
1771 thread_lock(curthread);
1772 sched_prio(curthread, PRIBIO);
1772 sched_prio(curthread, PRIBIO);
1773 mtx_unlock_spin(&sched_lock);
1773 thread_unlock(curthread);
1774
1775 sx_xlock(&sc->sc_lock);
1776 for (;;) {
1777 G_MIRROR_DEBUG(5, "%s: Let's see...", __func__);
1778 /*
1779 * First take a look at events.
1780 * This is important to handle events before any I/O requests.
1781 */

--- 1481 unchanged lines hidden ---
1774
1775 sx_xlock(&sc->sc_lock);
1776 for (;;) {
1777 G_MIRROR_DEBUG(5, "%s: Let's see...", __func__);
1778 /*
1779 * First take a look at events.
1780 * This is important to handle events before any I/O requests.
1781 */

--- 1481 unchanged lines hidden ---