*BSD News Article 26564


Return to BSD News archive

Xref: sserve comp.os.386bsd.development:1734 comp.os.386bsd.questions:8284 comp.unix.bsd:13342
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!rena!cnvxjp!omnis.co.jp!specgw!amurai
From: amurai@specgw.spec.co.jp (Atsushi MURAI)
Newsgroups: comp.os.386bsd.development,comp.os.386bsd.questions,comp.unix.bsd
Subject: [Q] Logical vs Phygical Block
Message-ID: <CK9wu8.F6r@specgw.spec.co.jp>
Date: 27 Jan 94 05:34:56 GMT
Followup-To: comp.os.386bsd.development
Organization: System Planning and Engineering Corporation, Tokyo, Japan
Lines: 31

Dear Netter,

  I am working around CD-ROM/DA(PhotoCD,Reading Degital Audio) for
*bsd now.  I've done for PhotoCD with multisession. But Reading
Degital Audio, I need your knowledge of Logical vs Phygical Block of
*bsd system.

 For example, when invoke a read function for raw device, Starting
point of Data is offset from partition. Read funtion call the phisio
in kernel for converting from offset to Logical Block Number (512byte).
and then this routine call a stratagey routine in driver is converting 
Logical Block number plus partition to Phygical Block Number. 

This implementation will work only Phygical Block size is multiple 512
bytes. ( i.e. CD-ROM block 2048/ SCSI 512Bytes)

But block(sector) size for Degital Audio Data on CD is 2352byts.  So
it will miss reading a block.........

I am planning(actually done) to pass a data offset ( uio->uio_offset )
pointer to stratagey routine in cd.c and re-make a new(next) offset and
calculating Phygical Block Number.( I beleive other stratagy routine
in disk/fd is just ignore extra argument from kern_physio.c ;-)

But I would like to get any comment/suggestion for my idea from you
just in case.

Regards.

Atsushi.
---