Deleted Added
sdiff udiff text old ( 163206 ) new ( 163836 )
full compact
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/raid3/g_raid3.c 163206 2006-10-10 15:01:47Z pjd $");
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>

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

1365 mtx_lock(&sc->sc_queue_mtx);
1366 bioq_insert_head(&sc->sc_queue, bp);
1367 wakeup(sc);
1368 wakeup(&sc->sc_queue);
1369 mtx_unlock(&sc->sc_queue_mtx);
1370}
1371
1372static void
1373g_raid3_start(struct bio *bp)
1374{
1375 struct g_raid3_softc *sc;
1376
1377 sc = bp->bio_to->geom->softc;
1378 /*
1379 * If sc == NULL or there are no valid disks, provider's error
1380 * should be set and g_raid3_start() should not be called at all.

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

1385 bp->bio_to->error, bp->bio_to->name));
1386 G_RAID3_LOGREQ(3, bp, "Request received.");
1387
1388 switch (bp->bio_cmd) {
1389 case BIO_READ:
1390 case BIO_WRITE:
1391 case BIO_DELETE:
1392 break;
1393 case BIO_GETATTR:
1394 default:
1395 g_io_deliver(bp, EOPNOTSUPP);
1396 return;
1397 }
1398 mtx_lock(&sc->sc_queue_mtx);
1399 bioq_insert_tail(&sc->sc_queue, bp);
1400 G_RAID3_DEBUG(4, "%s: Waking up %p.", __func__, sc);

--- 2100 unchanged lines hidden ---