[PATCH 0/2] CNFSv4: move to 4K blocksize

Russ Allbery rra at stanford.edu
Mon Dec 1 20:54:13 UTC 2008


list-inn-workers at news.cistron.nl ("Miquel van Smoorenburg" ) writes:

> I have been thinking this over the last few days, and I think
> we should drop the bitmap entirely.
>
> The only reason the bitmap exists is to detect overwritten
> articles, and to cancel articles.
>
> But since the articles are stored in wireformat, we can make
> this much easier.
>
> If we start every article header with a signature-string, it's
> easy to detect overwritten articles. Just see if the signature
> is intact.
>
> Such a signature should look like this:
>
> 	char sig[8] = "\0\0\r\r\n.\r\n";
>
> NUL characters are forbidden in articles on the wire, so are
> standalone CRs, and the combination \r\n.\r\n can only exist
> at the very end of an article.
>
> This way it is not possible that article contents overwrite
> an article header without us detecting it.
>
> Comments ?

It's been a long time since I've looked at this code, but that basically
makes sense to me.  I can only think of one edge case: what happens if the
new article happens to start at exactly the same byte position in the CNFS
cycbuff as an old article?

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.



More information about the inn-workers mailing list