flock vs fnctl

Rob Siemborski rjs3 at andrew.cmu.edu
Mon Jul 28 00:05:37 EDT 2003


On Mon, 28 Jul 2003, Andrew McNamara wrote:

> This sounds like the same problem I complained about on the list in
> the thread, subject "Very slow deletion of user mailboxes?", posted 9th
> July. I haven't had a chance to investigate further.
>
>     http://asg.web.cmu.edu/archive/message.php?mailbox=archive.info-cyrus&msg=23597

I finally took a look at this.  I have good and bad news... The good news
is that I know what it is.  The bad news is that fixing it correctly will
be horrendously slow (fixing it incorrectly is already in CVS for 2.1
atleast, which is OK for reasons that will be clear in a moment).

The problem is that when you remove a user mailbox, it is necessary to
prune the user from all possible existing ACLs.  This is a hideously
expensive process, that has in fact been stubbed out in the code for some
time (the function is user.c:user_deleteacl).  Unfortuinately, we still
were iterating across the mailbox list calling the stub function.  This
isn't a good idea (and, with skiplist, involves a lot more syscalls).

We definately want to actually do something better here in the future.
This probably involves using unique user id numbers or similar.

Now, in 2.2 there are two separate problems: one is shared above with 2.1.
The other is the question of user renames.

When a user is renamed, it *is* necessary to actually go through and
update all the ACLs live, otherwise that user isn't actually renamed (they
lose access to folders they should have access to, since we don't have
unique id #s).

However, in Scott's case, he's not renaming the user, he's just moving it
between partitions.  I don't think we should be iterating across the list
to fix the username in this case (so we should fix this ;)...

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper





More information about the Info-cyrus mailing list