> > Date: Thu, 12 Jun 2014 15:14:29 -0400 > > From: Ted Unangst <t...@tedunangst.com> > > > > On Thu, Jun 12, 2014 at 21:07, Christian Weisgerber wrote: > > > After writing 2TB (INT_MAX * TP_BSIZE), dump(8) stops reporting > > > progress because the blockswritten variable has wrapped around to > > > negative. It needs to be a larger type like the tapesize variable; > > > see optr.c:timeest(). This only affects the terminal chatter. The > > > actual dump functionality is fine. > > > > > int notify; /* notify operator flag */ > > > -int blockswritten; /* number of blocks written on current tape */ > > > +off_t blockswritten; /* number of blocks written on current tape */ > > > int tapeno; /* current tape number */ > > > time_t tstart_writing; /* when started writing the first tape block */ > > > long xferrate; /* averaged transfer rate of all volumes */ > > > > I'm not sure off_t is the right semantic type. Perhaps just use int64_t? > > int64_t is what we use in struct stat. > > That said, there is existing off_t abuse in dump.
I seperately pointed out to naddy that blocksperfile is also mishandled; it will also overflow. It is printed with a %ld somewhere, so fix that too.