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

"Miquel van Smoorenburg" list-inn-workers at news.cistron.nl
Sun Nov 30 13:40:21 UTC 2008


In article <49313665$0$183$e4fe514c at news.xs4all.nl>,
Miquel van Smoorenburg <list-inn-workers at news.cistron.nl> wrote:
>In that case, please drop the previous patch. I'll fix the
>CNFSv4 code to use static-size article-headers so that CNFS
>buffers become interchangeable between 32 and 64 bit systems.
>That could be a good thing for people upgrading their systems.

I've implemented this.

>I'm not sure if I'll fix the bitmap endianness problem.
>I don't think that moving CNFS spools from little-endian to
>big-endian systems is all that common (and besides, all the
>world is an intel anyway :) )

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 ?

Mike.
-- 
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to "Miquel van Smoorenburg" <miquels at cistron.nl>



More information about the inn-workers mailing list