From: Richard M. <ri...@ol...> - 2006-09-14 14:07:01
|
Hi, > -----Original Message----- > From: bac...@li... > [mailto:bac...@li...] On Behalf > Of Richard Mortimer > Sent: 14 September 2006 12:16 > To: 'Kern Sibbald'; bac...@li... > Subject: Re: [Bacula-devel] DVD relabel > > - I don't really like the code in dvd.c in your patch at line > > 374, and I am > > not talking about your change, which seems quite reasonable. > > What I don't > > like is that dvd_write_part() is called with a zero size > > part. Perhaps we > > should look at fixing that. > > > Yes, of course you are right. I'm fairly sure that this should be > easy with a little manipulation of the truncating and truncated > flags. I'll have a go at doing that over lunchtime. I had a think but held of making changes as your other mail suggested. There are two places where a DVD is truncated: 1) during a relabel. We can control this because the label gets rewritten during the operation so the truncating and/or truncated flag can be maintained throughout. We would be best off putting the truncating flag setting/clearing label_volume_if_ok() 2) during a recycle of a volume. This would be less obvious because we would have to remember that the part in the spool trumps the data on the DVD. In particular if Write Part After Job is no then this has to be remembered between reservations of the device. We might be able to fix it by forcing a write of the label rather than the corner case. I'll keep thinking until you've finished committing your latest changes. Regards Richard |