-$Id: CHANGES,v 1.180 2002/06/08 07:19:28 stelian Exp $
+$Id: CHANGES,v 1.181 2002/06/10 14:04:59 stelian Exp $
+Changes between versions 0.4b29 and 0.4b30 (released ????????????????)
+======================================================================
+
+1. Made dump print out the ext2 logical block number in case of a read
+ error, which can be given as an argument to debugfs' ncheck command,
+ in order to find out the affected inode. Added note about this
+ usage in dump's man page.
+
Changes between versions 0.4b28 and 0.4b29 (released June 8, 2002)
==================================================================
* Stelian Pop <stelian@popies.net>, 1999-2000
* Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 2000-2002
*
- * $Id: bsdcompat.h,v 1.16 2002/01/16 09:32:14 stelian Exp $
+ * $Id: bsdcompat.h,v 1.17 2002/06/10 14:05:00 stelian Exp $
*/
#include <config.h>
#define powerof2(x) ((((x)-1)&(x))==0)
#define dbtob(b) ((unsigned)(b) << DEV_BSHIFT)
-#define fsbtodb(sb,b) ((int)(((long long)b * EXT2_BLOCK_SIZE(sb->super)) / DEV_BSIZE))
+#define fsbtodb(sb,b) ((int)(((long long)(b) * EXT2_BLOCK_SIZE((sb)->super)) / DEV_BSIZE))
+#define dbtofsb(sb,b) ((int)(((long long)(b) * DEV_BSIZE) / EXT2_BLOCK_SIZE((sb)->super)))
#define sblock fs
#define fs_fsize fragsize
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: dump.8.in,v 1.41 2002/06/05 13:29:15 stelian Exp $
+.\" $Id: dump.8.in,v 1.42 2002/06/10 14:05:00 stelian Exp $
.\"
.Dd __DATE__
.Dt DUMP 8
read errors is important, the output from dump can be parsed to look for lines
that contain the text 'read error'.
.Pp
+When a read error occurs,
+.Nm
+prints out the corresponding physical disk block and sector number and the
+ext2 logical block number.
+It doesn't print out the corresponing file name or even the inode number.
+The user has to use
+.Xr debugfs 8 ,
+commands
+.Pa ncheck
+and
+.Pa icheck
+to translate the
+.Pa ext2blk
+number printed out by dump into an inode number, then into a file name.
+.Pp
Each reel requires a new process, so parent processes for
reels already written just hang around until the entire tape
is written.
#ifndef lint
static const char rcsid[] =
- "$Id: traverse.c,v 1.46 2002/05/16 21:22:36 stelian Exp $";
+ "$Id: traverse.c,v 1.47 2002/06/10 14:05:00 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include <string.h>
#include <unistd.h>
#endif
+#include <errno.h>
#include <sys/param.h>
#include <sys/stat.h>
bread(daddr_t blkno, char *buf, int size)
{
int cnt, i;
- extern int errno;
loop:
#ifdef __linux__
goto loop;
}
if (cnt == -1)
- msg("read error from %s: %s: [block %d]: count=%d\n",
- disk, strerror(errno), blkno, size);
+ msg("read error from %s: %s: [block %d, ext2blk %d]: count=%d\n",
+ disk, strerror(errno), blkno,
+ dbtofsb(sblock, blkno), size);
else
- msg("short read error from %s: [block %d]: count=%d, got=%d\n",
- disk, blkno, size, cnt);
+ msg("short read error from %s: [block %d, ext2blk %d]: count=%d, got=%d\n",
+ disk, blkno, dbtofsb(sblock, blkno), size, cnt);
if (++breaderrors > breademax) {
msg("More than %d block read errors from %d\n",
breademax, disk);
if ((cnt = read(diskfd, buf, (int)dev_bsize)) == dev_bsize)
continue;
if (cnt == -1) {
- msg("read error from %s: %s: [sector %d]: count=%d\n",
- disk, strerror(errno), blkno, dev_bsize);
+ msg("read error from %s: %s: [sector %d, ext2blk %d]: count=%d\n",
+ disk, strerror(errno), blkno,
+ dbtofsb(sblock, blkno), dev_bsize);
continue;
}
- msg("short read error from %s: [sector %d]: count=%d, got=%d\n",
- disk, blkno, dev_bsize, cnt);
+ msg("short read error from %s: [sector %d, ext2blk %d]: count=%d, got=%d\n",
+ disk, blkno, dbtofsb(sblock, blkno), dev_bsize, cnt);
}
}