diff options
author | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
commit | cf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch) | |
tree | 9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/geom/geom_ccd.c | |
parent | b72619cecb8265d3efb3781b0acff1380762c173 (diff) | |
download | FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz |
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/geom/geom_ccd.c')
-rw-r--r-- | sys/geom/geom_ccd.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index c7f6591..d947708 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -186,7 +186,7 @@ ccdnew(int unit) if (IS_ALLOCATED(unit) || unit > 32) return (NULL); - MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_ZERO); + MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_WAITOK | M_ZERO); sc->sc_unit = unit; LIST_INSERT_HEAD(&ccd_softc_list, sc, list); /* XXX: UNLOCK(unique unit numbers) */ @@ -263,7 +263,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td) /* Allocate space for the component info. */ cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo), - M_CCD, 0); + M_CCD, M_WAITOK); /* * Verify that each component piece exists and record @@ -271,7 +271,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td) */ maxsecsize = 0; minsize = 0; - tmppath = malloc(MAXPATHLEN, M_CCD, 0); + tmppath = malloc(MAXPATHLEN, M_CCD, M_WAITOK); for (ix = 0; ix < cs->sc_nccdisks; ix++) { vp = cs->sc_vpp[ix]; ci = &cs->sc_cinfo[ix]; @@ -284,7 +284,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td) MAXPATHLEN, &ci->ci_pathlen)) != 0) { goto fail; } - ci->ci_path = malloc(ci->ci_pathlen, M_CCD, 0); + ci->ci_path = malloc(ci->ci_pathlen, M_CCD, M_WAITOK); bcopy(tmppath, ci->ci_path, ci->ci_pathlen); ci->ci_dev = vn_todev(vp); @@ -439,7 +439,7 @@ ccdinterleave(struct ccd_s *cs, int unit) */ size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo); cs->sc_itable = (struct ccdiinfo *)malloc(size, M_CCD, - M_ZERO); + M_WAITOK | M_ZERO); /* * Trivial case: no interleave (actually interleave of disk size). @@ -453,7 +453,7 @@ ccdinterleave(struct ccd_s *cs, int unit) for (ix = 0; ix < cs->sc_nccdisks; ix++) { /* Allocate space for ii_index. */ - ii->ii_index = malloc(sizeof(int), M_CCD, 0); + ii->ii_index = malloc(sizeof(int), M_CCD, M_WAITOK); ii->ii_ndisk = 1; ii->ii_startblk = bn; ii->ii_startoff = 0; @@ -476,7 +476,7 @@ ccdinterleave(struct ccd_s *cs, int unit) * we use. */ ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks), - M_CCD, 0); + M_CCD, M_WAITOK); /* * Locate the smallest of the remaining components @@ -1066,9 +1066,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td) * componet pathnames and device numbers. */ cpp = malloc(ccio->ccio_ndisks * sizeof(char *), - M_CCD, 0); + M_CCD, M_WAITOK); vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *), - M_CCD, 0); + M_CCD, M_WAITOK); error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp, ccio->ccio_ndisks * sizeof(char **)); @@ -1124,7 +1124,8 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td) ccio->ccio_unit = unit; ccio->ccio_size = cs->sc_size; ccg = &cs->sc_geom; - cs->sc_disk = malloc(sizeof(struct disk), M_CCD, M_ZERO); + cs->sc_disk = malloc(sizeof(struct disk), M_CCD, + M_ZERO | M_WAITOK); cs->sc_disk->d_strategy = ccdstrategy; cs->sc_disk->d_name = "ccd"; cs->sc_disk->d_sectorsize = ccg->ccg_secsize; |