Subject: Re: proposal for non-512 bytes/sector block device
To: None <christos@nyc.deshaw.com>
From: Koji Imada - je4owb/2 <koji@gin.math.human.nagoya-u.ac.jp>
List: tech-kern
Date: 07/01/1997 05:47:17
>>>>> ">" == Christos Zoulas <christos@nyc.deshaw.com> writes:

 >> In article <199706301548.AAA04002@bimota.imada.math.human.nagoya-u.ac.jp> koji@math.human.nagoya-u.ac.jp (Koji Imada - je4owb/2) writes:
 >> +		if (sdp->swd_bsize < DEV_BSIZE)
                                   ^

Sorry, This is my mistake. This should be

		if (sdp->swd_bsize < DEV_BSIZE)

This is no effect because of #if 0'ed.

 >> Isn't it better to write those two as:

 >> 		if (sdp->swd_bsize != DEV_BSIZE)
 >> 			nblks = (nblks * DEV_BSIZE) / sdp->swd_bsize;



 >> 		if (sdp->swd_bsize == DEV_BSIZE)
 >>			 bp-> b_blkno = bn;
 >> 		else
 >>			 bp-> b_blkno = (bn * DEV_BSIZE) / sdp->swd_bsize;

I think those may cause overflow for big(over 2GB) disk because
daddr_t is int32_t. How about this?
--
Koji Imada - je4owb/2