Index: sys/boot/i386/libi386/biosdisk.c =================================================================== --- sys/boot/i386/libi386/biosdisk.c (revision 298593) +++ sys/boot/i386/libi386/biosdisk.c (working copy) @@ -226,7 +226,9 @@ nfd++; } } + DEBUG("Adding %d devices to bcache...", nbdinfo); bcache_add_dev(nbdinfo); + DEBUG("finished\n"); return(0); } @@ -358,8 +360,11 @@ if (dev->d_unit < 0 || dev->d_unit >= nbdinfo) return (EIO); BD(dev).bd_open++; - if (BD(dev).bd_bcache == NULL) + if (BD(dev).bd_bcache == NULL) { + DEBUG("Allocating bcache..."); BD(dev).bd_bcache = bcache_allocate(); + DEBUG("done\n"); + } err = disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? DISK_F_NOCACHE: 0); @@ -447,7 +452,9 @@ dev = (struct disk_devdesc *)f->f_devdata; BD(dev).bd_open--; if (BD(dev).bd_open == 0) { + DEBUG("Freeing bcache for device %d...", dev); bcache_free(BD(dev).bd_bcache); + DEBUG("done\n"); BD(dev).bd_bcache = NULL; } return (disk_close(dev));