730c730,752
<     if do_read then begin
---
>     {The following bugfix (marked {SFB} {) protects the cache if a too-large 
>      read is requested. If the requested read is > max_size of the buffer, 
>      treat as non-corrupting error (escape(0)), and exit the DAM quietly with 
>      ioresult.
>      Make sure to mark the buffer not in use, and invalid, but leave other
>      info there as an aid to future debugging.
>      This is related to the bug wherein CTABLE never gets floppies accounted
>      for in the cache configuration. Only cgroups and superblocks can request
>      too-large transfers, as inodes and dblocks are fixed in size.
>      SFB
>     }
>      
>      if do_read then 
>       with buf_hdr^ do          	{SFB}
>        if size>max_size then    	{SFB}
> 	begin                   	{SFB}
> 	 use_count := 0;        	{SFB}
> 	 unit := NO_UNIT;       	{SFB}
> 	 ioresult := ord(zdvrnoconfig);	{SFB}
> 	 escape(0);             	{SFB}
> 	end                     	{SFB}
>      else                       	{SFB}
> 	begin
931a954
>     f: fib;	{SFB}
942a966,991
>     
>     {The following lines fix a bug wherein floppies were not influencing
>      cache configuration properly. The superblock and cylinder group size
>      were not being computed for floppies, since the following get_bytes would
>      fail, so the superblock was not being read. The getbytes failed because
>      the fpeof in tempfib was 0, giving ioresult = ieof. Fpeof was 0 because
>      umaxbytes was 0 at this point, and unblockeddam (called by setuptempfib,
>      called by set_unit) merely copies umaxbytes -> fpeof. Umaxbytes is 0
>      for floppies at this point because CTABLE assign_floppy_pair passes in 0 
>      to tea_CS80_sv, which passes it to p_umaxbytes in tea, whereas the CTABLE
>      { local hard discs } { section calls get_CS80_parms, and passes mb in to
>      tea_CS80_mv.
>      See CTABLE for comments on clearunit being used to set umaxbytes. The
>      clearunit call in assign_and_clear_unit happens too late for the need
>      described here.
>      The bug symptom was the cache getting smashed when a floppy had a larger
>      cgroup cache record size requirement than any disc interrogated during 
>      CTABLE (only hard discs were being interrogated). There is a related fix 
>      in get_buf, to refuse a too-large read_buffer request.	
>      SFB/LAF
>     }
>     
>     ioresult := ord(inoerror);                                  	{SFB}
>     f.funit := unum;                                            	{SFB}
>     call(unitable^[unum].tm, addr(f), clearunit, unum, 0, 0);   	{SFB}
>     
