From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3e90b031be3e4fc9eafb1eeadfb9f9e1@quanstro.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] venti woes with brand new install From: erik quanstrom Date: Sat, 8 Sep 2007 12:49:30 -0400 In-Reply-To: <289299487ad8b104193a761eba3fe691@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: bbbf04aa-ead2-11e9-9d60-3106f5b1d025 > found it! > > that is "defghijklmnopqrstuv..." instead of the expected "1234567890abc..." > > 13 bytes! > > b->data is incremented (and b->len decremented)13 bytes to skip the > "venti config" magic in readifile() ifile.c:39. > and freezblock() alculates the position of the zmagic by b->data + b->_size. > > maybe add a b->_data in ZBuffer or fix ifile.c? > > cinap this might not fix everything as the tail magic was corrupted, too. - erik n/sources/plan9//sys/src/cmd/venti/srv/ifile.c:36,43 - ifile.c:36,44 freepart(p); return -1; } - b->data += m; - b->len -= m; + memmove(b->data, b->data+m, 8192-m); + memset(b->data+8192-m, 0, 8192-m); + z = memchr(b->data, 0, b->len); if(z) b->len = z - b->data;