On Tuesday 02 September 2014 15:22:16, Philip Guenther wrote:
> > From physio(9):
> >      minphys
> >              A device specific routine called to determine the
> >maximum transfer size that the device's strategy routine can
> >handle.
> >
> > Since we have seen that the driver must be able to handle 64k
> > blocks in any case, the fact that minphys is device specific is
> > useless, isn't it?
> 
> physio() is used by character device access.  Looks to me like
> sdminphys() will change the chunking behavior of this:
>     dd if=/dev/zero of=/dev/rsd0a bs=100M count=1
> 
> depending on whether sd0 is a SCSI-I device, no?

Yes, but that does not make it any less useless. File systems will 
call the very same strategy routine and expect it to deal with 64K 
blocks. The statement in the man page gives the misleading impression 
that the strategy routine could be used to avoid that the strategy 
routine has to handle 64K blocks, which is not true.

So, maybe the minphys mechanism is useful for block devices that are 
not used for file systems. Are there any such devices?

Maybe we could add a sentence to the man page like following?

Beware that a block device's strategy routine that is used for file 
systems must always be able to accept transfers sizes up to MAXPHYS.

Reply via email to