Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2001 19:34:56 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Jordan K. Hubbard" <jkh@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libdisk blocks.c chunk.c create_chunk.c disk.c         disklabel.c libdisk.3 libdisk.h write_disk.c
Message-ID:  <Pine.BSF.4.21.0105141911520.28667-100000@besplex.bde.org>
In-Reply-To: <200105132008.f4DK8te36416@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 May 2001, Jordan K. Hubbard wrote:

> jkh         2001/05/13 13:08:55 PDT
> 
>   Modified files:
>     lib/libdisk          blocks.c chunk.c create_chunk.c disk.c 
>                          disklabel.c libdisk.3 libdisk.h 
>                          write_disk.c 
>   Log:
>   + add u_long sector_size to struct disk (documented in libdisk.3)
>   + make Open_Disk sense the sector size by trying 512, 1024 and 2048
>     in this order. This makes the kernel note that
>     dscheck(cd1): bio_bcount 512 is not on a sector boundary (ssize 2048)
>     dscheck(cd1): bio_bcount 1024 is not on a sector boundary (ssize 2048)
>     if 2048 is the sector size. If this worries anyone: the message is from
>     /usr/src/sys/kern/subr_diskslice.c and shutups are to be placed there.

Shutups aren't to be placed.  Here the bug is that libdisk probes for the
sector size instead of just using the sector size in the disk label
(d_secsize in the label for the whole disk slice) and/or that some broken
drivers still don't support the whole disk device and/or don't initialize
its label correctly.  dscheck() just uses this size (indirectly).

Even after these changes, Write_Disk() still does extra work to create
a a label with possibly-wrong hard-coded defaults (including a sector
size of 512).  It should get almost everything except the partition
data from the label for the whole disk slice.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0105141911520.28667-100000>