httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: Fwd: file bucket native operations
Date Mon, 27 Nov 2000 17:41:16 GMT

--- wrote:

> 1)  The same file is opened in multiple threads of the same process.  This
> is done with two calls to open, so it is a non-issue for us.


> 2)  We have one file that is split into two buckets.  This is handled with
> the lock discussed above.

Yup.  This was the key issue.

> 3)  We dup a file and it shows up in two buckets.  This isn't case we need
> to worry about, because it can be treated as if we were just dealing with
> files instead of buckets.

Err... no.  If I understand precisely the case you're talking about, that is.  At
least on some OSes (maybe all, maybe not, I don't know), dup() causes the original
and the dup'ed file descriptor to share file pointers (and therefore we need to
refcount/serialize)... at least Linux does this, according to its man page.

But anyway, if the code dumps an fd into a bucket, shouldn't it only ever be the
buckets code that deals directly with that fd from then on?  As far as the
file-opener code is concerned, it just has a file bucket from that point on, not an
open file that it's still allowed to play with.  The buckets code will manipulate
the fd, the pool code will close it when the pool dies.  The caller never has to
touch it again.

So the only code that should ever want to dup() an fd that's referenced by a file
bucket is the buckets code itself.  But I still don't see how that would help the
buckets code, so fd's that get put into file buckets will never be dup'ed.  Right?

Or did I misunderstand your point?

> I don't think I missed any cases, but please let me know if I did.

I think that's all of them.

> > (2) Is there still an interest in adding a copy operation to the buckets API?
> This is an absolute necessity.

Just checking.  Everybody shut up about it for like two weeks and yet the code is
still plunging ahead toward beta status, so I figured it was worth asking about. 
I'll start working on both of these issues as soon as I get a free minute... expect
patches in a day or two.


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

View raw message