Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 May 2001 13:08:55 -0700 (PDT)
From:      "Jordan K. Hubbard" <jkh@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   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:  <200105132008.f4DK8te36416@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
  + Have read_block and write_block use an additional parameter, the
    sector size.
  + replace all barfout calls with return NULL, 0, __LINE__, etc.
    Note that this does NOT emit diagnostics. More often than not,
    you don't want library functions to scribble on stderr -- it may
    not even be available. The right thing is to propagate the error
    condition to upper management. The app should take care of errors.
  + use d1->sector_size instead of 512 in various places. I've left many
    places untouched, especially those writing MBRs. I simply added
    another arg hardcoded as 512. This is because I would not know what
    I'm doing... I felt this approach would be reasonably backward
    compatible and not introduce any new bugs in critical software.
    Famous last words. Messing with MBRs might soon put me in the same
    screwup meister category as, uh, never mind.  :-)
  + bump the max no of disks from 20 to 32 (due to PR 24503).
  
  PR:		8434 / 8436 / 24503
  Submitted by:	Jens Schweikhardt <schweikh@schweikhardt.net>
  
  Revision  Changes    Path
  1.10      +19 -14    src/lib/libdisk/blocks.c
  1.27      +7 -7      src/lib/libdisk/chunk.c
  1.59      +15 -11    src/lib/libdisk/create_chunk.c
  1.70      +33 -21    src/lib/libdisk/disk.c
  1.8       +3 -3      src/lib/libdisk/disklabel.c
  1.21      +2 -1      src/lib/libdisk/libdisk.3
  1.39      +12 -16    src/lib/libdisk/libdisk.h
  1.41      +18 -15    src/lib/libdisk/write_disk.c


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?200105132008.f4DK8te36416>