Amanda-Users

Re: forcing skipped incrementals into holding disk

2005-02-17 15:14:47
Subject: Re: forcing skipped incrementals into holding disk
From: Kevin Dalley <kevin AT kelphead DOT org>
To: amanda-users AT amanda DOT org
Date: Thu, 17 Feb 2005 11:56:42 -0800
Kevin Dalley <kevin AT kelphead DOT org> writes:

> Yes, maximum dump size is calculated.
>
> I posted an older version of the patch a couple of months ago.
> Someone suggested that there should an amanda.conf variable to turn
> this option on or off.  I haven't added that yet.  My patch doesn't
> make as much difference with runtapes greater than the real number of
> tapes.
>
> Since my cvs connection is timing out, I'm unable to post an updated
> patch right now.  I'll look at it again later.


Here's my patch against the tag amanda-245-branch:

Index: server-src/planner.c
===================================================================
RCS file: /cvsroot/amanda/amanda/server-src/planner.c,v
retrieving revision 1.76.2.15.2.13.2.32.2.15
diff -u -u -r1.76.2.15.2.13.2.32.2.15 planner.c
--- server-src/planner.c        9 Feb 2005 14:31:24 -0000       
1.76.2.15.2.13.2.32.2.15
+++ server-src/planner.c        17 Feb 2005 19:37:28 -0000
@@ -370,9 +370,11 @@
        dumpfile_t file;
        sl_t *holding_list;
        sle_t *holding_file;
+       unsigned long holding_size = 0;
        holding_list = get_flush(NULL, NULL, 0, 0);
        for(holding_file=holding_list->first; holding_file != NULL;
                                       holding_file = holding_file->next) {
+           holding_size += size_holding_files(holding_file->name);
            get_dumpfile(holding_file->name, &file);
            
            log_add(L_DISK, "%s %s", file.name, file.disk);
@@ -393,6 +395,17 @@
        }
        free_sl(holding_list);
        holding_list = NULL;
+       if (holding_size >= tape_length){
+         tape_length = 0;
+       }
+       else {
+         tape_length -= holding_size;
+       }
+       fprintf(stderr,
+               "\nAUTOFLUSH: Total wait to flush size = %lu\n",
+               holding_size);
+       fprintf(stderr, "AUTOFLUSH: Remaining tape size = %lu\n",
+               tape_length);
     }
     fprintf(stderr, "ENDFLUSH\n");
     fprintf(stdout, "ENDFLUSH\n");
cvs diff: Diffing tape-src
cvs diff: Diffing tape-src/tests

Exit 1 11:54:59




-- 
Kevin Dalley
kevin AT kelphead DOT org