Deleted Added
full compact
g_bde_work.c (151897) g_bde_work.c (160964)
1/*-
2 * Copyright (c) 2002 Poul-Henning Kamp
3 * Copyright (c) 2002 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
7 * and NAI Labs, the Security Research Division of Network Associates, Inc.
8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

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

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*-
2 * Copyright (c) 2002 Poul-Henning Kamp
3 * Copyright (c) 2002 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
7 * and NAI Labs, the Security Research Division of Network Associates, Inc.
8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

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

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/geom/bde/g_bde_work.c 151897 2005-10-31 15:41:29Z rwatson $
32 * $FreeBSD: head/sys/geom/bde/g_bde_work.c 160964 2006-08-04 07:56:35Z yar $
33 */
34/*
35 * This source file contains the state-engine which makes things happen in the
36 * right order.
37 *
38 * Outline:
39 * 1) g_bde_start1()
40 * Break the struct bio into multiple work packets one per zone.

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

641 */
642 if (sc->dead)
643 break;
644 g_trace(G_T_TOPOLOGY, "g_bde_worker sleep");
645 error = msleep(sc, &sc->worklist_mutex,
646 PRIBIO, "-", hz);
647 if (error == EWOULDBLOCK) {
648 /*
33 */
34/*
35 * This source file contains the state-engine which makes things happen in the
36 * right order.
37 *
38 * Outline:
39 * 1) g_bde_start1()
40 * Break the struct bio into multiple work packets one per zone.

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

641 */
642 if (sc->dead)
643 break;
644 g_trace(G_T_TOPOLOGY, "g_bde_worker sleep");
645 error = msleep(sc, &sc->worklist_mutex,
646 PRIBIO, "-", hz);
647 if (error == EWOULDBLOCK) {
648 /*
649 * Loose our skey cache in an orderly fashion.
649 * Lose our skey cache in an orderly fashion.
650 * The exact rate can be tuned to be less
651 * aggressive if this is desirable. 10% per
652 * second means that the cache is gone in a
653 * few minutes.
654 */
655 g_bde_purge_sector(sc, 10);
656 }
657 }

--- 107 unchanged lines hidden ---
650 * The exact rate can be tuned to be less
651 * aggressive if this is desirable. 10% per
652 * second means that the cache is gone in a
653 * few minutes.
654 */
655 g_bde_purge_sector(sc, 10);
656 }
657 }

--- 107 unchanged lines hidden ---