1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Description: handle non-power-of-two filesystem i/o blocksizes better
fix for bug#995992
Author: Alexander Zangerl <az@debian.org>
--- a/restore/tape.c
+++ b/restore/tape.c
@@ -394,8 +394,9 @@ setup(void)
fssize = TP_BSIZE;
if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE)
fssize = stbuf.st_blksize;
+ /* is it a power of two? fssize needs to be divisible by TP_BSIZE */
if (((fssize - 1) & fssize) != 0)
- errx(1, "bad block size %ld", fssize);
+ fssize = MAXBSIZE;
if (spcl.c_volume != 1)
errx(1, "Tape is not volume 1 of the dump");
if (gethead(&spcl) == FAIL) {
|