From: Kern Sibbald Date: Sat, 3 Oct 2009 13:37:24 +0000 (+0200) Subject: Add some error messages in insane buffer size cases X-Git-Tag: Release-7.0.0~2610^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8dda63d7fcf1b413c35cdd3344cd57f74b92bba1;p=bacula%2Fbacula Add some error messages in insane buffer size cases --- diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index 756f50c08c..5969b49eef 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -228,6 +228,10 @@ init_dev(JCR *jcr, DEVRES *device) Jmsg2(jcr, M_WARNING, 0, _("Max block size %u not multiple of device %s block size.\n"), dev->max_block_size, dev->print_name()); } + if (dev->max_volume_size != 0 && dev->max_volume_size < (dev->max_block_size << 4)) { + Jmsg(jcr, M_ERROR_TERM, 0, _("Max Vol Size < 8 * Max Block Size on device %s\n"), + dev->print_name()); + } dev->errmsg = get_pool_memory(PM_EMSG); *dev->errmsg = 0; diff --git a/bacula/src/stored/device.c b/bacula/src/stored/device.c index 42cc437e6f..20a6c3a8a3 100644 --- a/bacula/src/stored/device.c +++ b/bacula/src/stored/device.c @@ -185,6 +185,9 @@ bool fixup_device_block_write_error(DCR *dcr) berrno be; Dmsg1(0, _("write_block_to_device overflow block failed. ERR=%s"), be.bstrerror(dev->dev_errno)); + Jmsg2(jcr, M_FATAL, 0, + _("Catastrophic error. Cannot write overflow block to device %s. ERR=%s"), + dev->print_name(), be.bstrerror(dev->dev_errno)); goto bail_out; } ok = true;