Re: link() security

Patrick J. LoPresti (patl@curl.com)
15 Apr 2002 16:36:36 -0400


"H. Peter Anvin" <hpa@zytor.com> writes:

> > Funny that news server authors realized that storing messages in files
> > by themselves is a bad idea, while at the same time mail server authors
> > realized that storing messages together in a single file is a bad idea.
> > Which one is right? Both? Neither?
> >
>
> It depends on your access patterns. Newer news server use what I
> would classify as custom filesystems (which is what binary databases
> are, by and large) rather than "single files."

Exactly. Although I would go farther.

I would not be at all surprised if a traditional news spool worked
just fine on a "real" high-performance file system; i.e., one whose
lookup/creat/unlink was not linear in the number of directory entries.
I wonder how well an old-fashioned news spool would perform on XFS,
for instance.

"One file per message" has many advantages, both for news and for
mail. The biggest advantage is conceptual simplicity. It is really
nice when you can use traditional Unix tools (like grep, mv, rm) to
fix things when they break. Because they always break, sooner or
later.

Sure, you may wind up with 50,000 files in one directory. But I would
rather rely on the filesystem wizards to deal with that than switch to
some obscure custom database format. Maybe that's just me...

- Pat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/