Makehistory, qio issues
Heath Kehoe
hakehoe at avalon.net
Thu Jun 10 15:29:30 UTC 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I just ran into a problem with makehistory (on 2.4.1):
it died with these error:
makehistory: overview line 43 is too long
makehistory: sorted overview file /inn/tmp/hisTNXK3WD has a bad line at
44
Line 43 was larger than the QIO buffer size, and there was nothing wrong
with line 44. I suspect it was trying to process the remainder of line
43 when it thought it was on 44.
So, I changed makehistory.c so that instead of exiting on a bad line,
it continues on. I'd rather have it just skip over bad lines than
erroring
out, since it sucks to have makehistory die halfway through its 8-hour
run.
Hmm... I see a fix for dealing with too-long lines is in CURRENT
(qio.c 1.11). Has that fix been sufficiently tested to back-port to
STABLE?
Also, I see that the qio code uses the blocksize of the filesystem
as its buffer size (unless it's larger than 4x or smaller than 1/2 of
QIO_BUFFERSIZE) which in my case is 4096.
I would like to make the following change to qio.c, which makes sure
that
the buffer size will always be at least 8192, but still be a multiple of
st_blksize. Any objections?
diff -u -r1.8.2.1 qio.c
- --- qio.c 12 Jul 2003 19:12:55 -0000 1.8.2.1
+++ qio.c 10 Jun 2004 15:15:32 -0000
@@ -38,8 +38,11 @@
only use this value for regular files. */
if (fstat(fd, &st) == 0 && S_ISREG(st.st_mode)) {
size = st.st_blksize;
- - if (size > (4 * QIO_BUFFERSIZE) || size < (QIO_BUFFERSIZE / 2))
+ if (size > (4 * QIO_BUFFERSIZE))
size = QIO_BUFFERSIZE;
+ else
+ while(size < QIO_BUFFERSIZE)
+ size += st.st_blksize;
}
#endif /* HAVE_ST_BLKSIZE */
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFAyH5f4uXPAG0A1J4RAvf7AJ95H6ZT53r5mufsxTbKP4zevmiQpQCdFJW6
h0Grn2eztZhY/SzfDnYbzdI=
=OJsI
-----END PGP SIGNATURE-----
More information about the inn-workers
mailing list