From: Nathan Scott Date: Mon, 13 May 2002 08:04:12 +0000 (+0000) Subject: Fix bug in xfs_repair da_write() routine, which affects filesystems where X-Git-Tag: v2.1.0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01f8bdf6672a5e51780f98b8a8d0d012e7ef4e2c;p=thirdparty%2Fxfsprogs-dev.git Fix bug in xfs_repair da_write() routine, which affects filesystems where the data blocksize != naming blocksize (see xfs_info output). --- diff --git a/doc/CHANGES b/doc/CHANGES index d7945b424..8e901dea9 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,6 +1,11 @@ +[cvs] - Fix error returns from log recovery. - Fix the way mkfs round downs the device when the last AG is maller than the minimum AG size. + - Fix bug in xfs_repair da_write() routine, which affects + filesystems where the data blocksize != naming blocksize + (see xfs_info output). + xfsprogs-2.0.5 (02 May 2002) - size AGs so that they do not always start on the same part of a striped disk diff --git a/repair/dir2.c b/repair/dir2.c index 91ce68ec4..3d7abdd31 100644 --- a/repair/dir2.c +++ b/repair/dir2.c @@ -188,6 +188,7 @@ da_bwrite( int error; int i; int nbuf; + int off; if ((nbuf = dabuf->nbuf) == 1) { bplist = &bp; @@ -199,6 +200,11 @@ da_bwrite( exit(1); } bcopy(dabuf->bps, bplist, nbuf * sizeof(*bplist)); + for (i = off = 0; i < nbuf; i++, off += XFS_BUF_COUNT(bp)) { + bp = bplist[i]; + bcopy((char *)dabuf->data + off, XFS_BUF_PTR(bp), + XFS_BUF_COUNT(bp)); + } } da_buf_done(dabuf); for (i = error = 0; i < nbuf; i++) {