Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev modify ldattach() to have default strategy as a para...



details:   https://anonhg.NetBSD.org/src/rev/fb632ab21f43
branches:  trunk
changeset: 817933:fb632ab21f43
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Sep 16 15:20:50 2016 +0000

description:
modify ldattach() to have default strategy as a parameter

diffstat:

 sys/dev/ata/ld_ataraid.c |  8 ++++----
 sys/dev/i2o/ld_iop.c     |  6 +++---
 sys/dev/ic/ld_aac.c      |  6 +++---
 sys/dev/ic/ld_cac.c      |  6 +++---
 sys/dev/ic/ld_icp.c      |  6 +++---
 sys/dev/ic/ld_mlx.c      |  6 +++---
 sys/dev/ic/ld_nvme.c     |  7 ++++---
 sys/dev/ld.c             |  8 ++++----
 sys/dev/ldvar.h          |  4 ++--
 sys/dev/pci/ld_amr.c     |  6 +++---
 sys/dev/pci/ld_twa.c     |  6 +++---
 sys/dev/pci/ld_twe.c     |  6 +++---
 sys/dev/pci/ld_virtio.c  |  7 ++++---
 sys/dev/sdmmc/ld_sdmmc.c |  6 +++---
 14 files changed, 45 insertions(+), 43 deletions(-)

diffs (truncated from 394 to 300 lines):

diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ata/ld_ataraid.c
--- a/sys/dev/ata/ld_ataraid.c  Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ata/ld_ataraid.c  Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_ataraid.c,v 1.41 2016/05/02 19:18:29 christos Exp $ */
+/*     $NetBSD: ld_ataraid.c,v 1.42 2016/09/16 15:20:50 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.41 2016/05/02 19:18:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.42 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include "bio.h"
 
@@ -249,8 +249,8 @@
                panic("%s: bioctl registration failed\n",
                    device_xname(ld->sc_dv));
 #endif
-       SIMPLEQ_INIT(&sc->sc_cbufq);
-       ldattach(ld);
+       SIMPLEQ_INIT(&sc->sc_cbufq);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/i2o/ld_iop.c
--- a/sys/dev/i2o/ld_iop.c      Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/i2o/ld_iop.c      Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_iop.c,v 1.35 2015/04/13 16:33:24 riastradh Exp $    */
+/*     $NetBSD: ld_iop.c,v 1.36 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.35 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.36 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -266,7 +266,7 @@
        else
                aprint_error_dev(self, "device not yet supported\n");
 
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
        return;
 
  bad:
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ic/ld_aac.c
--- a/sys/dev/ic/ld_aac.c       Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ic/ld_aac.c       Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_aac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $    */
+/*     $NetBSD: ld_aac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_aac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_aac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -95,7 +95,7 @@
 
        aprint_normal(": %s\n",
            aac_describe_code(aac_container_types, hdr->hd_devtype));
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ic/ld_cac.c
--- a/sys/dev/ic/ld_cac.c       Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ic/ld_cac.c       Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_cac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $    */
+/*     $NetBSD: ld_cac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2000, 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_cac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_cac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -130,7 +130,7 @@
 
        /* XXX We should verify this... */
        ld->sc_flags = LDF_ENABLED;
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 int
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ic/ld_icp.c
--- a/sys/dev/ic/ld_icp.c       Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ic/ld_icp.c       Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_icp.c,v 1.27 2015/04/13 16:33:24 riastradh Exp $    */
+/*     $NetBSD: ld_icp.c,v 1.28 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.27 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.28 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,7 +158,7 @@
        aprint_normal("status: %s\n", str);
 
  out:
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 int
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ic/ld_mlx.c
--- a/sys/dev/ic/ld_mlx.c       Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ic/ld_mlx.c       Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_mlx.c,v 1.21 2015/04/13 16:33:24 riastradh Exp $    */
+/*     $NetBSD: ld_mlx.c,v 1.22 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_mlx.c,v 1.21 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_mlx.c,v 1.22 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -127,7 +127,7 @@
        else
                aprint_normal(": RAID%d, %s\n", ms->ms_raidlevel, statestr);
 
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ic/ld_nvme.c
--- a/sys/dev/ic/ld_nvme.c      Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ic/ld_nvme.c      Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_nvme.c,v 1.1 2016/05/01 10:21:02 nonaka Exp $       */
+/*     $NetBSD: ld_nvme.c,v 1.2 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (C) 2016 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
@@ -26,13 +26,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.1 2016/05/01 10:21:02 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.2 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/device.h>
 #include <sys/buf.h>
+#include <sys/bufq.h>
 #include <sys/disk.h>
 #include <sys/kmem.h>
 
@@ -113,7 +114,7 @@
        ld->sc_dump = ld_nvme_dump;
        ld->sc_flush = ld_nvme_flush;
        ld->sc_flags = LDF_ENABLED;
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ld.c
--- a/sys/dev/ld.c      Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ld.c      Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld.c,v 1.94 2016/02/27 08:54:49 mlelstv Exp $  */
+/*     $NetBSD: ld.c,v 1.95 2016/09/16 15:20:50 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94 2016/02/27 08:54:49 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.95 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -122,7 +122,7 @@
 };
 
 void
-ldattach(struct ld_softc *sc)
+ldattach(struct ld_softc *sc, const char *default_strategy)
 {
        device_t self = sc->sc_dv;
        struct dk_softc *dksc = &sc->sc_dksc;
@@ -153,7 +153,7 @@
        disk_attach(&dksc->sc_dkdev);
        ld_set_geometry(sc);
 
-       bufq_alloc(&dksc->sc_bufq, BUFQ_DISK_DEFAULT_STRAT, BUFQ_SORT_RAWBLOCK);
+       bufq_alloc(&dksc->sc_bufq, default_strategy, BUFQ_SORT_RAWBLOCK);
 
        /* Register with PMF */
        if (!pmf_device_register1(dksc->sc_dev, ld_suspend, NULL, ld_shutdown))
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/ldvar.h
--- a/sys/dev/ldvar.h   Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/ldvar.h   Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldvar.h,v 1.27 2015/08/28 17:41:49 mlelstv Exp $       */
+/*     $NetBSD: ldvar.h,v 1.28 2016/09/16 15:20:50 jdolecek Exp $      */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 #define        LDFL_POLL       0x001           /* poll for completion */
 
 int    ldadjqparam(struct ld_softc *, int);
-void   ldattach(struct ld_softc *);
+void   ldattach(struct ld_softc *, const char *);
 int    ldbegindetach(struct ld_softc *, int);
 void   ldenddetach(struct ld_softc *);
 void   lddone(struct ld_softc *, struct buf *);
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/pci/ld_amr.c
--- a/sys/dev/pci/ld_amr.c      Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/pci/ld_amr.c      Fri Sep 16 15:20:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_amr.c,v 1.23 2015/04/13 16:33:25 riastradh Exp $    */
+/*     $NetBSD: ld_amr.c,v 1.24 2016/09/16 15:20:50 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_amr.c,v 1.23 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_amr.c,v 1.24 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -107,7 +107,7 @@
            amr->amr_drive[sc->sc_hwunit].al_properties & AMR_DRV_RAID_MASK,
            statestr);
 
-       ldattach(ld);
+       ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 CFATTACH_DECL_NEW(ld_amr, sizeof(struct ld_amr_softc),
diff -r d3c1eda465b7 -r fb632ab21f43 sys/dev/pci/ld_twa.c
--- a/sys/dev/pci/ld_twa.c      Fri Sep 16 15:02:23 2016 +0000
+++ b/sys/dev/pci/ld_twa.c      Fri Sep 16 15:20:50 2016 +0000
@@ -1,5 +1,5 @@
 /*     $wasabi: ld_twa.c,v 1.9 2006/02/14 18:44:37 jordanr Exp $       */
-/*     $NetBSD: ld_twa.c,v 1.17 2015/04/13 16:33:25 riastradh Exp $ */
+/*     $NetBSD: ld_twa.c,v 1.18 2016/09/16 15:20:50 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_twa.c,v 1.17 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_twa.c,v 1.18 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,7 @@
        ld->sc_start = ld_twa_start;



Home | Main Index | Thread Index | Old Index