On Wed, Feb 17, 1999 at 08:16:35AM -0500, [EMAIL PROTECTED] 
wrote:
> On Wed, 17 Feb 1999, Brian Reichert wrote:
> 
> > On Wed, Feb 17, 1999 at 01:18:33PM +1100, Mark Delany wrote:
> > > >Is the inode just a handy unique number?  Or are there file access
> > > >speed tricks, e.g. opening files directly using inode.
> > > 
> > > Handy unique filename. Vastly superior to tmpnam() and all the lame 
> > > variants that go with it.
> 
> I often wondered why Dan chose to do queue filenames by inode, but use
> timestamp-pid-host for creating unique filenames within a maildir.  Then I
> remembered that qmail-queue is a long-running daemon and so will have the
> same pid for long periods of time.  It seems that there ought to be
> another piece of information that could be used to make a similar filename
> unique, without going through tmpnam.  I suppose you could even use
> timestamp-inode.  There are two reasons I can think of for this change: 1)
> it makes the queue portable, which isn't very important, and 2) it makes
> message identifiers which are valid for long periods of time.  The latter
> makes it much easier to look through logs for a particular message.  It
> shouldn't be much slower; it should only cost an extra time(2) call, as
> you already need a stat to get the inode.

Yeah well.. what will you do with several messages per second? Even with usec
precision, there is a (very) small chance that you'll generate the same name
twice, which is unacceptable.

Hmm.. timestamp.qmail-queue pid.qmail-queue internal counter perhaps?

Greetz, Peter.

Reply via email to