Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830713); site edcaad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!ukc!edcaad!pete From: pete@edcaad.UUCP (Peter Sykes) Newsgroups: net.bugs.4bsd Subject: Bread size 0 bug Please help Message-ID: <652@edcaad.UUCP> Date: Mon, 23-Jul-84 01:12:22 EDT Article-I.D.: edcaad.652 Posted: Mon Jul 23 01:12:22 1984 Date-Received: Thu, 12-Jul-84 02:48:48 EDT Organization: Architecture, Edinburgh U., Scotland Lines: 27 We occasionally get a "Panic bread size 0" on our system, a vax 750 running 4.1c bsd. It happens whilst reallocating a fragment in bmap when osize = 0. The block we are accessing is the second direct block in the inode structure and the file size is 4096. We are therefore trying to reallocate an empty block and falling over when trying to read what is already there. I scanned round the relevant bits of 4.2 and nothing obvious leapt out. I can probably fix this in realloccg with something like if(osize == 0) { bp=getblk(ip->i_dev,fsdtodb(fs,bpref),nsize) bzero(bp.bp_un.b_addr,(unsigned)nsize)); return(bp); } which should return a *buf to the new block all nicely cleared. Before I do this and due to Murphy's law trash the file system I would appreciate comments from anyone who knows the *real* fix. Thanks in advance Pete Sykes ...vax135!edcaad|pete