[PATCH] Changing folder paths on disk to support fast-rename

Bron Gondwana brong at fastmail.fm
Wed Aug 22 10:11:11 EDT 2007

On Tue, 21 Aug 2007 23:30:45 +1000, "Bron Gondwana" <brong at fastmail.fm>
> I'll be working on fast-rename in this new universe next,
> but I thought I should throw this out there for comments.
> So, what do you think (and yes, I'll be making rehash at
> least work happily with this, because we'll need to do it
> ourselves.  Current plan - down the replica, rehash it,
> change the config, bring it back up.  Failover, rinse,
> repeat)

And it turns out that the only change needed from David's
patch can be mostly encapsulated in this little fragment here
(also, we pass isusermbox down to mailbox_rename_copy so it
can handle the "breaks replication" issue better, *sigh* - I
am so tempted to just to return "ACCESS DENIED - if you really
want this then create a new folder and copy the damn messages
over yourself".  One of the weirder namespace discontinuities
required by the IMAP spec)

+         if (isusermbox || !config_getswitch(IMAPOPT_FAST_RENAME) ||
+             ((config_hashimapspool != IMAP_ENUM_HASHIMAPSPOOL_USERID)
+              (mboxlist_count_inferiors(oldname, 0, userid, auth_state)
> 0)) ||
+             (mailbox_rename_fast(&oldmailbox, newname, newpartition)
!= 0)) {

This fastrename patch works regardless of the settings of hashimapspool,
though of course due to the change from SWITCH to ENUM you still need to
have applied the previous patch.  Oh well.  At least it's very similar
in spirit to the virtdomains change from the past.


  Bron Gondwana
  brong at fastmail.fm

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cyrus-fastrename-2.3.9.diff
Url: http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20070823/43c0bf10/attachment.ksh 

More information about the Cyrus-devel mailing list