From mharrell@bittwiddlers.com Tue Aug 17 15:50:02 1999 X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["4117" "Tue" "17" "August" "1999" "11:45:27" "-0400" "Matthew Harrell" "mharrell@bittwiddlers.com" nil "97" "Re: queue-fix and the big-todo patch" "^From:" nil nil "8" nil nil nil nil nil] nil) Return-Path: Delivered-To: nelson@desk.crynwr.com Received: (qmail 17590 invoked by uid 0); 17 Aug 1999 15:50:02 -0000 Received: from ns.crynwr.com (192.203.178.14) by desk.crynwr.com with SMTP; 17 Aug 1999 15:50:01 -0000 Received: (qmail 6176 invoked by uid 500); 17 Aug 1999 15:46:09 -0000 Delivered-To: nelson@qmail.org Received: (qmail 6173 invoked by uid 0); 17 Aug 1999 15:46:09 -0000 Received: from smtp1.erols.com (207.172.3.234) by www.qmail.org with SMTP; 17 Aug 1999 15:46:09 -0000 Received: from alecto.bittwiddlers.com (216-164-129-26.s280.tnt1.lnhva.md.dialup.rcn.com [216.164.129.26]) by smtp1.erols.com (8.8.8/8.8.5) with SMTP id LAA00632 for ; Tue, 17 Aug 1999 11:45:32 -0400 (EDT) Received: (qmail 18203 invoked by uid 48381); 17 Aug 1999 15:45:27 -0000 Message-ID: <19990817114527.A17870@bittwiddlers.com> References: <19990817091321.A4136@bittwiddlers.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=LQksG6bCIzRHxTLp X-Mailer: Mutt 0.95.6i In-Reply-To: <19990817091321.A4136@bittwiddlers.com>; from root on Tue, Aug 17, 1999 at 09:13:21AM -0400 From: Matthew Harrell To: e-huss@netmeridian.com, nelson@qmail.org Subject: Re: queue-fix and the big-todo patch Date: Tue, 17 Aug 1999 11:45:27 -0400 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii I previously asked: : Have you ever used the big-todo patch? It's a patch by Russell Nelson : to improve performance on high volume servers by changing the queue directories : to hashed directories. Anyway, I was wondering if you could explain the : directory creation routines in queue-fix so I could change my copy to comply : with this directory structure? Well, I had some time this afternoon so I sat around and fiddled with it. I'm not entirely sure I understand it, but I created the following patch which seems to work with queue-fix 1.4. I've got both big-todo and queuefix running together on this server without any problems so far. -- Matthew Harrell Any sufficiently advanced bug is Bit Twiddlers, Inc. indistinguishable from a feature. mharrell@bittwiddlers.com --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="queue-fix-todo.patch" --- queue-fix-1.4/queue-fix.c-ori Tue Aug 17 09:43:58 1999 +++ queue-fix-1.4/queue-fix.c Tue Aug 17 09:52:16 1999 @@ -445,9 +445,9 @@ if(rename_mess("info/",part,new_part,d->d_name,inode)) { closedir(dir); return -1; } if(rename_mess("local/",part,new_part,d->d_name,inode)) { closedir(dir); return -1; } if(rename_mess("remote/",part,new_part,d->d_name,inode)) { closedir(dir); return -1; } + if(rename_mess("intd/",part,new_part,d->d_name,inode)) { closedir(dir); return -1; } + if(rename_mess("todo/",part,new_part,d->d_name,inode)) { closedir(dir); return -1; } - if(rename_mess("intd","","",d->d_name,inode)) { closedir(dir); return -1; } - if(rename_mess("todo","","",d->d_name,inode)) { closedir(dir); return -1; } if(rename_mess("bounce","","",d->d_name,inode)) { closedir(dir); return -1; } } } @@ -513,9 +513,9 @@ if(clean_tmp("info/",name_num)) return -1; if(clean_tmp("local/",name_num)) return -1; if(clean_tmp("remote/",name_num)) return -1; + if(clean_tmp("intd/",name_num)) return -1; + if(clean_tmp("todo/",name_num)) return -1; } - if(clean_tmp("intd","")) return -1; - if(clean_tmp("todo","")) return -1; if(clean_tmp("bounce","")) return -1; return 0; @@ -553,19 +553,19 @@ if(check_item(check_dir.s,qmails_uid,qmail_gid,0700,'d',0)) return -1; if(check_splits(check_dir.s,qmails_uid,qmail_gid,0700,qmail_gid,0600)) return -1; - /*check the others*/ if(!stralloc_copy(&check_dir,&queue_dir)) die_nomem(); if(!stralloc_cats(&check_dir,"todo")) die_nomem(); if(!stralloc_0(&check_dir)) die_nomem(); if(check_item(check_dir.s,qmailq_uid,qmail_gid,0750,'d',0)) return -1; - if(check_files(check_dir.s,qmailq_uid,-1,0644)) return -1; + if(check_splits(check_dir.s,qmailq_uid,qmail_gid,0750,qmail_gid,0600)) return -1; if(!stralloc_copy(&check_dir,&queue_dir)) die_nomem(); if(!stralloc_cats(&check_dir,"intd")) die_nomem(); if(!stralloc_0(&check_dir)) die_nomem(); if(check_item(check_dir.s,qmailq_uid,qmail_gid,0700,'d',0)) return -1; - if(check_files(check_dir.s,qmailq_uid,-1,0644)) return -1; + if(check_splits(check_dir.s,qmailq_uid,qmail_gid,0750,qmail_gid,0644)) return -1; + /*check the others*/ if(!stralloc_copy(&check_dir,&queue_dir)) die_nomem(); if(!stralloc_cats(&check_dir,"bounce")) die_nomem(); if(!stralloc_0(&check_dir)) die_nomem(); @@ -684,16 +684,14 @@ if(!stralloc_cats(&check_dir,"remote")) die_nomem(); if(check_stray_parts()) return -1; - if(!stralloc_copy(&check_dir,&queue_dir)) die_nomem(); if(!stralloc_cats(&check_dir,"todo")) die_nomem(); - if(!stralloc_0(&check_dir)) die_nomem(); - if(check_strays(check_dir.s)) return -1; + if(check_stray_parts()) return -1; if(!stralloc_copy(&check_dir,&queue_dir)) die_nomem(); if(!stralloc_cats(&check_dir,"intd")) die_nomem(); - if(!stralloc_0(&check_dir)) die_nomem(); - if(check_strays(check_dir.s)) return -1; + if(check_stray_parts()) return -1; + if(!stralloc_copy(&check_dir,&queue_dir)) die_nomem(); if(!stralloc_cats(&check_dir,"bounce")) die_nomem(); --LQksG6bCIzRHxTLp-- .