Subject: block sizes
To: None <>
From: Ignatios Souvatzis <>
List: tech-kern
Date: 05/17/1999 13:30:09

I am browsing PRs 379{0,1,2} and related sources...
the more I read, the less I understand.

- why do we have N copies of bounds_check_with_label()?
- whats the supposed meaning of

* DEV_BSIZE,DEV_BSHIFT	( 512,9 bytes/bits on all)
* BLKDEV_IOSIZE		(2048 bytes on all but pc532, where it is 4096 bytes)
(both set in machine/param.h)
and why do we set them in machine/param.h?
(I suspect these should be either constant, or variable and per-device!)

- as far as I can tell, there are half a dozen different block sizes used...

* media block size (could be hidden by device driver)
* media block size as presented by device driver to other kernel code
* block size used by partition table
* block size used as buffer cache I/O size
* block size used for buffer cache addressing
* block size used by file system addressing 
	(ufs: fragment size; cd9660: 2048 bytes)

Can somebody help me to identify where these different sizes are set/used
in our code?

 * Progress (n.): The process through which Usenet has evolved from
   smart people in front of dumb terminals to dumb people in front of
   smart terminals.  -- (obscurity)