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 --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/geom/geom_disk.c 222652 2011-06-03 13:49:18Z mav $"); |
38 39#include "opt_geom.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/sysctl.h> 45#include <sys/bio.h> --- 103 unchanged lines hidden (view full) --- 149 error = dp->d_open(dp); 150 if (bootverbose && error != 0) 151 printf("Opened disk %s -> %d\n", 152 pp->name, error); 153 g_disk_unlock_giant(dp); 154 } 155 pp->mediasize = dp->d_mediasize; 156 pp->sectorsize = dp->d_sectorsize; |
157 if (dp->d_flags & DISKFLAG_CANDELETE) 158 pp->flags |= G_PF_CANDELETE; 159 else 160 pp->flags &= ~G_PF_CANDELETE; 161 pp->stripeoffset = dp->d_stripeoffset; 162 pp->stripesize = dp->d_stripesize; |
163 dp->d_flags |= DISKFLAG_OPEN; 164 if (dp->d_maxsize == 0) { 165 printf("WARNING: Disk drive %s%d has no d_maxsize\n", 166 dp->d_name, dp->d_unit); 167 dp->d_maxsize = DFLTPHYS; 168 } 169 } else if ((pp->acr + pp->acw + pp->ace) > 0 && (r + w + e) == 0) { 170 if (dp->d_close != NULL) { --- 448 unchanged lines hidden --- |